Skip to content
forked from Nedomas/Wildfire

Ruby gem to cut objects from images like crazy with OpenCV

License

Notifications You must be signed in to change notification settings

Saimis/Wildfire

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wildfire

Uses computer vision to cut objects from images.

Something like this.

Page Rectangle

Installation

Add this line to your application's Gemfile:

gem 'wildfire'

And then execute:

$ bundle

Or install it yourself as:

$ gem install wildfire

Usage

Use it from command line:

bin/wildfire a4 spec/support/printed-iphones-on-a4.jpg
# => The page was cut and placed at spec/support/big_page.jpg

bin/wildfire printed_screens spec/support/printed-iphones-on-a4.jpg
# => The screens were cut and placed at spec/support/screen_0.jpg,
# spec/support/screen_1.jpg, spec/support/screen_2.jpg, spec/support/screen_3.jpg

Use it from Ruby code:

  manager = Wildfire::Manager.new(image_path)
  manager.predicted_page_coords
  # => [[0,0], [0, 50], [50, 0], [50, 50]]
  manager.cut_page!(manager.predicted_page_coords)
  # => cut_page_path.jpg

  Wildfire::ScreenCutter.new('cut_page_path.jpg').paths
  # => ['screen_1.jpg', 'screen_2.jpg', ...]

Contributing

  1. Fork it ( https://github.com/[my-github-username]/wildfire/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Ruby gem to cut objects from images like crazy with OpenCV

Resources

License

Stars

Watchers

Forks

Packages

No packages published