How to let user select a video recording device (web-cam) with OpenCV?

后端 未结 3 2008
情书的邮戳
情书的邮戳 2021-01-02 16:50

So what I need is something like capture devices list.

And some function to get from user on which device he wants to stream.

How to do such thing with open

3条回答
  •  灰色年华
    2021-01-02 17:34

    Try using some OS functions to enumerate webcams. It might take some work, but this approach will guarantee that you get a list every time (unlike the OpenCV hack, which sometimes doesn't work, for some reason).

提交回复
热议问题