Software Archive
Read-only legacy content
17061 Discussions

Getting list of available RealSense devices

jb455
Valued Contributor II
580 Views

Hi,

In my application I have some code borrowed from the RawStreams sample which retrieves a list of RealSense devices currently available so if a user has an F200 and an R200 installed and attached, for example, they can choose which one they want to use. However, the code doesn't only get RealSense devices, it also returns any other cameras currently attached, so if it's running on a laptop or tablet it'll return the device webcam(s) too.

Is there any way to determine whether a device is RealSense-capable or not? I don't want to do anything like "if device.name.contains("realsense")" because what if it gets rebranded etc? I notice that in the deviceInfo, the DUID for my R200 is some long number whereas the same for my device webcam is 0. Will it always be the case that a non-realsense device will have a DUID of 0? Or is there a more robust marker? I don't want to have to change my code each time a new device comes out.

Thanks,

James

0 Kudos
2 Replies
Dmitry_Z_Intel
Employee
580 Views

James, you can use QueryDeviceInfo API and check model field.

0 Kudos
jb455
Valued Contributor II
580 Views

Thanks both, looks to be working well.

0 Kudos
Reply