Take picture using webcam from command line [closed]

一世执手 提交于 2019-12-03 06:08:13
jörg

You could use OpenCV to build such a command line application yourself. Basically you would use captureFromCam() to initialize the camera and then call QueryFrame() to capture a picture. Should be straightforward.

I know this is an old discussion, but maybe you arrived here like I did recently looking for a simple command line app to capture a snapshot image from a webcam in Windows. If so, have a look at the following post on my blog:

http://batchloaf.wordpress.com/2011/04/06/snapz-a-command-line-cam-image-grabber/

It's about a little program called snapz that I've just written to take a snapshot from a USB camera in a batch file. It's really basic - when you run it, it snaps a 640x480 image from the default video capture device (e.g. webcam) and saves it to the current directory. It's free and easy to use.

The question itself is not programming related, just a request of some hardwares bundled softwares documentation.

I will answer the question as it WAS a programming question.

If you talking about webcams on a windows OS you can use DirectShow as in this example:

http://www.codeproject.com/KB/audio-video/WebcamUsingDirectShowNET.aspx

Just create a console application in visual studio that takes some commandline parameters and let it use the code in the example and you are on your way.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!