Ask Your Question

Revision history [back]

VideoCapture with CAP_DSHOW for camera path

Hello, I want to initialize VideoCapture class with arguments const String &filename, int apiPreference = CAP_DSHOW. I want to use camera device path (my camera: "\\?\usb#vid_041e&pid_4095&mi_00#6&26faed27&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"). Is there any way to use VideoCapture with camera device path and apiPreference CAP_DSHOW? I have checked that CAP_DSHOW is correct apiPreference for my camera (it works when I create VideoCapture with index argument). I know that when I create VideoCapture I should use double "\\" for string. I have checked source files for OpenCV 3.3 and I don't see possibility to create VidecoCapture with filename argument and apiPreference = CAP_DSHOW. Anybody know how to do it? I'm using Windows 10 and Opencv 3.3.