IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.53k stars 4.81k forks source link

Is it possible to turn the IR emitter into a uniformed illuminator for d435 #10758

Closed gzhxxx closed 2 years ago

gzhxxx commented 2 years ago

hello! I'm recently using the D435 for SLAM. As is known that the IR emitter will confuse the slam algorithm, so I have to turn it off. But in dark enviroment, I have to add additional LED illuminators. So I am wondering if I can change the emitting pattern of d435, just to make the light uniform with no speckle patterns. Thanks a lot!

MartyG-RealSense commented 2 years ago

Hi @gzhxxx The noise phenomenon known as laser speckle is inherent to laser-based dot pattern projectors such as the one equipped in RealSense cameras. If an IR pattern projection is required, you could turn off the built-in projector and use an external LED pattern projector instead. More information about this can be found in Intel's white-paper guide about use of projectors with 400 Series cameras at the link below.

https://dev.intelrealsense.com/docs/projectors

Alternatively, you could try setting the projector's IR Emitter to Always On. The projector in the D435 / D435i pulses in line with exposure, whilst the D415's projector is always on. Setting the IR Emitter to Always On = true makes the projector emulate the D415 projector's always-on behaviour.

The projected pattern will also be less visible to the camera if the Laser Power option's value is reduced below its default of '150', at the cost of possible reduced detail on the depth image.

gzhxxx commented 2 years ago

@MartyG-RealSense Thanks a lot for answering. I would like to ask more questions if you do not mind. Till now, I have tried the following three ways:

  1. Just turn off the built-in IR Emitter, and add another LED illuminator with 60 degree angle (power: 3W). The infrared images seem to have good quality in dark enviroment, but the size and power supply heavily increases.
  2. Add a convex lens behind the IR Emitter and turn on the built-in Emitter. The laser seems to converge with a specified angle. However, the light seems not uniformed. So I gave up.
  3. Add a diffuser behind the IR Emitter and turn on the built-in Emitter. The illumination power seems attenuated a lot.

    According to the above-mentioned attempts, I did not find an optimal way.

    But I did not know the ways d435 used for IR Emitter. If there is a field-programable projector in the Emitter, I believe we can change a projection pattern.

    Thank a lot again!

MartyG-RealSense commented 2 years ago

The Laser Speckle section of the projector white paper provides some technical advice about how speckle noise might be reduced.

https://dev.intelrealsense.com/docs/projectors#10-laser-speckle

The paper's Conclusions section advises that "non-coherent light sources will lead to best results in terms of depth noise but they cannot normally generate as high contrast pattern at long range. Even when all speckle reduction methods are employed it is not uncommon to see a passive target or LED projector give >30% better depth than a laser-based projector".

As method 1 with the IR illuminator in your comment above demonstrates, 400 Series cameras can make use of any visible or near-visible (IR) light sources in a scene to analyze surfaces for depth detail as an alternative to using the dots of the projected pattern for that analysis. As you mention, projector size and power become issues with external projectors though.

In regard to method 2, if a transparent window is placed over a lens then there may be back-reflections from the laser unless both sides of the transparent cover material have an anti-reflective coating applied, as advised by a RealSense team member at https://github.com/IntelRealSense/librealsense/issues/2566#issuecomment-431852571

socome commented 2 years ago

@gzhxxx

Hi! I have a question about your solution. Why do you use LED illuminators instead of additional IR Emitter/illuminators...?

MartyG-RealSense commented 2 years ago

Hi @gzhxxx Do you require further assistance with this case, please? Thanks!

gzhxxx commented 2 years ago

@MartyG-RealSense Thanks very much for help. I have no further questions.

gzhxxx commented 2 years ago

@socome Hello! I am using realsense for SLAM, so the feature of the scene should be fixed. The illumination is considered to improve the performance in low-light enviroment.

MartyG-RealSense commented 2 years ago

Thanks very much @gzhxxx for the update and for giving @socome advice about their question. As you do not require further assistance, I will close this case. Thanks again!