Thank you for your interest in the Intel RealSense Technology.
We have received your request and are currently investigating.
I will get back to you as soon as possible.
After looking through your query and details, it seems that the PC embedded camera is also being detected and is camera 0.
This is why you are receiving wrong resolution values and multiple cameras. You are seeing the embedded camera of the PC and the Intel RealSense Depth Camera D435. Could you maybe try running the command: rs-enumerate-devices and tell me the output?
The following github thread may also have additional information: https://github.com/IntelRealSense/librealsense/issues/1159
Let me know how this turns out.
Upon further testing, I realized that the issue still persists.
Indeed, there are two devices on my system, the 1st neumerated being the D435 and the 2nd being the laptop camera. So, by chance, the D435 Sensor was being enumerated as device.. Also, when I check the serial number of the selected device, it matches my D435 Sensor.
As far as loading the json file, I am at a loss; just dont know what the issue is. Any assistance is apprecaited.
As far as getting the resolution of the image, I figured out what the problem is, but dont know how to fix. The problem is that I am passing an uninitialized stream_profile pointer to the rs2_get_video_stream_resolution (See the line highlighted in green below). The ColorImageProfile is declared but not set to any value!
Rs2Error = 0;
printf("ALV_IntelRealsenseRS2 : ALV_IntelRealSenseRS2_Initialize : Failed to get the image resolution : %s\n", rs2_get_error_messag(Rs2Error));
How do I initialize the ColorImageProfile?
Thank you for your reply. I am still investigating the json file issue and will give you an update as soon as possible.
Regarding the rs::stream_profile, please have a look at my answer in the community thread:
Thank you for your patience.
In regards to loading a JSON file, I found the following guide: https://github.com/IntelRealSense/librealsense/blob/master/doc/rs400/rs400_advanced_mode.md
This guide provides a way to serialize and load parameters, using a JSON file structure.
Let me know if this is helpful.
Supposing you're on linux, you can try this :
Find out the device string of the webcam you want to disable:
for device in $(ls /sys/bus/usb/devices/*/product); do
echo $device; cat $device;
This will show result lines like this:
In which case the device string we look for is 1-1.6.
Disable the webcam using your device string in a command like this:
echo '1-1.6' | sudo tee /sys/bus/usb/drivers/usb/unbind
To enable your webcam at a later time, use your device string in a command like this:
echo '1-1.6' | sudo tee /sys/bus/usb/drivers/usb/bind
Thank you for your follow-up.
As it turned out, the problem was that somehow the documentation gave me the impression that the parameters passed into the load_json API is the path to the file, whereas it is a serialized version of the content of the file! Once I serialized the content, it all worked.
I developed my own serialization code, but my suggestion is that the SDK should provide a standard API for doing so.