diff --git a/config/test-oak-camera.json b/config/test-oak-camera.json index 78a6165e0..23c326891 100644 --- a/config/test-oak-camera.json +++ b/config/test-oak-camera.json @@ -17,6 +17,7 @@ "mono_resolution": "THE_400_P", "color_resolution": "THE_1080_P", "color_manual_focus": 130, + "color_manual_exposure": null, "stereo_median_filter": "KERNEL_3x3", "stereo_mode": "HIGH_ACCURACY", diff --git a/osgar/drivers/oak_camera.py b/osgar/drivers/oak_camera.py index fa7ac0e30..0e07844f3 100644 --- a/osgar/drivers/oak_camera.py +++ b/osgar/drivers/oak_camera.py @@ -47,7 +47,8 @@ def __init__(self, config, bus): self.is_left_right_check = config.get("stereo_left_right_check", False) assert not(self.is_extended_disparity and self.is_subpixel) # Do not use extended_disparity and subpixel together. - self.color_manual_focus = config.get("color_manual_focus") + self.color_manual_focus = config.get("color_manual_focus") # 0..255 [far..near] + self.color_manual_exposure = config.get("color_manual_exposure") # 1..33000 [us] mono_resolution_value = config.get("mono_resolution", "THE_400_P") assert mono_resolution_value in ["THE_400_P", "THE_480_P", "THE_720_P", "THE_800_P"], mono_resolution_value @@ -93,6 +94,8 @@ def run_input(self): # https://docs.luxonis.com/projects/api/en/latest/samples/StereoDepth/rgb_depth_aligned/ if self.color_manual_focus is not None: color.initialControl.setManualFocus(self.color_manual_focus) + if self.color_manual_exposure is not None: + color.initialControl.setManualExposure(self.color_manual_exposure, 100) # exposure time and ISO color_encoder.setDefaultProfilePreset(self.fps, dai.VideoEncoderProperties.Profile.MJPEG)