I want to access the webcam so I can do some precessing on the images, like tracking a light, but I can't find a way to access the webcam. I googled it but I got confused.
Can you point me to a library that can do that (windows)? and maybe also provide an example?
I would need to periodically get a pixel map of the image, about 20 time per second or so if it would be possible.
Webcam software enables users to record a video or stream the video on the Internet.
A webcam is a digital video device commonly built into a computer. Its main function is to transmit pictures over the Internet. It is popularly used with instant messaging services and for recording images. *Note: The instructions for this webcam are specific to a brand and may vary for other brands and products.
You need DirectShow. This is a Windows framework for video playback and capture.
It's included in Windows SDK and there are many samples for video input capture included.
But, as Vijay mentioned, you can also try using OpenCV since it not only abstracts away the platform-specific video capture API, it also includes many image processing algorithms you could use to track the light in your project.
There's a wrapper for DirectMedia/DirectShow called Extremely Simple Capture API or ESCAPI. If you don't need to do anything complicated, ESCAPI might be a good bet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With