https://github.com/nedomas/wildfire
Ruby gem to cut objects from images like crazy with OpenCV
https://github.com/nedomas/wildfire
Last synced: 26 days ago
JSON representation
Ruby gem to cut objects from images like crazy with OpenCV
- Host: GitHub
- URL: https://github.com/nedomas/wildfire
- Owner: Nedomas
- License: mit
- Created: 2014-09-29T19:31:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-18T18:44:30.000Z (over 10 years ago)
- Last Synced: 2025-04-09T19:49:38.842Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 6.6 MB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

Uses computer vision to cut objects from images.
Something like this.

## Installation
Add this line to your application's Gemfile:
```ruby
gem 'wildfire'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install wildfire
## Usage
Use it from command line:
```sh
bin/wildfire a4 spec/support/printed-iphones-on-a4.jpg
# => The page was cut and placed at spec/support/big_page.jpgbin/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:
```ruby
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.jpgWildfire::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