Crossplatform video capture library for Ruby. Powered by OpenCV.
Windows, Mac OS X, Linux, etc...(OpenCV capable systems)
- nice-ffi >= 0.3
- OpenCV Library >= 2.0.0
gem install rb_webcam
camera_id = 0
Webcam.open(camera_id) {|capture| image = capture.grab}
or
capture = Webcam.new
image = capture.grab
capture.close
to save image
capture = Webcam.new
image = capture.grab
image.save "new_image.jpg"
capture.close
- specity size at initialize, or anytime.
The MIT License Copyright (c) 2010 Hirotoshi YOSHITAKA. See LICENSE for details.