How to capture 8MP still image from a Microsoft LifeCam programatically?

跟風遠走 提交于 2019-12-11 23:09:43

问题


I have a Microsoft LifeCam that is capable of capturing 8MP (3840 x 2160) still jpg images.

Using the software that comes with the LifeCam when you switch to this mode then video capture is disabled. It is intended for still photos only. Video capture only goes up to 1280 x 720.

I can't see how to get access to the functionality using any method other than the supplied software. When inspecting the capture device in GraphEdit there is only 1 pin (called "capture") and it only supplies video.

How can I access this functionality (preferably using C#)?


回答1:


DirectShow is intended for video capture (streaming video), not stills. For stills you need to use different API: Windows Image Acquisition (WIA).

My understanding is that highest resolution is achieved using post-processing, such as superresolution and interpolation, and this mode is not available through streaming video driver.

The spec says it's 5MP only. WIA (and TWAIN) driver availability might be subject to operating system version. Due to USB bandwidth limits maximal resolution - even non-interpolated - can be limited to compressed video formats. This post - Can't make IAMStreamConfig.SetFormat() to work with LifeCam Studio - enumerates modes and shows that this model supports up to Full HD (1920x1080) resolutions.



来源:https://stackoverflow.com/questions/13494202/how-to-capture-8mp-still-image-from-a-microsoft-lifecam-programatically

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