Items with no label
3338 Discussions

D435 camera effected by change in lighting.

JRomu
Novice
2,758 Views

Hi,

I received my D435 last Friday. I was able to set it up and write my own application in no time using librealsence using C++ with OpenCV. It is pretty much straight forward as there were lot of helpful examples shown in Git Club.

It has a wide view angle than other similar products available in the market and I was able to use 5mtrs extension cable and still able to get the streams with out any problem.

Only problem I am facing is IR stream which I use for my application is effected by change in lighting condition, which makes product unusable for my application.

I love this product for robustness, compact size and wider view angle but unfortunately I am unable to use it in my application. If not for this issue it would have been a better replacement for Kinect.

0 Kudos
5 Replies
MartyG
Honored Contributor III
1,539 Views

Your problem may be solved if you simply turn off the auto exposure setting and let exposure and gain be determined by settings you have defined manually. You could also try turning off the IR Emitter component that assists the IR Sensor with exposure.

Edit: if you want to try doing it in the RealSense Viewer, the bottom of the image below shows the options for the emitter and auto exposure that you can toggle.

0 Kudos
JRomu
Novice
1,539 Views

HI Marty,

Thanks,

Where can find the code to do same within my application?

Best Regards

JR

0 Kudos
MartyG
Honored Contributor III
1,539 Views

Code for controlling the emitter on-off is here, under the 'Librealsense2' heading:

https://github.com/IntelRealSense/librealsense/wiki/API-How-To# controlling-the-laser API How To · IntelRealSense/librealsense Wiki · GitHub

Auto-exposure can be disabled with the instruction RS2_OPTION_ENABLE_AUTO_EXPOSURE

The link below discusses turning off auto-exposure and defining manual settings.

0 Kudos
JRomu
Novice
1,539 Views

Hi MartyG,

Thank you. Yes it is working. It is not effected by turning On / Off the light.

I added following code at start of program;

Quote

rs2::context ctx;

rs2::device_list devices = ctx.query_devices();

int dev_id = 0;

rs2::device dev = devices[dev_id];

std::vector sensors = dev.query_sensors();

sensors[0].set_option(RS2_OPTION_ENABLE_AUTO_EXPOSURE, false);

auto depth_sensor = dev.first();

depth_sensor.set_option(RS2_OPTION_EMITTER_ENABLED, 1.f); // Enable laser emitter

Unquote

I am only using the depth data and it is better than before.

Thanks once again.

JR

0 Kudos
MartyG
Honored Contributor III
1,539 Views

Awesome! It's great news that it's working for you. Thanks too for sharing your code for others to see.

0 Kudos
Reply