QuickCam Team Forums

Full Version: Aquiring image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm doing a class project in which I want to target an object with a laser pointer using a webcam for the image input. Since the focus of the project is more on the image processing and control aspects, I'm hopeful that using libwebcam can help avoid needing to learn the details of the V4L2 API.

I have at least one rather embarrassingly basic question, though -- how do I actually acquire an image? So far as I can tell, all of the libwebcam functions are related to detecting and setting parameters for the camera. Do I need to switch over to V4L2, set up buffers, and use ioctl's to get the images, or is there a way within libwebcam to do it?

Once the camera's set up, can I just pull images from /dev/video0?

There's a lot of aspects to this project that are firsts for me, and I'll freely admit that I'm a bit lost.

I'm using a Logitech Communicator Deluxe, which seems to only support mmap. According to luvcview it supports YUYV and MJPEG (is it doing the compression in the camera?)

Thanks for any help, advice, or feedback.
You are correct, libwebcam is not for streaming, for that aspect you'll need to use V4L2.

However, for your case I really suggest you look into one of the frameworks that make video acquisition a lot easier. GStreamer is one of them but the best one I know for this kind of project is unicap. You will see that it also has a viewer software (ucview) as well as an interface for image processing. Pretty much all you need. :-)
Thanks for the reply. I switched over to using the OpenCV (Open Computer Vision) library, which includes enough high-level camera control for my needs. Thanks!
Reference URL's