The Artist Formerly Known as Kap'n Salty wrote:
Newbie wrote:
I am doing some robotics projects but my main area of interest is trying out several algorithms for the processing of the stream of
data
coming from the video.
I am wondering what type of camera I should invest in. Either I
could
buy a web cam and hope I can find a driver I could either modify or use. i.e. every frame is somehow stored on the computer
automagically
or I could buy a camera not unlike the AVRcam (http://www.jrobot.net/Projects/AVRcam.html) or the CMUcam and try
to
do the processing once the data has been streamed to the nearest computer ? or should I use an expensive video card, some CCTV
camera
and a frame grabber to digitize photos so they can be processed afterwards. I expect my processing algorithms to handle at least 15 frames per second framerate once they are working ont the final
set-up.
My constraints are that I would like to avoid as much as possible complex set-ups even if that means buying a more expensive camera set-up. For the prototyping, I would like to try my algorithms out using a combination of python and matlab (all very slow) and then expect the same architecture (image files location and flow) with speedier set-up like python+psyco or C. All the processing would be done on a computer dedicated for that. Windows or Linux are
possible.
An easy approach to this is to use a wireless camera on your robot,
with
the receiver attached to a frame grabber on a remote host. This
allows
you your choice of camera (stand alone video transmitters are widely available), and you are not limited to only processing hardware you
can
carry on board your robot. You also get full FPS. Frame-grabber cards
are inexpensive and widely available for both Windows and Linux.
I wanted to go down that path but cannot get information on how to access the images from the tv receiver card in real time using my own software.
Do you use Java?
John Casey
I do, but not for image processing. There IS a multi-media SDK out there for java that handles video capture -- google should help you out here (I can't recall the site). I'm not entirely sure how mature it is. I looked a couple of years back and decided to avoid it. It likely does not support all platforms, since video capture drivers vary a good bit by platform. This all may have changed, however.
On Windows, you'll use DirectShow (part of DirectX) to get incoming frames. There's also the deprecated VFW (Video for Windows).
On linux, there's Video for Linux.
In either case, the APIs are not difficult to use. You should never have to access the hardware directly.
Note that whether you get the video from a webcam or framegrabber, the APIs are the same. I've actually abstracted some of the DirectX stuff out to the point that I can get frames from a video file *or* a camera the same way.
-- (Replies: cleanse my address of the Mark of the Beast!)
Teleoperate a roving mobile robot from the web: http://www.swampgas.com/robotics/rover.html -- http://mail.python.org/mailman/listinfo/python-list