From: Detlef Reichl Date: 2005-12-30T04:21:55+09:00 Subject: Re: Real-time image processing in Ruby Am Donnerstag, den 29.12.2005, 08:08 +0900 schrieb John Koschwanez: > - I capture images from a camera, process and analyze them, and display > them at ~10 fps. Ruby-v4l (capture) is for Linux only. Tk is probably > too slow, and someone recommended using OpenGL for display. Has anyone > had success with image capture or display using Ruby? What worked? Any > advice? Hi, cause ruby-v4l was to limited for me i've started to wirte Wc, a webcam library (I think you can use it also with other camseras, but i didn't tested it). For now i've tested it with six different cams (and kernel modules) and v4l (version 1). At this moment i'm on add 4vl2 support and will release a preview in the next days. If *bsd has something like v4l (i don't know), suport for this will also be added some day... Support for windoze will not come. Simple image prossesing linke rotation, fliping, croping, mixing, ... is provided. Nearly the complete library is written in C and to add other functions is very easy. For displaying i use the ruby bindings of Gtk+. The overhead of the grapics library for the output is very low. On my 1.23 MHz Mac Mini a viewer at ~10 fps generates ~20-40% system load. Higher frame rates are not possible for me, cause i have connected several cams at once and they have to share the bandwidth (and it is not possible to use USB2 on an external hub, due of the limitions of the usb-implimentation of linux). You can find it at: http://dr.dhis.org/webcam/index.rbx With the package you will get some examples like the camera viewer. i'm open for sugestions to extend the library. Cheers detlef > - Is anyone using pure Ruby to process images real-time? RMagick is too > limited for my applications. I doubt Ruby would match the speed of C, > but it might be fun to try. > Thanks, John >