3 Replies Latest reply on Jun 9, 2017 4:56 AM by MartyG

    exposure level

    cheweilin

      Hi folks,

       

      Does librealsense provides any APIs for adjusting SR300 IR camera's exposure level/parameters ?

       

      Thank you !

        • 1. Re: exposure level
          MartyG

          A Librealsense script called cpp-config-ui contains code for adjusting the exposure.  Lines 378 to 397 of the script should be particularly interesting to you.

           

          librealsense/cpp-config-ui.cpp at master · IntelRealSense/librealsense · GitHub

           

          Although the script uses auto-exposure, you should be able to convert it to manual exposure control by changing

           

          case RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE: return set_pu<uint8_t>(handle, subdevice, ct_unit, UVC_CT_AE_MODE_CONTROL, value ? 2 : 1); // Modes - (1: manual) (2: auto) (4: shutter priority) (8: aperture priority)

           

          to

           

          case RS_OPTION_COLOR_EXPOSURE: return set_pu<uint8_t>(handle, subdevice, ct_unit, UVC_CT_AE_MODE_CONTROL, value ? 2 : 1); // Modes - (1: manual) (2: auto) (4: shutter priority) (8: aperture priority)

          • 2. Re: exposure level
            cheweilin

            Hi MartyG,

             

            Thanks for your reply,

             

            i've checked the example cpp-config-ui, it shows a demo to control the exposure for RGB camera,

            Does IR camera as well provides some APIs like that ?

             

            Thank you

            • 3. Re: exposure level
              MartyG

              I believe Librealsense's IR control options mostly relate to the R200 model of camera.  Instead, the SR300 camera is provided with commands to control the camera's range automatically.  These include:

               

              sr300_auto_range_enable_motion_versus_range

              sr300_auto_range_enable_laser            

              sr300_auto_range_min_motion_versus_range   

              sr300_auto_range_max_motion_versus_range   

              sr300_auto_range_start_motion_versus_range  

              sr300_auto_range_min_laser                   

              sr300_auto_range_max_laser                   

              sr300_auto_range_start_laser                    ,

              sr300_auto_range_upper_threshold            

              sr300_auto_range_lower_threshold   

               

              It has the accompanying note:  Configures SR300 depth auto-range setting.  Should not be used directly but through the \c rs_apply_ivcam_preset method in rsutil.h.*/