Get/set video resolution when capturing image

非 Y 不嫁゛ 提交于 2019-12-08 06:08:41

问题


I'm capturing images from my webcam with some code that mainly bases on this: Using the Sample Grabber.

Here I only get the default resolution of 640x480 while the connected camera is able to show more (other capture applications show a bigger resolution).

So, how can I:

  1. retrieve the list of available resolutions
  2. set one of these resolutions so that the captured image comes with it?

回答1:


IAMStreamConfig interface lists capabilities and lets you select resolution of interest. enumerating media types on an unconnected yet pin will list you specific media types (amd resolutions) the camera advertises as supported.

More on this (an links from there):

  • Video recording resolution using DirectShow
  • Video Capture output always in 320x240 despite changing resolution


来源:https://stackoverflow.com/questions/15963967/get-set-video-resolution-when-capturing-image

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