5 Replies Latest reply on May 11, 2018 12:28 AM by MartyG

    Interleaving Capture With Projector On/Off using D435

    philipcase

      Is it possible to configure the D435 to alternately capture images with the projector turned on and off?

       

      I am working on an application where I would like stereo images from a D435 without the presence of the projected dots, but also need good depth information which the projector helps with. I am curious if it is possible to configure the D435 to enable the projector on every other frame. I am concerned that software control would be too slow or not reliable at achieving this, but can give that a try if it is the best option.

       

      Thanks,

      Philip

        • 1. Re: Interleaving Capture With Projector On/Off using D435
          MartyG

          It is possible to turn the projector on and off and others have done it before.   I generally advise against it though if you are going to do it multiple times each time that you run the application, as you will probably shorten the lifespan of your camera's projector.

           

          An alternative to alternating the projector is to use an external shutter with the camera, though these can be expensive and would not be the optimum solution if you plan to distribute your application, since every user would need a shutter.

           

          Intel are working on support for the hardware triggers in the camera, and that feature is due to be released in the next month or so, I believe.

           

          External Device GPIO headers for D435

          • 2. Re: Interleaving Capture With Projector On/Off using D435
            philipcase

            Thanks for the suggestions.

             

            I tried implementing this in software, but am not satisfied with the results. Basically each time a frameset is received by the callback in base_realsense_node.cpp, I do the following:

             

                            if(_sensors.find(DEPTH) != _sensors.end()) {

                                rs2::sensor sensor = _sensors[DEPTH];

                                sensor.set_option(RS2_OPTION_EMITTER_ENABLED, toggle);

                                toggle = !toggle;

                            }

             

            This does turn the projector on and off, but the video stream latency becomes very high(several seconds), and the frame rate becomes very low(less than 1 Hz). This is with both infrared, and the depth streams enabled and set to 6 Hz. I am using camera firmware(05.09.09.02), librealsense(2.10.4), realsense-ros(2.0.3).

             

            Any suggestions about better ways to try implementing this in software?

             

            Is support for this kind of thing on the camera on the road map?

             

            I think we are going to pursue a hardware solution also.

             

            Best,

            Philip

            • 3. Re: Interleaving Capture With Projector On/Off using D435
              MartyG

              At present, the recommended alternative to turning the projector on / off to remove the dots is to reduce the 'laser power' setting.  This reduces the visibility of the dot pattern.  This adjustment can be done with scripting.

               

              API How To · IntelRealSense/librealsense Wiki · GitHub

              • 4. Re: Interleaving Capture With Projector On/Off using D435
                philipcase

                I tried adjusting the laser power rather than enabling/disabling the emitter. The results are the same however.

                 

                I am seeing the following print periodically:

                (backend-hid.cpp:1091) Failed to read busnum/devnum. Device Path: /sys/bus/iio/devices/iio:device0

                 

                The video stream continues, but at low frame rate and high latency. This happens with either setting RS2_OPTION_LASER_POWER, or RS2_OPTION_EMITTER_ENABLED and does not occur if no settings are changed.

                • 5. Re: Interleaving Capture With Projector On/Off using D435
                  MartyG

                  I checked the SDK 2.0 release notes.   There is a Known Issue that hasn't been fixed yet that states "Relatively high CPU utilization on Linux when running without laser power ".  This may be related to your lag problems if it only occurs when changing the emitter.