Skip to content

Commit 05827b4

Browse files
committed
FW: "high-conversion-gain" camera misc control for IMX462 and IMX678, enabled by default. Values: 0, 1, can also change during streaming, H key with cam_test.py
1 parent faa4bd8 commit 05827b4

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

depthai-core

utilities/cam_test.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ def prev(self):
297297
# cam[c].initialControl.setMisc("manual-exposure-handling", "fast") # default: "default"
298298
# cam[c].initialControl.setMisc("hdr-exposure-ratio", 4) # enables HDR when set `> 1`, current options: 2, 4, 8
299299
# cam[c].initialControl.setMisc("hdr-local-tone-weight", 75) # default 75, range 0..100
300+
# cam[c].initialControl.setMisc("high-conversion-gain", 0) # 1 to enable (default on supported sensors)
300301
for kvPair in args.misc_controls:
301302
cam[c].initialControl.setMisc(*kvPair)
302303
control.out.link(cam[c].inputControl)
@@ -407,6 +408,7 @@ def exit_cleanly(signum, frame):
407408
chroma_denoise = 0
408409
control = 'none'
409410
show = args.show_meta
411+
high_conversion_gain = 1
410412

411413
jet_custom = cv2.applyColorMap(np.arange(256, dtype=np.uint8), cv2.COLORMAP_JET)
412414
jet_custom[0] = [0, 0, 0]
@@ -508,10 +510,17 @@ def exit_cleanly(signum, frame):
508510
print("ToF toggling f_mod value to:", f_mod)
509511
tofConfig.depthParams.freqModUsed = f_mod
510512
tofCfgQueue.send(tofConfig)
511-
elif key == ord('h') and tof:
512-
tofConfig.depthParams.avgPhaseShuffle = not tofConfig.depthParams.avgPhaseShuffle
513-
print("ToF toggling avgPhaseShuffle value to:", tofConfig.depthParams.avgPhaseShuffle)
514-
tofCfgQueue.send(tofConfig)
513+
elif key == ord('h'):
514+
if tof:
515+
tofConfig.depthParams.avgPhaseShuffle = not tofConfig.depthParams.avgPhaseShuffle
516+
print("ToF toggling avgPhaseShuffle value to:", tofConfig.depthParams.avgPhaseShuffle)
517+
tofCfgQueue.send(tofConfig)
518+
else:
519+
high_conversion_gain = 1 - high_conversion_gain
520+
print("High conversion gain:", high_conversion_gain)
521+
ctrl = dai.CameraControl()
522+
ctrl.setMisc("high-conversion-gain", high_conversion_gain)
523+
controlQueue.send(ctrl)
515524
elif key == ord('t'):
516525
print("Autofocus trigger (and disable continuous)")
517526
ctrl = dai.CameraControl()

0 commit comments

Comments
 (0)