Slashdot Mirror


Computer Vision Applications and Linux?

blackcoot asks: "I'm about to start work on a summer project with my advisor, part of which involves getting a lab set up for real time (or as close as we can get) computer vision applications. Currently, the only machines in the lab with digital video cameras attached to them are Win2k boxen, and that's only because we haven't been able to find reasonable drivers for the firewire cameras that we have. My advisor and I would much rather *not* write our own driver for these cameras; right now my advisor has the budget for a couple reasonably inexpensive cameras. This leads me to a couple questions: are there firewire (or equivalently high bandwidth bus) based digital video cameras (not framegrabbbers) out there that have reasonably solid Linux or Video4Linux drivers; have any Slashdot readers tried to build a vision type application under Linux (something that does more processing than Xaw TV); Am I setting myself up for a whole world of pain trying to make this happen under Linux, or is it doable? Any words of wisdom? Your help is much appreciated."

4 of 16 comments (clear)

  1. Did you look in the kernel sources? by zenyu · · Score: 3, Interesting

    I've written a vision program in linux and later one in Windows, I can't see ever doing the windows thing again. By the end of the project I had spent much more time on Windows annoyances than it would have taken to write a linux driver.

    Why not use a solid framegrabber like the Osprey? Do you have some super high res progressive scan cameras or something? Most vision research is done on prerecorded video so I'm assuming your doing some real-time tracking. If this is a short 2-4 month project and you need the firewire cameras sticking with the working Windows setup might be the answer. If it's longer there is at least one good book on writing linux drivers (there are pointers in the kernel Docs.)

  2. Depends on what kind of camera by Omega+Hacker · · Score: 3, Informative

    If you're referring to webcam or scientific-style cameras on the Firewire bus, they are supported by programs like Coriander through the libdc1394 interface and corresponding kernel drivers.

    If you're talking about consumer-grade video camcords (aka MiniDV), you'll use the dv1394 interface and corresponding kernel modules, plus libdv [one of my projects] to decode the images (on a fast enough machine, about 700MHz PIII pegged still).

    I haven't heard of any other types of firewire cameras, so if you have something that doesn't fit into one of these two categories, you got shafted IMO.

    Depending on your processing requirements as far as data-flow, you may want to look at GStreamer, another of my projects, to plug together the DV device interface, DV decoder if necessary, and your processing components.

    All of these are found on sourceforge under the names given, putting that many URLs into the comment when I'm this awake would be bad ;-)

    --
    GStreamer - The only way to stream!
    1. Re:Depends on what kind of camera by isaac_akira · · Score: 3, Informative

      There are lots of consumer-grade firewire webcams out there, and they should all work with linux (yay standards!). They use the same libdc1394 interface as the scientific cameras do. I'm using the Fire-i cam from unibrain.com, which cost about $130, but there are several others at that price range.

      This site has a lot more info on linux and firewire:

      http://linux1394.sourceforge.net/hcl.php

      p.s. it actuallys work. ;-) i'm running 320x240 YUV422 video into my image processing app at 30 frames a second. 640x480 works too, but it looks a bit grainy (the fault of my camera's lens and ccd) and that's too much info for my app to process anyway.

  3. What's your application? by jd_esguerra · · Score: 3, Insightful

    If this is strictly a summer project (for you) and you have very little computer vision experience, I recommend spending your time learing basic computer vision algorithms/processes. They are pretty much the same from platform to platform. Regardless of the OS, get a student copy of Matlab and the Image Processing Toolkit. It won't do real time stuff, but it makes algorithm development and experimentation REALLY easy. Once everything has been fleshed out, convert to C,C++. It sounds like you are building a generic rig for a variety of experiments. For real time vision, a framegrabber is recommended. This combo might be a bit more expensive up front, but the framegrabber software will get you up and running more quickly than having to write your own driver. (I doubt you will learn much computer vision writing device drivers.)The Mutech MV-1000 has decent linux support, and does not cost too much. ($1500?) Look at Matrox too. Other practical things to consider: The "linux comfort level" of people who will be taking over your project in the fall, interchangable lenses, GOOD lighting (very often overlooked), color or grayscale, quality of images/data. I'm working on a stereo vision system for autonomous mapping/navigation. I do much of my initial algorithm development in linux/Matlab using images from 2 defective USB webcams. Once the rest of the $$$ comes in, almost everything will be converted to C under win2k/matrox. The non real-time stuff, like camera calibration, and NN training will remain Matlab. Summary: If you are planning on doing a lot of computer vision stuff, go ahead and spend time playing with your hardware/software options. If this is a 3-4 month fling, start writing/playing with computer vision routines as soon as possible.