View my account

Setting D405 Camera Exposure in Python

Comments

1 comment

  • MartyG

    Hi Kvuong  RealSense cameras have a fixed physical shutter speed that cannot be changed, so changes in shutter speed can be simulated by setting a manual exposure time.

     

    White balance is an RGB option, and the D405 camera model does not have a dedicated RGB sensor.  The RGB image is instead provided by obtaining it from the depth sensor and passing it through an Image Signal Processor (ISP) chip inside the camera to generate the final RGB image.

     

    Because the D405's RGB image comes from the depth sensor, D405 does not have dedicated auto-exposure and manual exposure settings.  RGB exposure on D405 is instead configured by changing the depth exposure value.  

     

    Increasing the D405's depth exposure value (which has a default value of '33000') brightens the RGB image and reducing the value darkens it.  You can test this in the RealSense Viewer by enabling both the depth and color streams and changing the exposure value under the Stereo Module > Controls section of the options side-panel.

     

    Usually when accessing the RGB, the sensor is given an index number of '1'.  As there is no RGB sensor on D405 though, the depth sensor index of '0' is used instead to set the exposure.  Below is some Python example code.

     

    # Get the sensor once at the beginning. (Sensor index: 0)
    sensor = pipeline.get_active_profile().get_device().query_sensors()[1]

    # Set the exposure anytime during the operation
    sensor.set_option(rs.option.exposure, 33000)
    0
    Comment actions Permalink

Please sign in to leave a comment.