Grabbing snapshots from webcams in ruby
I'm the developer of Hornetseye. You can capture images with the V4L2-interface of HornetsEye as follows.
require 'rubygems'
require 'hornetseye_v4l2'
require 'hornetseye_xorg'
require 'hornetseye_rmagick'
include Hornetseye
input = V4L2Input.new '/dev/video0'
img = X11Display.show { input.read }
img.to_ubytergb.save_ubytergb 'test.png'
Currently supported colourspaces are UYVY, YUYV, YUV420, GREY, RGB24. Note that other colourspaces such as MJPEG are not supported at the moment.
Capture webcam's image with Ruby
This looks good http://www.wedesoft.demon.co.uk/hornetseye-api/files/HornetsEye-txt.html although I don't have any experience using it.
How do I grab an image retrieved from a camera via web browser?
The easiest solution is probably curl. It's even got an example which lacks just the for (;;) { grab(); sleep(60000); }
loop.
Related Topics
How to Run Rake with --Trace Within Capistrano
Sorting a Hash in Ruby by Its Value First Then Its Key
How to Destroy a Record Without an Id Column in Ruby Activerecord
Error "Undefinded Method "Load_Defaults" " When Trying to Deploy App on Heroku
How to Change Passenger Ruby Version Without Recompiling
Check If Array of Integers Increments in Ruby
Find Number of Bytes a Particular Hash Is Using in Ruby
Sort a List of Objects by Using Their Attributes in Ruby
Best Way to Handle Category/Subcategory Relationship Ruby on Rails
How to Force a Gem's Dependencies in Gemfile
Why Does Hash.New({}) Hide Hash Members
How to Remove Blank Values Params from Query String
Passing Params to Cancan in Ror
How to Tell Which Openssl Lib Is Actually Being Used by an Rvm-Installed Ruby