How to program webcam?
Hello Sir,
How to get image from webcam by linux c or c++ program? I have a netbook which comes with a webcam, however, how to identify it to be which device file in /dev? Is there any bash command to detect this? BR, Terry |
Hi there,
First find out if the web cam streams video or not? Typically they would stream the video to a particular port. You can then open a Socket in C++ on that port and get the video data. Most webcams should be able to do this. The main thing here is you need to understand what video format does the webcam use and how to process it. Silverlight or DirectX will help as they can directly listen at the particular port, but you have not mentioned which OS you are using. In case the web cam does not stream it should at least have the feature to save video to a file. In this case also find out the video format and that should help you decide which API to use. |
Take a look to the V4L2 interface API, maybe it handles webcam, and if so I think it's the way to go
|
open a terminal type ( gstreamer-properties ) click enter
click video tryv4l1 or v4l2 this is to see what it use for a driver get a program like ( cheese or wxcam ) to make movies or take a picture vlc player can do stream too |
All times are GMT -5. The time now is 09:25 PM. |