1 Reply Latest reply on Jul 18, 2018 3:13 AM by MartyG

    how to turn off auto_exposure and set a exposure value on D415

    Guosen

      I am using the python wrapper for a project, where I want to set the enable_auto_exposure first so that the camera can adjust to the proper exposure value, then disable the setting and confirm to use the adjusted exposure. However, it does not work. It seems like the auto_exposure only adjust something else but actually not tuning the exposure value.

       

      could someone show me the example code ?

        • 1. Re: how to turn off auto_exposure and set a exposure value on D415
          MartyG

          There was another discussion where somebody was turning off auto-exposure and using manual exposure.  You may be able to adapt their code to achieve your goal.

           

          Manual Exposure Modification d415

           

          For example, you could first disable automatic exposure with  sensor.set_option(RS2_OPTION_ENABLE_AUTO_EXPOSURE, false);

           

          Then get the current exposure (the last value set before auto-exposure was disabled):

           

          sensor.get_option(RS2_OPTION_EXPOSURE);

           

          And make a custom-named manual exposure variable (such as the new_exposure used in that linked-to case) equal to the current exposure value above.  Something like this structure:

           

          new_exposure = sensor.get_option(RS2_OPTION_EXPOSURE)

           

          And set the exposure manually using that custom variable:

           

          sensor.set_option(RS2_OPTION_EXPOSURE, new_exposure);