How to take a still photo in either DirectShow or

2019-05-04 00:48发布

问题:

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.