How to take a still photo in either DirectShow or Media Foundation

◇◆丶佛笑我妖孽 提交于 2019-12-10 09:28:02

问题


Is there a way to make a photo (still image) with either DirectShow or Media Foundation APIs?

I got video capture working and I can just capture the very first frame and call it a day, but that's not what a photo is. Usually cameras have distinct video and photo modes, where photo mode allows for a lot greater resolution.

For example, I have Logitech HD Pro Webcam C920 and it claims to allow to do 15mp photos. The software that came with it takes 5168x2907 photo images. So far I haven't seen any photo mode in DirectShow or Media Foundation, and the highest resolution I can take with that webcam in a video mode using either DirectShow or Media Foundation is 2304x1536 with 2 FPS in either RGB24 or I420.


回答1:


Looks like one must look for output pin of PIN_CATEGORY_STILL. There is also a msdn article Capturing an Image From a Still Image Pin.



来源:https://stackoverflow.com/questions/31483640/how-to-take-a-still-photo-in-either-directshow-or-media-foundation

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