take picture from webcam c#

烈酒焚心 提交于 2019-11-28 09:06:14

问题


I'm streaming video to my Window Form with DirectShowLib. I also want to save image when i press button "Save" for example. How to get picture from webcam with DirectShowLib methods or with WIN32 API methods?


回答1:


DirectShow.NET Samples are there: http://sourceforge.net/projects/directshownet/files/DirectShowSamples/2010-February/ The following sample demoes the requested function:

Samples\VMR9\vMR9Snapper ------------------------ This sample shows how to capture bitmaps from VMR9.

Having it working with other renderer might require small code modifications.

The question also discussed a multitude of times at MSDN Forums, and on CodeProject, e.g. how to save bmp file from IVMRWindowlessControl9->GetCurrentImage().



来源:https://stackoverflow.com/questions/7887910/take-picture-from-webcam-c-sharp

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