Skip to content

Commit

Permalink
drivers/oak_camera.py: add manual iso option from config (#991)
Browse files Browse the repository at this point in the history
  • Loading branch information
tajgr authored Apr 24, 2024
1 parent a358a29 commit be7e280
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions osgar/drivers/oak_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, config, bus):
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") # 0..255 [far..near]
self.color_manual_exposure = config.get("color_manual_exposure") # 1..33000 [us]
self.color_manual_exposure = config.get("color_manual_exposure") # [exposure, iso] 1..33000 [us] and 100..1600

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
Expand Down Expand Up @@ -160,7 +160,8 @@ def run_input(self):
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
exposure, iso = self.color_manual_exposure
color.initialControl.setManualExposure(exposure, iso) # exposure time and ISO

color_encoder.setDefaultProfilePreset(self.fps, dai.VideoEncoderProperties.Profile.MJPEG)

Expand Down

0 comments on commit be7e280

Please sign in to comment.