https://github.com/kjunichi/mruby-webcam
mruby can get image from webcam now!
https://github.com/kjunichi/mruby-webcam
camera-image face-detection mruby opencv
Last synced: about 1 month ago
JSON representation
mruby can get image from webcam now!
- Host: GitHub
- URL: https://github.com/kjunichi/mruby-webcam
- Owner: kjunichi
- License: other
- Created: 2015-12-02T13:14:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-22T07:02:41.000Z (about 6 years ago)
- Last Synced: 2025-02-27T13:22:24.915Z (about 2 months ago)
- Topics: camera-image, face-detection, mruby, opencv
- Language: CMake
- Homepage:
- Size: 56.6 KB
- Stars: 8
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mruby-webcam [](https://travis-ci.org/kjunichi/mruby-webcam) [](https://ci.appveyor.com/project/kjunichi/mruby-webcam/branch/master)
[](http://www.youtube.com/watch?v=_YFswQSockw)
## install by mrbgems
- add conf.gem line to `build_config.rb````ruby
MRuby::Build.new do |conf|# ... (snip) ...
conf.gem :github => 'kjunichi/mruby-webcam'
end
```
## example
```ruby
cam = Webcam.new
cam.set_size 300, 300
cam.capture {|img|
# img : JPEG format(default)
puts img.length
}# SPC : capture
# ESC : exit
cam.start
``````ruby
cam = Webcam.new
cam.set_size 300, 300
cam.each {|img|
# img : JPEG format(default)
puts img.length
}
```### how to put ppm image
```ruby
cam = Webcam.new
cam.set_fmt "ppm"
cam.capture {|img|
# img : PPM format(P6)
puts img
}# SPC : capture
# ESC : exit
cam.start
```## License
under the MIT License:
- see LICENSE file