From: ara.t.howard@... Date: 2005-12-29T11:11:51+09:00 Subject: Re: Real-time image processing in Ruby On Thu, 29 Dec 2005, John Koschwanez wrote: > I'm a Ruby newbie - "Programming Ruby" was great Xmas break reading! > I write image analysis and processing code to analyze single cells under > a microscope in real-time and to automate lab equipment. I now write > solely in C++ for PC, but I would love to use Ruby to quickly try new > ideas without plowing through C++ code. I have read through the forums > and I see Ara Howard is using C extensions to process images - I'll try > the same thing. I have some questions for the group: > - 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? > - 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 i'm not doing anything near-realtime, but you may want to check this out: http://artengine.ca/gridflow/ my understanding is that it's used for realtime video processing, so images might be possible too. i must say, however, that it seems like doing what you are doing, especially in linux only, might be possible with rmagick only - just dump the frames in /dev/shm and go... another option, quite suitable for prototyping only, is just using narray : i use it together with a hack that allows the grids to be mmap'd quantities so 'image processing' is nothing but matrix ops... narray ships with a simple method of displaying images under x. at 10 fps this might just hack it. regards. -a -- =============================================================================== | ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara ===============================================================================