Closed FrancescoBonizzi closed 4 years ago
I am not sure about the WMI code, but regarding the order in which the devices are stored, this C++ library doesn't need to order anything, as it enumerates directly from the operating system, which provides said order.
I understood, thanks: Windows just gives the list in that order.
I asked you that because with WMI Windows lists the devices with always the same order, maybe it is sorting by name or something else, while OpenCv sorts by the connection date of the device. I noticed that because if I have 2 webcams, the second plugged has always the id 1
.
Thanks for your work!
Hi and thanks for you project!
Since I'm not good with C++, neither with low level Windows libraries, I'd like to ask you two questions, please.
What's the difference between your code and the builtin Windows
WMI
camera enumeration? (Here it is C# code)public class CameraDevice { public int OpenCvId { get; set; }
}
== VIDEO DEVICE (id:0) == Name: HD Pro Webcam C920 Path: \?\usb#vid_046d&pid_082d&mi_00#7&3561b19d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
== VIDEO DEVICE (id:1) == Name: FLIR USB Video Path: \?\usb#vid_09cb&pid_1007&mi_00#6&1e15415f&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global