Set capture device EmguCV

后端 未结 2 1024
野趣味
野趣味 2021-01-03 08:44

I´m using class Capture from EmguCV to take images from a WebCam.

According to the documentation of the class (http://www.emgu.com/wiki/files/2.0.0.0/h

2条回答
  •  再見小時候
    2021-01-03 08:55

    Examining the EMGU CV source seems to indicate that it's just passing the index off to the underlying OpenCV library, as part of the cvCreateCameraCapture (int index) function. That function is... A bit of a mess of #ifdefs, but from what I can see (and from what the comments indicate), the index is used to specify both the camera you want, and the API it should be using.

    Try successively trying multiples of a hundred; each should use a different codec, attempting to use the first camera. It may be that you have one of the APIs listed compiled into your copy of OpenCV, but not working correctly on your system.

    Edit: Drilling down further, it seems like it ends up at this function call, which uses the MFEnumDeviceSources function to get the list. The device you wanted is then returned out of that list (see the getDevice function a few lines higher up). So, it looks to me like the dialog you mentioned in your comment is part of Windows' MediaFoundation stuff, in which case you might want to google the wording of the message, see if some people with more experience with MF can point you in the right direction.

提交回复
热议问题