Society of Robots - Robot Forum

Software => Software => Topic started by: vipulan12 on February 16, 2013, 07:04:15 PM

Title: Cams for Visual processing
Post by: vipulan12 on February 16, 2013, 07:04:15 PM
Hey guys what camera do you recommend for visual processing
I have heard about the CMU cameras but what about webcams?

How would you program a webcam for visual processing in C or C++?
Would you need libraries or something?(or OPenCV)
Title: Re: Cams for Visual processing
Post by: jwatte on February 17, 2013, 11:05:08 PM
Typically, you read an image stream from a camera using a platform specific API. On Windows, it's either DirectShow, or Windows Media Foundation, IIRC. On Linux, it's video4linux2, which ends up being a single header file with some ioctl() structures and control codes.
OpenCV has some classes for working with webcams and Kinect cameras and a few others. This means you don't have to learn your platform-specific video capture API, but instead the OpenCV API.

Any camera will give you pictures. The more expensive cameras typically have various features not found on the cheaper ones:
- higher-quality sensors with less noise
- better frame rates
- better optics
- spatially calibrated for specifc capture transform (for specific computer vision cameras)
- stereo capable (for specific computer vision cameras)
- more robust
- etc

Often, because of the cost advantage of the mass market, a more expensive camera may give you one particular feature (say, stereo) but actually be worse in all the other respects. However, if you need that feature, well, you're stuck between a rock and a hard place :-)

Title: Re: Cams for Visual processing
Post by: vipulan12 on February 20, 2013, 02:31:55 PM
do you know any good tutorials for the process you said
Title: Re: Cams for Visual processing
Post by: jwatte on February 20, 2013, 07:29:45 PM
Start here perhaps? http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html (http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html)
Title: Re: Cams for Visual processing
Post by: vipulan12 on February 21, 2013, 06:55:19 PM
 I know this is a dumb question but how do you import open CV
I know you have to include it in the code but  don't i need to move the file somewhere like a specific library file(similar for inputting libraries for the arduino)
I am using ecllpse as my IDE on C

and do you think I should python instead for programming?
Title: Re: Cams for Visual processing
Post by: newInRobotics on February 22, 2013, 01:21:02 AM
What are You programming for, PC or microcontroller?
Title: Re: Cams for Visual processing
Post by: vipulan12 on February 23, 2013, 11:06:22 AM
I want to program for the computer
Title: Re: Cams for Visual processing
Post by: vipulan12 on February 25, 2013, 03:13:13 PM
so How can I do it If i were yo do it on windows and would any webcam be good for visual processing or is their a specific feature i should for when buying a webcam
would this webcam be good?
http://www.futureshop.ca/en-CA/product/hewlett-packard-hp-webcam-hd-3310-a5f62aa-abl-hp-webcam-hd-3310/10235018.aspx?path=9fade7b06206468176a9a5da5277085een02 (http://www.futureshop.ca/en-CA/product/hewlett-packard-hp-webcam-hd-3310-a5f62aa-abl-hp-webcam-hd-3310/10235018.aspx?path=9fade7b06206468176a9a5da5277085een02)

and jwatte what exactly is a CMake file?
Title: Re: Cams for Visual processing
Post by: jwatte on February 25, 2013, 09:00:10 PM
The opencv site has tutorials. Read them!
Google has much better explanations of CMake than I do.
Cameras are a cost/benefit trade-off, where each 0 you add to the cost gives some small benefit you probably won't need when starting out.