Items with no label

exposure level

LPaul2
Novice
1,622 Views

Hi folks,

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

Thank you !

0 Kudos
3 Replies
MartyG
Honored Contributor III
398 Views

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.

https://github.com/IntelRealSense/librealsense/blob/master/examples/cpp-config-ui.cpp 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(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(handle, subdevice, ct_unit, UVC_CT_AE_MODE_CONTROL, value ? 2 : 1); // Modes - (1: manual) (2: auto) (4: shutter priority) (8: aperture priority)

LPaul2
Novice
398 Views

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

0 Kudos
MartyG
Honored Contributor III
398 Views

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.*/

0 Kudos
Reply