From 381bc4588fc61f85dc6b364813f35557483c2f35 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 5 May 2023 05:28:47 +0300 Subject: [PATCH 01/48] Add bindings for CameraControl setMisc --- depthai-core | 2 +- src/pipeline/datatype/CameraControlBindings.cpp | 5 +++++ utilities/cam_test.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index bdbbf828d..41feacdc2 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit bdbbf828da5c392c8e028a83715257b30c91b18f +Subproject commit 41feacdc29f069fe77a41fda45b641bf12c28925 diff --git a/src/pipeline/datatype/CameraControlBindings.cpp b/src/pipeline/datatype/CameraControlBindings.cpp index 06ebb4ab4..f6337bb6b 100644 --- a/src/pipeline/datatype/CameraControlBindings.cpp +++ b/src/pipeline/datatype/CameraControlBindings.cpp @@ -214,8 +214,13 @@ std::vector camCtrlAttr; .def("setChromaDenoise", &CameraControl::setChromaDenoise, py::arg("value"), DOC(dai, CameraControl, setChromaDenoise)) .def("setSceneMode", &CameraControl::setSceneMode, py::arg("mode"), DOC(dai, CameraControl, setSceneMode)) .def("setEffectMode", &CameraControl::setEffectMode, py::arg("mode"), DOC(dai, CameraControl, setEffectMode)) + .def("setMisc", py::overload_cast(&CameraControl::setMisc), py::arg("control"), py::arg("value"), DOC(dai, CameraControl, setMisc)) + .def("setMisc", py::overload_cast(&CameraControl::setMisc), py::arg("control"), py::arg("value"), DOC(dai, CameraControl, setMisc, 2)) + .def("setMisc", py::overload_cast(&CameraControl::setMisc), py::arg("control"), py::arg("value"), DOC(dai, CameraControl, setMisc, 3)) + .def("clearMiscControls", &CameraControl::clearMiscControls, DOC(dai, CameraControl, clearMiscControls)) .def("set", &CameraControl::set, py::arg("config"), DOC(dai, CameraControl, set)) // getters + .def("getMiscControls", &CameraControl::getMiscControls, DOC(dai, CameraControl, getMiscControls)) .def("getCaptureStill", &CameraControl::getCaptureStill, DOC(dai, CameraControl, getCaptureStill)) .def("getExposureTime", &CameraControl::getExposureTime, DOC(dai, CameraControl, getExposureTime)) .def("getSensitivity", &CameraControl::getSensitivity, DOC(dai, CameraControl, getSensitivity)) diff --git a/utilities/cam_test.py b/utilities/cam_test.py index 491ae52cf..1800ee386 100755 --- a/utilities/cam_test.py +++ b/utilities/cam_test.py @@ -200,6 +200,7 @@ def get(self): # cam[c].initialControl.setManualExposure(15000, 400) # exposure [us], iso # When set, takes effect after the first 2 frames # cam[c].initialControl.setManualWhiteBalance(4000) # light temperature in K, 1000..12000 + # cam[c].initialControl.setMisc("some-test", 1) control.out.link(cam[c].inputControl) if rotate[c]: cam[c].setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG) From 89217b865e962351c42cc3a8b1145ea47bf94ffe Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 12 May 2023 04:41:43 +0300 Subject: [PATCH 02/48] FW: IMX378/IMX582 manual ISO up to 3200, handle miscellaneous controls: .initialControl.setMisc("downsampling-mode", "binning") # default: "scaling" .initialControl.setMisc("binning-mode", "sum") # default: "avg" Max FPS for IMX378 1080p back to 118 (from 60) with binning enabled --- depthai-core | 2 +- utilities/cam_test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/depthai-core b/depthai-core index 41feacdc2..3a202c711 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 41feacdc29f069fe77a41fda45b641bf12c28925 +Subproject commit 3a202c711c836344dc2e623d781660cc5ea08788 diff --git a/utilities/cam_test.py b/utilities/cam_test.py index 1800ee386..391f1783c 100755 --- a/utilities/cam_test.py +++ b/utilities/cam_test.py @@ -200,7 +200,8 @@ def get(self): # cam[c].initialControl.setManualExposure(15000, 400) # exposure [us], iso # When set, takes effect after the first 2 frames # cam[c].initialControl.setManualWhiteBalance(4000) # light temperature in K, 1000..12000 - # cam[c].initialControl.setMisc("some-test", 1) + # cam[c].initialControl.setMisc("downsampling-mode", "binning") # default: "scaling" + # cam[c].initialControl.setMisc("binning-mode", "sum") # default: "avg" control.out.link(cam[c].inputControl) if rotate[c]: cam[c].setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG) From 7856f1071943f673bd2d865efced983baee6e0a5 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 12 May 2023 05:20:20 +0300 Subject: [PATCH 03/48] FW: IMX378/IMX582 manual ISO up to 35000, higher than 3200 only with misc control: .initialControl.setMisc("manual-exposure-handling", "fast") --- depthai-core | 2 +- utilities/cam_test.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 3a202c711..7dfa8ea2c 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 3a202c711c836344dc2e623d781660cc5ea08788 +Subproject commit 7dfa8ea2c52994ee32b3867ea4210efc09991450 diff --git a/utilities/cam_test.py b/utilities/cam_test.py index 391f1783c..885ab104d 100755 --- a/utilities/cam_test.py +++ b/utilities/cam_test.py @@ -202,6 +202,7 @@ def get(self): # cam[c].initialControl.setManualWhiteBalance(4000) # light temperature in K, 1000..12000 # cam[c].initialControl.setMisc("downsampling-mode", "binning") # default: "scaling" # cam[c].initialControl.setMisc("binning-mode", "sum") # default: "avg" + # cam[c].initialControl.setMisc("manual-exposure-handling", "fast") # default: "default" control.out.link(cam[c].inputControl) if rotate[c]: cam[c].setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG) From a9d69ae66e8491c9d177be99da6980883e8251a5 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Sat, 27 May 2023 17:00:21 +0300 Subject: [PATCH 04/48] cam_test.py: `-misc`/`--misc-controls` option. FW: IMX586 on-sensor HDR, with: .initialControl.setMisc("hdr-exposure-ratio", 4) # enables HDR when set `> 1`, current options: 2, 4, 8 .initialControl.setMisc("hdr-local-tone-weight", 75) # default 75, range 0..100 --- depthai-core | 2 +- utilities/cam_test.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 7dfa8ea2c..f02126fd6 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 7dfa8ea2c52994ee32b3867ea4210efc09991450 +Subproject commit f02126fd6075cd8210fe009081f1034532cfa7ab diff --git a/utilities/cam_test.py b/utilities/cam_test.py index 885ab104d..db203b0af 100755 --- a/utilities/cam_test.py +++ b/utilities/cam_test.py @@ -55,6 +55,8 @@ def socket_type_pair(arg): is_color = True if type in ['c', 'color'] else False return [socket, is_color] +def string_pair(arg): + return arg.split('=') parser = argparse.ArgumentParser() parser.add_argument('-cams', '--cameras', type=socket_type_pair, nargs='+', @@ -78,6 +80,10 @@ def socket_type_pair(arg): help="Make OpenCV windows resizable. Note: may introduce some artifacts") parser.add_argument('-tun', '--camera-tuning', type=Path, help="Path to custom camera tuning database") +parser.add_argument('-misc', '--misc-controls', type=string_pair, nargs='+', + default=[], + help="List of miscellaneous camera controls to set initially, " + "as pairs: key1=value1 key2=value2 ...") parser.add_argument('-d', '--device', default="", type=str, help="Optional MX ID of the device to connect to.") @@ -203,6 +209,10 @@ def get(self): # cam[c].initialControl.setMisc("downsampling-mode", "binning") # default: "scaling" # cam[c].initialControl.setMisc("binning-mode", "sum") # default: "avg" # cam[c].initialControl.setMisc("manual-exposure-handling", "fast") # default: "default" + # cam[c].initialControl.setMisc("hdr-exposure-ratio", 4) # enables HDR when set `> 1`, current options: 2, 4, 8 + # cam[c].initialControl.setMisc("hdr-local-tone-weight", 75) # default 75, range 0..100 + for kvPair in args.misc_controls: + cam[c].initialControl.setMisc(*kvPair) control.out.link(cam[c].inputControl) if rotate[c]: cam[c].setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG) From 2c3c86e1a8b127f7fa7adb27e6a6aec81f780de1 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 2 Feb 2024 15:39:17 +0200 Subject: [PATCH 05/48] FW: initial IMX678 support (4K). TMP IMX462 enable HCG (high conversion gain) --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 3e08b71c0..378a690d4 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 3e08b71c0498428888e4324d7412e39fdafcf1fc +Subproject commit 378a690d430f98210ddcc6eb2c4f4f110c4ec850 From faa4bd8a140cd7daecf87081f32e6cbe3ecc11fe Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Wed, 7 Feb 2024 05:07:32 +0200 Subject: [PATCH 06/48] Fix build, develop got broken --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 669f06777..13d7ae5b8 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 669f0677738f507f16ae9140a0d7c6e75f6e349f +Subproject commit 13d7ae5b8303b3e7b2c644edffe402282376a25d From 05827b4dfa26bd7df075e119cc3f0b9f3addee3b Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Wed, 7 Feb 2024 09:35:14 +0200 Subject: [PATCH 07/48] 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 --- depthai-core | 2 +- utilities/cam_test.py | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/depthai-core b/depthai-core index 13d7ae5b8..2595d5690 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 13d7ae5b8303b3e7b2c644edffe402282376a25d +Subproject commit 2595d569055f514153aa38deea3e09b2b47d951c diff --git a/utilities/cam_test.py b/utilities/cam_test.py index 4873c84d7..40c59e56f 100755 --- a/utilities/cam_test.py +++ b/utilities/cam_test.py @@ -297,6 +297,7 @@ def prev(self): # cam[c].initialControl.setMisc("manual-exposure-handling", "fast") # default: "default" # cam[c].initialControl.setMisc("hdr-exposure-ratio", 4) # enables HDR when set `> 1`, current options: 2, 4, 8 # cam[c].initialControl.setMisc("hdr-local-tone-weight", 75) # default 75, range 0..100 + # cam[c].initialControl.setMisc("high-conversion-gain", 0) # 1 to enable (default on supported sensors) for kvPair in args.misc_controls: cam[c].initialControl.setMisc(*kvPair) control.out.link(cam[c].inputControl) @@ -407,6 +408,7 @@ def exit_cleanly(signum, frame): chroma_denoise = 0 control = 'none' show = args.show_meta + high_conversion_gain = 1 jet_custom = cv2.applyColorMap(np.arange(256, dtype=np.uint8), cv2.COLORMAP_JET) jet_custom[0] = [0, 0, 0] @@ -508,10 +510,17 @@ def exit_cleanly(signum, frame): print("ToF toggling f_mod value to:", f_mod) tofConfig.depthParams.freqModUsed = f_mod tofCfgQueue.send(tofConfig) - elif key == ord('h') and tof: - tofConfig.depthParams.avgPhaseShuffle = not tofConfig.depthParams.avgPhaseShuffle - print("ToF toggling avgPhaseShuffle value to:", tofConfig.depthParams.avgPhaseShuffle) - tofCfgQueue.send(tofConfig) + elif key == ord('h'): + if tof: + tofConfig.depthParams.avgPhaseShuffle = not tofConfig.depthParams.avgPhaseShuffle + print("ToF toggling avgPhaseShuffle value to:", tofConfig.depthParams.avgPhaseShuffle) + tofCfgQueue.send(tofConfig) + else: + high_conversion_gain = 1 - high_conversion_gain + print("High conversion gain:", high_conversion_gain) + ctrl = dai.CameraControl() + ctrl.setMisc("high-conversion-gain", high_conversion_gain) + controlQueue.send(ctrl) elif key == ord('t'): print("Autofocus trigger (and disable continuous)") ctrl = dai.CameraControl() From 2d8fabc4caeff23d71ad941a02821ddb646a78a5 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Thu, 8 Feb 2024 13:10:01 +0200 Subject: [PATCH 08/48] FW: initial support for IMX715, 4lane, 4K, max FPS 9.7 for now --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 2595d5690..198c6bc26 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 2595d569055f514153aa38deea3e09b2b47d951c +Subproject commit 198c6bc26c8e77acb247065646cb7ba370f41733 From 74f0144831d643da9b103a3717ab0479f3dfabc9 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 9 Feb 2024 20:46:35 +0200 Subject: [PATCH 09/48] FW: IMX678 binning option (1080p, 60fps), IMX582 HDR: - better config for 10fps HDR - runtime configurable hdr-exposure-ratio (1,2,4,8), hdr-local-tone-weight (0..1, float normalized) cam_test.py `R` and `G` keys to select HDR controls, then change with `-_` `+=` --- depthai-core | 2 +- utilities/cam_test.py | 44 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/depthai-core b/depthai-core index 198c6bc26..ffd129f6e 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 198c6bc26c8e77acb247065646cb7ba370f41733 +Subproject commit ffd129f6ea889ca3408d47489fa4aa78619ccc6a diff --git a/utilities/cam_test.py b/utilities/cam_test.py index 40c59e56f..c2d14253d 100755 --- a/utilities/cam_test.py +++ b/utilities/cam_test.py @@ -49,7 +49,7 @@ from pathlib import Path import sys import signal - +import math def socket_type_pair(arg): socket, type = arg.split(',') @@ -409,6 +409,12 @@ def exit_cleanly(signum, frame): control = 'none' show = args.show_meta high_conversion_gain = 1 + print(args.misc_controls) + args_misc_dict = dict(args.misc_controls) + + hdr_exp_ratio = int(math.log2(float(args_misc_dict.get('hdr-exposure-ratio', 1)))) + hdr_local_tone_weight = int(32 * float(args_misc_dict.get('hdr-local-tone-weight', 0.75))) + hdr_on = (hdr_exp_ratio > 0) jet_custom = cv2.applyColorMap(np.arange(256, dtype=np.uint8), cv2.COLORMAP_JET) jet_custom[0] = [0, 0, 0] @@ -505,11 +511,18 @@ def exit_cleanly(signum, frame): elif key == ord('c'): capture_list = streams.copy() capture_time = time.strftime('%Y%m%d_%H%M%S') - elif key == ord('g') and tof: - f_mod = dai.RawToFConfig.DepthParams.TypeFMod.MAX if tofConfig.depthParams.freqModUsed == dai.RawToFConfig.DepthParams.TypeFMod.MIN else dai.RawToFConfig.DepthParams.TypeFMod.MIN - print("ToF toggling f_mod value to:", f_mod) - tofConfig.depthParams.freqModUsed = f_mod - tofCfgQueue.send(tofConfig) + elif key == ord('g'): + if tof: + f_mod = dai.RawToFConfig.DepthParams.TypeFMod.MAX if tofConfig.depthParams.freqModUsed == dai.RawToFConfig.DepthParams.TypeFMod.MIN else dai.RawToFConfig.DepthParams.TypeFMod.MIN + print("ToF toggling f_mod value to:", f_mod) + tofConfig.depthParams.freqModUsed = f_mod + tofCfgQueue.send(tofConfig) + else: + if hdr_on: + control = 'hdr_local_tone_weight' + print("Selected control:", control) + else: + print("HDR was not enabled, start with `-misc hdr-exposure-ratio=2` or higher to enable") elif key == ord('h'): if tof: tofConfig.depthParams.avgPhaseShuffle = not tofConfig.depthParams.avgPhaseShuffle @@ -599,7 +612,7 @@ def exit_cleanly(signum, frame): floodIntensity = 0 device.setIrFloodLightIntensity(floodIntensity) print(f'IR Flood intensity:', floodIntensity) - elif key >= 0 and chr(key) in '34567890[]p\\;\'': + elif key >= 0 and chr(key) in '34567890[]p\\;\'r': if key == ord('3'): control = 'awb_mode' elif key == ord('4'): @@ -628,6 +641,11 @@ def exit_cleanly(signum, frame): control = 'chroma_denoise' elif key == ord('p'): control = 'tof_amplitude_min' + elif key == ord('r'): + if hdr_on: + control = 'hdr_exp_ratio' + else: + print("HDR was not enabled, start with `-misc hdr-exposure-ratio=2` or higher to enable") print("Selected control:", control) elif key in [ord('-'), ord('_'), ord('+'), ord('=')]: change = 0 @@ -637,7 +655,7 @@ def exit_cleanly(signum, frame): change = 1 ctrl = dai.CameraControl() if control == 'none': - print("Please select a control first using keys 3..9 0 [ ] \\ ; \'") + print("Please select a control first using keys 3..9 0 [ ] \\ ; \' r g p") elif control == 'ae_comp': ae_comp = clamp(ae_comp + change, -9, 9) print("Auto exposure compensation:", ae_comp) @@ -690,6 +708,16 @@ def exit_cleanly(signum, frame): chroma_denoise = clamp(chroma_denoise + change, 0, 4) print("Chroma denoise:", chroma_denoise) ctrl.setChromaDenoise(chroma_denoise) + elif control == 'hdr_exp_ratio': + hdr_exp_ratio = clamp(hdr_exp_ratio + change, 0, 3) + value = pow(2, hdr_exp_ratio) + print("HDR exposure ratio:", value) + ctrl.setMisc("hdr-exposure-ratio", value) + elif control == 'hdr_local_tone_weight': + hdr_local_tone_weight = clamp(hdr_local_tone_weight + change, 0, 32) + value = hdr_local_tone_weight / 32 + print(f"HDR local tone weight (normalized): {value:.2f}") + ctrl.setMisc("hdr-local-tone-weight", value) elif control == 'tof_amplitude_min' and tof: amp_min = clamp(tofConfig.depthParams.minimumAmplitude + change, 0, 50) print("Setting min amplitude(confidence) to:", amp_min) From 596d3b1587998d82f0b2417b4036c80324d905c5 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Fri, 10 May 2024 19:53:34 +0300 Subject: [PATCH 10/48] Add runtime stereo calib reconfig --- depthai-core | 2 +- src/DeviceBindings.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 0bcd3094c..cbbe8661a 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 0bcd3094cd2c222fd94b725ba130178becebafdf +Subproject commit cbbe8661a9df2941946192f56a1bbcb03c984239 diff --git a/src/DeviceBindings.cpp b/src/DeviceBindings.cpp index b92831cf3..d41a55948 100644 --- a/src/DeviceBindings.cpp +++ b/src/DeviceBindings.cpp @@ -636,6 +636,7 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){ .def("getProfilingData", [](DeviceBase& d) { py::gil_scoped_release release; return d.getProfilingData(); }, DOC(dai, DeviceBase, getProfilingData)) .def("readCalibration", [](DeviceBase& d) { py::gil_scoped_release release; return d.readCalibration(); }, DOC(dai, DeviceBase, readCalibration)) .def("flashCalibration", [](DeviceBase& d, CalibrationHandler calibrationDataHandler) { py::gil_scoped_release release; return d.flashCalibration(calibrationDataHandler); }, py::arg("calibrationDataHandler"), DOC(dai, DeviceBase, flashCalibration)) + .def("setCalibration", [](DeviceBase& d, CalibrationHandler calibrationDataHandler) { py::gil_scoped_release release; return d.setCalibration(calibrationDataHandler); }, py::arg("calibrationDataHandler"), DOC(dai, DeviceBase, setCalibration)) .def("setXLinkChunkSize", [](DeviceBase& d, int s) { py::gil_scoped_release release; d.setXLinkChunkSize(s); }, py::arg("sizeBytes"), DOC(dai, DeviceBase, setXLinkChunkSize)) .def("getXLinkChunkSize", [](DeviceBase& d) { py::gil_scoped_release release; return d.getXLinkChunkSize(); }, DOC(dai, DeviceBase, getXLinkChunkSize)) .def("setIrLaserDotProjectorBrightness", [](DeviceBase& d, float mA, int mask) { From ee22f223aec6358aee278755486899558921c57d Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Tue, 4 Jun 2024 12:22:10 +0300 Subject: [PATCH 11/48] Add getCalibration bindings --- depthai-core | 2 +- src/DeviceBindings.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index cbbe8661a..900aeb32a 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit cbbe8661a9df2941946192f56a1bbcb03c984239 +Subproject commit 900aeb32a2273a4624a62535c4713ec0ad335f59 diff --git a/src/DeviceBindings.cpp b/src/DeviceBindings.cpp index d41a55948..bc8545132 100644 --- a/src/DeviceBindings.cpp +++ b/src/DeviceBindings.cpp @@ -637,6 +637,7 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){ .def("readCalibration", [](DeviceBase& d) { py::gil_scoped_release release; return d.readCalibration(); }, DOC(dai, DeviceBase, readCalibration)) .def("flashCalibration", [](DeviceBase& d, CalibrationHandler calibrationDataHandler) { py::gil_scoped_release release; return d.flashCalibration(calibrationDataHandler); }, py::arg("calibrationDataHandler"), DOC(dai, DeviceBase, flashCalibration)) .def("setCalibration", [](DeviceBase& d, CalibrationHandler calibrationDataHandler) { py::gil_scoped_release release; return d.setCalibration(calibrationDataHandler); }, py::arg("calibrationDataHandler"), DOC(dai, DeviceBase, setCalibration)) + .def("getCalibration", [](DeviceBase& d) { py::gil_scoped_release release; return d.getCalibration(); }, DOC(dai, DeviceBase, getCalibration)) .def("setXLinkChunkSize", [](DeviceBase& d, int s) { py::gil_scoped_release release; d.setXLinkChunkSize(s); }, py::arg("sizeBytes"), DOC(dai, DeviceBase, setXLinkChunkSize)) .def("getXLinkChunkSize", [](DeviceBase& d) { py::gil_scoped_release release; return d.getXLinkChunkSize(); }, DOC(dai, DeviceBase, getXLinkChunkSize)) .def("setIrLaserDotProjectorBrightness", [](DeviceBase& d, float mA, int mask) { From 31b0fab6ba46f40681128a02ce61705512a6fc5c Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Tue, 4 Jun 2024 12:50:42 +0300 Subject: [PATCH 12/48] Add runtime calib update example for stereo --- depthai-core | 2 +- .../stereo_runtime_calibration_update.py | 81 +++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100755 examples/StereoDepth/stereo_runtime_calibration_update.py diff --git a/depthai-core b/depthai-core index 900aeb32a..79ec49be4 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 900aeb32a2273a4624a62535c4713ec0ad335f59 +Subproject commit 79ec49be42ab2580f8ab3a16f35c3cad3303e4f2 diff --git a/examples/StereoDepth/stereo_runtime_calibration_update.py b/examples/StereoDepth/stereo_runtime_calibration_update.py new file mode 100755 index 000000000..0c2ace0e3 --- /dev/null +++ b/examples/StereoDepth/stereo_runtime_calibration_update.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 + +import cv2 +import depthai as dai +import numpy as np + +# Create pipeline +pipeline = dai.Pipeline() + +# Define sources and outputs +monoLeft = pipeline.create(dai.node.MonoCamera) +monoRight = pipeline.create(dai.node.MonoCamera) +stereo = pipeline.create(dai.node.StereoDepth) +xout = pipeline.create(dai.node.XLinkOut) +xoutLeft = pipeline.create(dai.node.XLinkOut) + +xout.setStreamName("disparity") +xoutLeft.setStreamName("left") + +# Properties +monoLeft.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) +monoLeft.setCamera("left") +monoRight.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) +monoRight.setCamera("right") + +stereo.enableDistortionCorrection(True) + +# Linking +monoLeft.out.link(stereo.left) +monoRight.out.link(stereo.right) +stereo.disparity.link(xout.input) +stereo.rectifiedLeft.link(xoutLeft.input) + +cvColorMap = cv2.applyColorMap(np.arange(256, dtype=np.uint8), cv2.COLORMAP_JET) +cvColorMap[0] = [0, 0, 0] + +# Connect to device and start pipeline +with dai.Device(pipeline) as device: + + try: + calibration = device.readCalibration() + except: + print("Device is not calibrated!") + exit() + + # Output queue will be used to get the disparity frames from the outputs defined above + q = device.getOutputQueue(name="disparity", maxSize=4, blocking=False) + qLeft = device.getOutputQueue(name="left", maxSize=4, blocking=False) + + while True: + inDisparity = q.get() # blocking call, will wait until a new data has arrived + frame = inDisparity.getFrame() + # Normalization for better visualization + frame = (frame * (255 / stereo.initialConfig.getMaxDisparity())).astype(np.uint8) + + cv2.imshow("disparity", frame) + + frame = cv2.applyColorMap(frame, cvColorMap) + cv2.imshow("disparity_color", frame) + + inLeft = qLeft.get() + frame = inLeft.getCvFrame() + cv2.imshow("rectified left", frame) + + key = cv2.waitKey(1) + if key == ord('q'): + break + elif key == ord('u'): + randomDistortionCoeffs = np.random.rand(14) + calibration.setDistortionCoefficients(dai.CameraBoardSocket.LEFT, randomDistortionCoeffs) + try: + device.setCalibration(calibration) + except: + print("Failed to update calibration!") + try: + updatedCalib = device.getCalibration() + distortionCoeffs = updatedCalib.getDistortionCoefficients(dai.CameraBoardSocket.LEFT) + print("Updated distortion coefficients: ", distortionCoeffs) + except: + pass + From a060abe5fe32262944104810747340cfe8a93883 Mon Sep 17 00:00:00 2001 From: jakaskerl Date: Tue, 18 Jun 2024 14:51:50 +0200 Subject: [PATCH 13/48] Force numpy <2.0 --- examples/install_requirements.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/install_requirements.py b/examples/install_requirements.py index fed7b2b25..c79cc342e 100755 --- a/examples/install_requirements.py +++ b/examples/install_requirements.py @@ -55,12 +55,12 @@ def hasWhitespace(string): requireOpenCv = True if requireOpenCv: - DEPENDENCIES.append('numpy') + DEPENDENCIES.append('numpy<2.0') # 4.5.4.58 package is broken for python 3.9 if sys.version_info[0] == 3 and sys.version_info[1] == 9: DEPENDENCIES.append('opencv-python!=4.5.4.58') else: - DEPENDENCIES.append('opencv-python') + DEPENDENCIES.append('opencv-python<5.0') From 97440887b551d96f3fd5a9140e53a81e23824f54 Mon Sep 17 00:00:00 2001 From: Erol444 Date: Fri, 21 Jun 2024 17:54:29 +0200 Subject: [PATCH 14/48] Fix pysimplegui version --- utilities/requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utilities/requirements.txt b/utilities/requirements.txt index ade6e25c8..bdc63462e 100644 --- a/utilities/requirements.txt +++ b/utilities/requirements.txt @@ -1,7 +1,9 @@ -PySimpleGUI==4.60.3 Pillow==9.3.0 psutil==5.9.3 numpy>=1.21.4 # For RPi Buster (last successful build) and macOS M1 (first build). But allow for higher versions, to support Python3.11 (not available in 1.21.4 yet) opencv-contrib-python==4.5.5.62 # Last successful RPi build, also covers M1 with above pinned numpy (otherwise 4.6.0.62 would be required, but that has a bug with charuco boards). Python version not important, abi3 wheels pyqt5>5,<5.15.6 ; platform_machine != "armv6l" and platform_machine != "armv7l" and platform_machine != "aarch64" and platform_machine != "arm64" --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ +# Latest version (note - it's yanked) +PySimpleGUI==4.60.5 +depthai From a5422446d5dce9b59e15974c9a1d691aa6b1f6cd Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Tue, 25 Jun 2024 19:19:03 +0200 Subject: [PATCH 15/48] Update python requirements --- depthai-core | 2 +- examples/install_requirements.py | 2 +- utilities/requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/depthai-core b/depthai-core index da4bb3c8d..e2e8fef43 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit da4bb3c8d7c17affcdfd42ccaf9419c153d33a16 +Subproject commit e2e8fef432470dcc51fa5c834aea64c244d6fb79 diff --git a/examples/install_requirements.py b/examples/install_requirements.py index c79cc342e..2487ed8b1 100755 --- a/examples/install_requirements.py +++ b/examples/install_requirements.py @@ -55,7 +55,7 @@ def hasWhitespace(string): requireOpenCv = True if requireOpenCv: - DEPENDENCIES.append('numpy<2.0') + DEPENDENCIES.append('numpy<3.0') # 4.5.4.58 package is broken for python 3.9 if sys.version_info[0] == 3 and sys.version_info[1] == 9: DEPENDENCIES.append('opencv-python!=4.5.4.58') diff --git a/utilities/requirements.txt b/utilities/requirements.txt index bdc63462e..a1a3b72b6 100644 --- a/utilities/requirements.txt +++ b/utilities/requirements.txt @@ -1,6 +1,6 @@ Pillow==9.3.0 psutil==5.9.3 -numpy>=1.21.4 # For RPi Buster (last successful build) and macOS M1 (first build). But allow for higher versions, to support Python3.11 (not available in 1.21.4 yet) +numpy>=1.21.4,<3 # For RPi Buster (last successful build) and macOS M1 (first build). But allow for higher versions, to support Python3.11 (not available in 1.21.4 yet). Likely won't work with numpy 3.x when it comes out. opencv-contrib-python==4.5.5.62 # Last successful RPi build, also covers M1 with above pinned numpy (otherwise 4.6.0.62 would be required, but that has a bug with charuco boards). Python version not important, abi3 wheels pyqt5>5,<5.15.6 ; platform_machine != "armv6l" and platform_machine != "armv7l" and platform_machine != "aarch64" and platform_machine != "arm64" --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ From d47a26ead426e320f646d75c4c95b919ab15587c Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Tue, 25 Jun 2024 19:20:20 +0200 Subject: [PATCH 16/48] Bump the version --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index e2e8fef43..47738b401 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit e2e8fef432470dcc51fa5c834aea64c244d6fb79 +Subproject commit 47738b401e9254745e5eae868c93562d7a8f842c From 400a31cfe98ce1dbbdfa0ddd853a938493a4e99a Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Tue, 25 Jun 2024 23:47:34 +0200 Subject: [PATCH 17/48] Update XLink to master --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 47738b401..9cb397d2d 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 47738b401e9254745e5eae868c93562d7a8f842c +Subproject commit 9cb397d2d64ad0bed3349b4fb43f502bd964ffac From ed399c3c38d9e2b6ecde698f279c941ebaa14f06 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Wed, 26 Jun 2024 16:24:18 +0200 Subject: [PATCH 18/48] Update core --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 9cb397d2d..729e47810 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 9cb397d2d64ad0bed3349b4fb43f502bd964ffac +Subproject commit 729e478108f40d117ef7876b1360596f35645ddf From 14c30884325bda3f7cfcaa32249b12c05af1c909 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Mon, 8 Jul 2024 17:41:24 +0300 Subject: [PATCH 19/48] ToF: fix intrinsics/dist coeffs from sensor EEPROM --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 961bace76..c71e9694a 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 961bace769e572cbf60ff935f6d5c3291d910a93 +Subproject commit c71e9694a22918c631a6896d030ec291e8e7b861 From 6c518f22e75a21706649a390f179c4038f59027a Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Fri, 5 Jul 2024 13:32:20 +0200 Subject: [PATCH 20/48] Fix the CI for manylinux wheels --- .github/workflows/main.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3840f361..3c9131228 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -136,6 +136,10 @@ jobs: matrix: rpi-os: [rpi-buster, rpi-bullseye, rpi-bookworm] runs-on: ${{ matrix.rpi-os }} + env: + # workaround required for cache@v3, https://github.com/actions/cache/issues/1428 + # to be removed when upgrading the manylinux image + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true steps: - name: Print home directory run: echo Home directory inside container $HOME @@ -298,8 +302,12 @@ jobs: build-linux-x86_64: needs: build-docstrings runs-on: ubuntu-latest + env: + # workaround required for cache@v3, https://github.com/actions/cache/issues/1428 + # to be removed when upgrading the manylinux image + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true container: - image: quay.io/pypa/manylinux2014_x86_64:2024-01-08-eb135ed + image: quay.io/pypa/manylinux2014_x86_64:latest env: PLAT: manylinux2014_x86_64 steps: @@ -362,8 +370,12 @@ jobs: build-linux-arm64: needs: build-docstrings runs-on: [self-hosted, linux, ARM64] + env: + # workaround required for cache@v3, https://github.com/actions/cache/issues/1428 + # to be removed when upgrading the manylinux image + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true container: - image: quay.io/pypa/manylinux2014_aarch64:2024-01-08-eb135ed + image: quay.io/pypa/manylinux2014_aarch64:latest env: PLAT: manylinux2014_aarch64 # Mount local hunter cache directory, instead of transfering to Github and back From 30b180cff7c1f4ba6403d779412e881407b759de Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Thu, 11 Jul 2024 19:40:17 +0300 Subject: [PATCH 21/48] ToF: add enableDistortionCorrection field --- depthai-core | 2 +- src/pipeline/datatype/ToFConfigBindings.cpp | 1 + src/pipeline/node/ToFBindings.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index c71e9694a..bc9b9db61 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit c71e9694a22918c631a6896d030ec291e8e7b861 +Subproject commit bc9b9db61c33f5073c03f98dfe1ae1f8504da69e diff --git a/src/pipeline/datatype/ToFConfigBindings.cpp b/src/pipeline/datatype/ToFConfigBindings.cpp index 1657a58e1..381c463b8 100644 --- a/src/pipeline/datatype/ToFConfigBindings.cpp +++ b/src/pipeline/datatype/ToFConfigBindings.cpp @@ -38,6 +38,7 @@ void bind_tofconfig(pybind11::module& m, void* pCallstack){ .def_readwrite("median", &RawToFConfig::median, DOC(dai, RawToFConfig, median)) .def_readwrite("enablePhaseShuffleTemporalFilter", &RawToFConfig::enablePhaseShuffleTemporalFilter, DOC(dai, RawToFConfig, enablePhaseShuffleTemporalFilter)) .def_readwrite("enableBurstMode", &RawToFConfig::enableBurstMode, DOC(dai, RawToFConfig, enableBurstMode)) + .def_readwrite("enableDistortionCorrection", &RawToFConfig::enableDistortionCorrection, DOC(dai, RawToFConfig, enableDistortionCorrection)) .def_readwrite("phaseUnwrappingLevel", &RawToFConfig::phaseUnwrappingLevel, DOC(dai, RawToFConfig, phaseUnwrappingLevel)) .def_readwrite("enableFPPNCorrection", &RawToFConfig::enableFPPNCorrection, DOC(dai, RawToFConfig, enableFPPNCorrection)) .def_readwrite("enableOpticalCorrection", &RawToFConfig::enableOpticalCorrection, DOC(dai, RawToFConfig, enableOpticalCorrection)) diff --git a/src/pipeline/node/ToFBindings.cpp b/src/pipeline/node/ToFBindings.cpp index 06b79348e..53cb01a45 100644 --- a/src/pipeline/node/ToFBindings.cpp +++ b/src/pipeline/node/ToFBindings.cpp @@ -32,6 +32,7 @@ void bind_tof(pybind11::module& m, void* pCallstack){ .def_readwrite("initialConfig", &ToFProperties::initialConfig, DOC(dai, ToFProperties, initialConfig)) .def_readwrite("numFramesPool", &ToFProperties::numFramesPool, DOC(dai, ToFProperties, numFramesPool)) .def_readwrite("numShaves", &ToFProperties::numShaves, DOC(dai, ToFProperties, numShaves)) + .def_readwrite("warpHwIds", &ToFProperties::warpHwIds, DOC(dai, ToFProperties, warpHwIds)) ; // Node From 21fe58ab7c9c640e5caa77887348b4dd5a98e441 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Mon, 22 Jul 2024 19:06:22 +0300 Subject: [PATCH 22/48] Add yolov10 support --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index bc9b9db61..469aaad5e 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit bc9b9db61c33f5073c03f98dfe1ae1f8504da69e +Subproject commit 469aaad5e2d09e9edf73cacb183c02cc4f15c334 From b2f5edeade02993cd988bf675aa07602ca7349d2 Mon Sep 17 00:00:00 2001 From: jakaskerl <53253318+jakaskerl@users.noreply.github.com> Date: Mon, 22 Jul 2024 19:29:23 +0200 Subject: [PATCH 23/48] Update utilities/requirements.txt (#1054) Changed PySimpleGUI to a mirrored version of PySimpleGUI4: [PySimpleGUI-4-foss](https://github.com/andor-pierdelacabeza/PySimpleGUI-4-foss) as per issue #1050 --- utilities/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/requirements.txt b/utilities/requirements.txt index a1a3b72b6..b4ceb13f9 100644 --- a/utilities/requirements.txt +++ b/utilities/requirements.txt @@ -5,5 +5,5 @@ opencv-contrib-python==4.5.5.62 # Last successful RPi build, also covers M1 with pyqt5>5,<5.15.6 ; platform_machine != "armv6l" and platform_machine != "armv7l" and platform_machine != "aarch64" and platform_machine != "arm64" --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ # Latest version (note - it's yanked) -PySimpleGUI==4.60.5 +PySimpleGUI-4-foss==4.60.4.1 # Mirror of final open-source release. depthai From 8de0cd78bec1075e3d1ab5fa2f8134f159bdf147 Mon Sep 17 00:00:00 2001 From: Erol444 Date: Thu, 8 Aug 2024 21:50:23 +0300 Subject: [PATCH 24/48] Fix examples --- examples/ImageAlign/depth_align.py | 2 +- examples/ImageAlign/image_align.py | 2 +- examples/ImageAlign/thermal_align.py | 2 +- examples/ImageAlign/tof_align.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/ImageAlign/depth_align.py b/examples/ImageAlign/depth_align.py index 29475daa8..9e13fcf58 100644 --- a/examples/ImageAlign/depth_align.py +++ b/examples/ImageAlign/depth_align.py @@ -68,7 +68,7 @@ def getFps(self): out.setStreamName("out") -sync.setSyncThreshold(timedelta(seconds=(1 / FPS) * 0.5)) +sync.setSyncThreshold(timedelta(seconds=0.5 / FPS)) # Linking camRgb.isp.link(sync.inputs["rgb"]) diff --git a/examples/ImageAlign/image_align.py b/examples/ImageAlign/image_align.py index be6d57ee1..2d257e61b 100644 --- a/examples/ImageAlign/image_align.py +++ b/examples/ImageAlign/image_align.py @@ -34,7 +34,7 @@ out.setStreamName("out") -sync.setSyncThreshold(timedelta(seconds=(1 / FPS) * 0.5)) +sync.setSyncThreshold(timedelta(seconds=0.5 / FPS)) cfgIn.setStreamName("config") diff --git a/examples/ImageAlign/thermal_align.py b/examples/ImageAlign/thermal_align.py index 91d49b25f..c353f2e9a 100644 --- a/examples/ImageAlign/thermal_align.py +++ b/examples/ImageAlign/thermal_align.py @@ -59,7 +59,7 @@ def getFps(self): out.setStreamName("out") -sync.setSyncThreshold(timedelta(seconds=1/FPS * 0.5)) +sync.setSyncThreshold(timedelta(seconds=0.5 / FPS)) cfgIn.setStreamName("config") diff --git a/examples/ImageAlign/tof_align.py b/examples/ImageAlign/tof_align.py index 1c8797d7e..e4d0664be 100644 --- a/examples/ImageAlign/tof_align.py +++ b/examples/ImageAlign/tof_align.py @@ -50,7 +50,7 @@ def getFps(self): out.setStreamName("out") -sync.setSyncThreshold(timedelta(seconds=(1 / FPS))) +sync.setSyncThreshold(timedelta(seconds=0.5 / FPS)) # Linking camRgb.isp.link(sync.inputs["rgb"]) From 6fd203d8429b9f2382bf73c02d705be4ff4b3621 Mon Sep 17 00:00:00 2001 From: Erol444 Date: Wed, 14 Aug 2024 15:31:49 +0200 Subject: [PATCH 25/48] Added example that will sync all available camera streams --- examples/Sync/sync_all_cameras.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 examples/Sync/sync_all_cameras.py diff --git a/examples/Sync/sync_all_cameras.py b/examples/Sync/sync_all_cameras.py new file mode 100755 index 000000000..2c0a2aefa --- /dev/null +++ b/examples/Sync/sync_all_cameras.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +import cv2 +import depthai as dai + +with dai.Device() as device: + pipeline = dai.Pipeline() + cams = device.getConnectedCameraFeatures() + sync = pipeline.create(dai.node.Sync) + for cam in cams: + print(str(cam), str(cam.socket), cam.socket) + cam_node = pipeline.create(dai.node.Camera) + cam_node.setBoardSocket(cam.socket) + cam_node.isp.link(sync.inputs[str(cam.socket)]) + + xout = pipeline.create(dai.node.XLinkOut) + xout.setStreamName('sync') + sync.out.link(xout.input) + + # Start pipeline + device.startPipeline(pipeline) + q = device.getOutputQueue('sync', maxSize=10, blocking=False) + while not device.isClosed(): + msgs = q.get() + for (name, imgFrame) in msgs: + print(f'Cam {name}, seq {imgFrame.getSequenceNum()}, tiemstamp {imgFrame.getTimestamp()}') + cv2.imshow(name, imgFrame.getCvFrame()) + print('----') + + if cv2.waitKey(1) == ord('q'): + break From 7331acf699866df88236c74bfedf8fd4966c584d Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Wed, 14 Aug 2024 17:22:30 +0200 Subject: [PATCH 26/48] [depthai-core] Update FW and clangformat --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 469aaad5e..9b4434c7d 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 469aaad5e2d09e9edf73cacb183c02cc4f15c334 +Subproject commit 9b4434c7dade5e3171d26ef8657599fbf9571a92 From 13c0b9aacdac6ad2098c317cfc0dbbc41d38e989 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 16 Aug 2024 00:05:56 +0300 Subject: [PATCH 27/48] FW: 3A sync for all cameras on OAK-D-LR, main camera driving AE/AWB selected in the order `center > left > right` --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 9b4434c7d..35275353f 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 9b4434c7dade5e3171d26ef8657599fbf9571a92 +Subproject commit 35275353fc263bfef5c84f4bb88b79ca5f107d28 From c53056ba87b4cc177d66e0acffa9e8b4aeb57fe1 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Fri, 16 Aug 2024 19:13:53 +0200 Subject: [PATCH 28/48] Update core and fix MacOS builds --- .github/workflows/main.yml | 2 ++ depthai-core | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3c9131228..059a5d37e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,6 +75,8 @@ jobs: - name: Setup cmake if: matrix.os == 'macos-latest' uses: jwlawson/actions-setup-cmake@v1.13 + with: + cmake-version: '3.29.x' - name: Cache .hunter folder if: matrix.os != 'windows-latest' uses: actions/cache@v3 diff --git a/depthai-core b/depthai-core index 35275353f..8b022abec 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 35275353fc263bfef5c84f4bb88b79ca5f107d28 +Subproject commit 8b022abec09e90058475cdbe7dc9efd6ab54a849 From c08b4f5b8a86c911a6238d4246e4f6783a5d02cb Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Sun, 18 Aug 2024 15:27:34 +0200 Subject: [PATCH 29/48] Bump core --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 8b022abec..9791c9ac2 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 8b022abec09e90058475cdbe7dc9efd6ab54a849 +Subproject commit 9791c9ac22987cfa520ed96e0c750096c3217e47 From f0e91fe04d59b07ac80c9bcbd3ba1ea0da795a7b Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Mon, 19 Aug 2024 10:15:08 +0200 Subject: [PATCH 30/48] Bump core to updated Xlink --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 9791c9ac2..bc233ea8b 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 9791c9ac22987cfa520ed96e0c750096c3217e47 +Subproject commit bc233ea8b22f662325721eb1d04db985983d40ec From 4d78636a368cf80a65290fe68cd58e03a0813550 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Mon, 19 Aug 2024 10:18:49 +0200 Subject: [PATCH 31/48] Bump core --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index bc233ea8b..6d24dbaad 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit bc233ea8b22f662325721eb1d04db985983d40ec +Subproject commit 6d24dbaadb361f2975006f077e2638a37e29f565 From 669b0c2293491d171593e40dad7d0c0af2839ab3 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Mon, 19 Aug 2024 13:29:27 +0200 Subject: [PATCH 32/48] Update core to main --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 6d24dbaad..12158a516 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 6d24dbaadb361f2975006f077e2638a37e29f565 +Subproject commit 12158a5166e0162ee94ae7a86aaac48eafd2a15f From 60f7c575b6a3d37610a66270f6e3faf556e63615 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Tue, 20 Aug 2024 02:02:01 +0300 Subject: [PATCH 33/48] FW: AR0234 tuning increase max exposure: 33 -> 890 ms --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 12158a516..dc03563e1 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 12158a5166e0162ee94ae7a86aaac48eafd2a15f +Subproject commit dc03563e1d3de072390bdf30a127a99be99f3f6f From 76294530fd0bf91b09469490a1d14871c374630a Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Thu, 22 Aug 2024 04:05:11 +0300 Subject: [PATCH 34/48] FW: fix ToF EEPROM reading for certain FFC camera permutations --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index dc03563e1..c17a80e31 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit dc03563e1d3de072390bdf30a127a99be99f3f6f +Subproject commit c17a80e3102aae7896d58e3a47aec7a38eef15ab From bff906dec182ce16ec61cc83972640b46de85d07 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Mon, 26 Aug 2024 14:57:06 +0300 Subject: [PATCH 35/48] FW: update after merge, add "3a-follow" misc control: ``` cam["cama"].initialControl.setMisc("3a-follow", dai.CameraBoardSocket.CAM_A) cam["camb"].initialControl.setMisc("3a-follow", dai.CameraBoardSocket.CAM_B) ``` generic fast manual exposure (for all sensors) --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 694710ee1..73a77d44a 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 694710ee104680ffa662c3d17221dc4f49ae45ae +Subproject commit 73a77d44abe99e67585408e29d79a241d2dd213b From 21bea7e99077e61d76b0dfd50aadd9e5f7b1f9d5 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Mon, 23 Sep 2024 15:56:59 +0300 Subject: [PATCH 36/48] FW: update after merge. Also fix colors for IMX378 THE_1352X1012 with rotation --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 73a77d44a..9b2725fe1 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 73a77d44abe99e67585408e29d79a241d2dd213b +Subproject commit 9b2725fe18c41ef6e32fa69f5a6cd32dc5bfec71 From 65f306b2eedc727c7b46fedc1a25940e80f22ae9 Mon Sep 17 00:00:00 2001 From: jakaskerl <53253318+jakaskerl@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:06:22 +0200 Subject: [PATCH 37/48] Remove Ubuntu:18.04 from OS tests Ubuntu 18.04 EOL - https://ubuntu.com/about/release-cycle --- .github/workflows/test-install-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-dependencies.yml b/.github/workflows/test-install-dependencies.yml index fd8f6d84b..aa036a898 100644 --- a/.github/workflows/test-install-dependencies.yml +++ b/.github/workflows/test-install-dependencies.yml @@ -16,7 +16,7 @@ runs-on: ubuntu-latest strategy: matrix: - container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:rolling"] + container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:rolling"] container: image: ${{ matrix.container_image }} steps: From 6de68e6b31975de9ca01cbe581c8d03a5d3dc9e5 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Wed, 25 Sep 2024 15:23:50 +0300 Subject: [PATCH 38/48] CrashDump: disable on shutdown --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 9b2725fe1..727981605 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 9b2725fe18c41ef6e32fa69f5a6cd32dc5bfec71 +Subproject commit 727981605e92bdb62f5780259c98475ba333d36c From 572492e8bbbbdfe67a0e935bcae75d9d03f43cba Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Thu, 26 Sep 2024 01:09:02 +0300 Subject: [PATCH 39/48] FW: misc controls for multi-ToF staggering: frame-sync-id, frame-sync-delay-us --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 727981605..2e824de00 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 727981605e92bdb62f5780259c98475ba333d36c +Subproject commit 2e824de00f76478034f797877ef4bf344f8809e9 From 6a3b60b7dcdbf17e032c44466c626c5df5a7aec1 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Thu, 26 Sep 2024 14:53:00 +0300 Subject: [PATCH 40/48] Update examples with python shebang and executable permission --- examples/Camera/camera_undistort.py | 2 ++ examples/Camera/thermal_cam.py | 2 ++ examples/Cast/cast_blur.py | 2 ++ examples/Cast/cast_concat.py | 2 ++ examples/Cast/cast_diff.py | 2 ++ examples/ColorCamera/rgb_scene.py | 2 ++ examples/ColorCamera/rgb_undistort.py | 2 ++ examples/CrashReport/capture_diagnostic.py | 2 ++ examples/FeatureTracker/feature_motion_estimation.py | 2 ++ examples/ImageAlign/depth_align.py | 2 ++ examples/ImageAlign/image_align.py | 2 ++ examples/ImageAlign/thermal_align.py | 2 ++ examples/ImageAlign/tof_align.py | 2 ++ examples/NeuralNetwork/thermal_nnet.py | 2 ++ examples/PointCloud/pointcloud_control.py | 2 ++ examples/PointCloud/visualize_pointcloud.py | 2 ++ examples/Script/script_emmc_access.py | 2 ++ examples/Script/script_read_calibration.py | 0 examples/Script/script_uart.py | 0 examples/StereoDepth/stereo_depth_custom_mesh.py | 0 examples/StereoDepth/stereo_runtime_calibration_update.py | 2 ++ examples/Sync/demux_message_group.py | 0 examples/Sync/depth_video_synced.py | 0 examples/Sync/imu_video_synced.py | 0 examples/Sync/sync_scripts.py | 0 examples/ToF/tof_depth.py | 0 examples/UVC/uvc_disparity.py | 0 examples/UVC/uvc_mono.py | 0 examples/device/device_all_boot_bootloader.py | 2 ++ examples/device/device_boot_non_exclusive.py | 2 ++ examples/mixed/collision_avoidance.py | 2 ++ 31 files changed, 42 insertions(+) mode change 100644 => 100755 examples/Camera/camera_undistort.py mode change 100644 => 100755 examples/Camera/thermal_cam.py mode change 100644 => 100755 examples/Cast/cast_blur.py mode change 100644 => 100755 examples/Cast/cast_concat.py mode change 100644 => 100755 examples/Cast/cast_diff.py mode change 100644 => 100755 examples/CrashReport/capture_diagnostic.py mode change 100644 => 100755 examples/FeatureTracker/feature_motion_estimation.py mode change 100644 => 100755 examples/ImageAlign/depth_align.py mode change 100644 => 100755 examples/ImageAlign/image_align.py mode change 100644 => 100755 examples/ImageAlign/thermal_align.py mode change 100644 => 100755 examples/ImageAlign/tof_align.py mode change 100644 => 100755 examples/NeuralNetwork/thermal_nnet.py mode change 100644 => 100755 examples/PointCloud/pointcloud_control.py mode change 100644 => 100755 examples/PointCloud/visualize_pointcloud.py mode change 100644 => 100755 examples/Script/script_emmc_access.py mode change 100644 => 100755 examples/Script/script_read_calibration.py mode change 100644 => 100755 examples/Script/script_uart.py mode change 100644 => 100755 examples/StereoDepth/stereo_depth_custom_mesh.py mode change 100644 => 100755 examples/Sync/demux_message_group.py mode change 100644 => 100755 examples/Sync/depth_video_synced.py mode change 100644 => 100755 examples/Sync/imu_video_synced.py mode change 100644 => 100755 examples/Sync/sync_scripts.py mode change 100644 => 100755 examples/ToF/tof_depth.py mode change 100644 => 100755 examples/UVC/uvc_disparity.py mode change 100644 => 100755 examples/UVC/uvc_mono.py mode change 100644 => 100755 examples/mixed/collision_avoidance.py diff --git a/examples/Camera/camera_undistort.py b/examples/Camera/camera_undistort.py old mode 100644 new mode 100755 index 0d78f1d9e..965d3cef0 --- a/examples/Camera/camera_undistort.py +++ b/examples/Camera/camera_undistort.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import cv2 diff --git a/examples/Camera/thermal_cam.py b/examples/Camera/thermal_cam.py old mode 100644 new mode 100755 index 51a6d62ef..d6f7384ce --- a/examples/Camera/thermal_cam.py +++ b/examples/Camera/thermal_cam.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import cv2 import numpy as np diff --git a/examples/Cast/cast_blur.py b/examples/Cast/cast_blur.py old mode 100644 new mode 100755 index 733a491dd..68c988e46 --- a/examples/Cast/cast_blur.py +++ b/examples/Cast/cast_blur.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import cv2 from pathlib import Path diff --git a/examples/Cast/cast_concat.py b/examples/Cast/cast_concat.py old mode 100644 new mode 100755 index e4e3bcbb8..decbb5b08 --- a/examples/Cast/cast_concat.py +++ b/examples/Cast/cast_concat.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import numpy as np import cv2 import depthai as dai diff --git a/examples/Cast/cast_diff.py b/examples/Cast/cast_diff.py old mode 100644 new mode 100755 index aaaaf750d..471f05fea --- a/examples/Cast/cast_diff.py +++ b/examples/Cast/cast_diff.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import cv2 import depthai as dai from pathlib import Path diff --git a/examples/ColorCamera/rgb_scene.py b/examples/ColorCamera/rgb_scene.py index 7bd550b1d..1815b7db7 100755 --- a/examples/ColorCamera/rgb_scene.py +++ b/examples/ColorCamera/rgb_scene.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import cv2 import depthai as dai from itertools import cycle diff --git a/examples/ColorCamera/rgb_undistort.py b/examples/ColorCamera/rgb_undistort.py index 97e71b184..f617f180f 100755 --- a/examples/ColorCamera/rgb_undistort.py +++ b/examples/ColorCamera/rgb_undistort.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import cv2 import depthai as dai import numpy as np diff --git a/examples/CrashReport/capture_diagnostic.py b/examples/CrashReport/capture_diagnostic.py old mode 100644 new mode 100755 index 5962406f0..363d40e4c --- a/examples/CrashReport/capture_diagnostic.py +++ b/examples/CrashReport/capture_diagnostic.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import zipfile from json import dump, JSONEncoder diff --git a/examples/FeatureTracker/feature_motion_estimation.py b/examples/FeatureTracker/feature_motion_estimation.py old mode 100644 new mode 100755 index ae0162f9c..efbdfc24f --- a/examples/FeatureTracker/feature_motion_estimation.py +++ b/examples/FeatureTracker/feature_motion_estimation.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import numpy as np import cv2 from collections import deque diff --git a/examples/ImageAlign/depth_align.py b/examples/ImageAlign/depth_align.py old mode 100644 new mode 100755 index 9e13fcf58..dddfab913 --- a/examples/ImageAlign/depth_align.py +++ b/examples/ImageAlign/depth_align.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import numpy as np import cv2 import depthai as dai diff --git a/examples/ImageAlign/image_align.py b/examples/ImageAlign/image_align.py old mode 100644 new mode 100755 index 2d257e61b..c3c08ad0f --- a/examples/ImageAlign/image_align.py +++ b/examples/ImageAlign/image_align.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import cv2 import depthai as dai from datetime import timedelta diff --git a/examples/ImageAlign/thermal_align.py b/examples/ImageAlign/thermal_align.py old mode 100644 new mode 100755 index c353f2e9a..f4523e424 --- a/examples/ImageAlign/thermal_align.py +++ b/examples/ImageAlign/thermal_align.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import cv2 import depthai as dai import numpy as np diff --git a/examples/ImageAlign/tof_align.py b/examples/ImageAlign/tof_align.py old mode 100644 new mode 100755 index e4d0664be..d9ec664ac --- a/examples/ImageAlign/tof_align.py +++ b/examples/ImageAlign/tof_align.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import numpy as np import cv2 import depthai as dai diff --git a/examples/NeuralNetwork/thermal_nnet.py b/examples/NeuralNetwork/thermal_nnet.py old mode 100644 new mode 100755 index bdca65c5d..5293f37d5 --- a/examples/NeuralNetwork/thermal_nnet.py +++ b/examples/NeuralNetwork/thermal_nnet.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import cv2 from pathlib import Path diff --git a/examples/PointCloud/pointcloud_control.py b/examples/PointCloud/pointcloud_control.py old mode 100644 new mode 100755 index 6ebe5b9a5..c03154223 --- a/examples/PointCloud/pointcloud_control.py +++ b/examples/PointCloud/pointcloud_control.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import numpy as np import cv2 diff --git a/examples/PointCloud/visualize_pointcloud.py b/examples/PointCloud/visualize_pointcloud.py old mode 100644 new mode 100755 index 564329e4f..c2655eff9 --- a/examples/PointCloud/visualize_pointcloud.py +++ b/examples/PointCloud/visualize_pointcloud.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai from time import sleep import numpy as np diff --git a/examples/Script/script_emmc_access.py b/examples/Script/script_emmc_access.py old mode 100644 new mode 100755 index a93485976..37d85dd1b --- a/examples/Script/script_emmc_access.py +++ b/examples/Script/script_emmc_access.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import cv2 diff --git a/examples/Script/script_read_calibration.py b/examples/Script/script_read_calibration.py old mode 100644 new mode 100755 diff --git a/examples/Script/script_uart.py b/examples/Script/script_uart.py old mode 100644 new mode 100755 diff --git a/examples/StereoDepth/stereo_depth_custom_mesh.py b/examples/StereoDepth/stereo_depth_custom_mesh.py old mode 100644 new mode 100755 diff --git a/examples/StereoDepth/stereo_runtime_calibration_update.py b/examples/StereoDepth/stereo_runtime_calibration_update.py index 0c2ace0e3..4053336f2 100755 --- a/examples/StereoDepth/stereo_runtime_calibration_update.py +++ b/examples/StereoDepth/stereo_runtime_calibration_update.py @@ -43,6 +43,8 @@ print("Device is not calibrated!") exit() + print("Press 'u' to update distortion coefficients with random values") + # Output queue will be used to get the disparity frames from the outputs defined above q = device.getOutputQueue(name="disparity", maxSize=4, blocking=False) qLeft = device.getOutputQueue(name="left", maxSize=4, blocking=False) diff --git a/examples/Sync/demux_message_group.py b/examples/Sync/demux_message_group.py old mode 100644 new mode 100755 diff --git a/examples/Sync/depth_video_synced.py b/examples/Sync/depth_video_synced.py old mode 100644 new mode 100755 diff --git a/examples/Sync/imu_video_synced.py b/examples/Sync/imu_video_synced.py old mode 100644 new mode 100755 diff --git a/examples/Sync/sync_scripts.py b/examples/Sync/sync_scripts.py old mode 100644 new mode 100755 diff --git a/examples/ToF/tof_depth.py b/examples/ToF/tof_depth.py old mode 100644 new mode 100755 diff --git a/examples/UVC/uvc_disparity.py b/examples/UVC/uvc_disparity.py old mode 100644 new mode 100755 diff --git a/examples/UVC/uvc_mono.py b/examples/UVC/uvc_mono.py old mode 100644 new mode 100755 diff --git a/examples/device/device_all_boot_bootloader.py b/examples/device/device_all_boot_bootloader.py index 4c2e9a56b..4ac04cb4e 100755 --- a/examples/device/device_all_boot_bootloader.py +++ b/examples/device/device_all_boot_bootloader.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai devices = dai.Device.getAllConnectedDevices() diff --git a/examples/device/device_boot_non_exclusive.py b/examples/device/device_boot_non_exclusive.py index 898b292f6..3a89acea7 100755 --- a/examples/device/device_boot_non_exclusive.py +++ b/examples/device/device_boot_non_exclusive.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import time diff --git a/examples/mixed/collision_avoidance.py b/examples/mixed/collision_avoidance.py old mode 100644 new mode 100755 index c5683cb8a..d0df84ba3 --- a/examples/mixed/collision_avoidance.py +++ b/examples/mixed/collision_avoidance.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import depthai as dai import cv2 import numpy as np From f17cfb4eede622be081db8cdf1ecd44b0ea9ea6a Mon Sep 17 00:00:00 2001 From: jakaskerl <53253318+jakaskerl@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:20:58 +0200 Subject: [PATCH 41/48] Add ubuntu24.04 --- .github/workflows/test-install-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-dependencies.yml b/.github/workflows/test-install-dependencies.yml index aa036a898..427b6883b 100644 --- a/.github/workflows/test-install-dependencies.yml +++ b/.github/workflows/test-install-dependencies.yml @@ -16,7 +16,7 @@ runs-on: ubuntu-latest strategy: matrix: - container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:rolling"] + container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "ubuntu:rolling"] container: image: ${{ matrix.container_image }} steps: From d3b92a92782894b33015d97d435451ff35532d06 Mon Sep 17 00:00:00 2001 From: Matevz Morato Date: Mon, 30 Sep 2024 12:30:12 +0200 Subject: [PATCH 42/48] Format --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 587821c6f..89e9ee840 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 587821c6f49504ac9de1c220268492b754da2127 +Subproject commit 89e9ee840537f0e041fcd5ce49b6a78dd29002d6 From 118cf0cb9d4d6280aa6bce6e258c47f976fda963 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Thu, 3 Oct 2024 18:30:11 +0300 Subject: [PATCH 43/48] SpeckleFilter: Add differenceThreshold config --- depthai-core | 2 +- src/pipeline/datatype/StereoDepthConfigBindings.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 89e9ee840..15d6a7911 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 89e9ee840537f0e041fcd5ce49b6a78dd29002d6 +Subproject commit 15d6a7911989dbfdf5165c4c0497c55bbfaa2ece diff --git a/src/pipeline/datatype/StereoDepthConfigBindings.cpp b/src/pipeline/datatype/StereoDepthConfigBindings.cpp index 3e202908a..557f55d24 100644 --- a/src/pipeline/datatype/StereoDepthConfigBindings.cpp +++ b/src/pipeline/datatype/StereoDepthConfigBindings.cpp @@ -137,6 +137,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ .def(py::init<>()) .def_readwrite("enable", &RawStereoDepthConfig::PostProcessing::SpeckleFilter::enable, DOC(dai, RawStereoDepthConfig, PostProcessing, SpeckleFilter, enable)) .def_readwrite("speckleRange", &RawStereoDepthConfig::PostProcessing::SpeckleFilter::speckleRange, DOC(dai, RawStereoDepthConfig, PostProcessing, SpeckleFilter, speckleRange)) + .def_readwrite("differenceThreshold", &RawStereoDepthConfig::PostProcessing::SpeckleFilter::differenceThreshold, DOC(dai, RawStereoDepthConfig, PostProcessing, SpeckleFilter, differenceThreshold)) ; decimationMode From c3af129731ac6175dcf5fd6fcf0b5bdde0ec2139 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Fri, 4 Oct 2024 19:38:54 +0300 Subject: [PATCH 44/48] Implement configurable filtering order --- depthai-core | 2 +- src/pipeline/datatype/StereoDepthConfigBindings.cpp | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/depthai-core b/depthai-core index 15d6a7911..76e5cbd15 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 15d6a7911989dbfdf5165c4c0497c55bbfaa2ece +Subproject commit 76e5cbd15309fbdb259267120e38a93c72a65cb2 diff --git a/src/pipeline/datatype/StereoDepthConfigBindings.cpp b/src/pipeline/datatype/StereoDepthConfigBindings.cpp index 557f55d24..2c07e0bf5 100644 --- a/src/pipeline/datatype/StereoDepthConfigBindings.cpp +++ b/src/pipeline/datatype/StereoDepthConfigBindings.cpp @@ -22,6 +22,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ py::enum_ depthAlign(algorithmControl, "DepthAlign", DOC(dai, RawStereoDepthConfig, AlgorithmControl, DepthAlign)); py::enum_ depthUnit(algorithmControl, "DepthUnit", DOC(dai, RawStereoDepthConfig, AlgorithmControl, DepthUnit)); py::class_ postProcessing(rawStereoDepthConfig, "PostProcessing", DOC(dai, RawStereoDepthConfig, PostProcessing)); + py::enum_ filter(postProcessing, "Filter", DOC(dai, RawStereoDepthConfig, PostProcessing, Filter)); py::class_ spatialFilter(postProcessing, "SpatialFilter", DOC(dai, RawStereoDepthConfig, PostProcessing, SpatialFilter)); py::class_ temporalFilter(postProcessing, "TemporalFilter", DOC(dai, RawStereoDepthConfig, PostProcessing, TemporalFilter)); py::enum_ persistencyMode(temporalFilter, "PersistencyMode", DOC(dai, RawStereoDepthConfig, PostProcessing, TemporalFilter, PersistencyMode)); @@ -51,7 +52,15 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// - // Metadata / raw + filter + .value("DECIMATION", RawStereoDepthConfig::PostProcessing::Filter::DECIMATION, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, DECIMATION)) + .value("SPECKLE", RawStereoDepthConfig::PostProcessing::Filter::SPECKLE, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPECKLE)) + .value("MEDIAN", RawStereoDepthConfig::PostProcessing::Filter::MEDIAN, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, MEDIAN)) + .value("TEMPORAL", RawStereoDepthConfig::PostProcessing::Filter::TEMPORAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, TEMPORAL)) + .value("SPATIAL", RawStereoDepthConfig::PostProcessing::Filter::SPATIAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPATIAL)) + .value("FILTER_COUNT", RawStereoDepthConfig::PostProcessing::Filter::FILTER_COUNT, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, FILTER_COUNT)) + ; + medianFilter .value("MEDIAN_OFF", MedianFilter::MEDIAN_OFF) .value("KERNEL_3x3", MedianFilter::KERNEL_3x3) @@ -154,6 +163,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ postProcessing .def(py::init<>()) + .def_readwrite("filteringOrder", &RawStereoDepthConfig::PostProcessing::filteringOrder, DOC(dai, RawStereoDepthConfig, PostProcessing, filteringOrder)) .def_readwrite("median", &RawStereoDepthConfig::PostProcessing::median, DOC(dai, RawStereoDepthConfig, PostProcessing, median)) .def_readwrite("bilateralSigmaValue", &RawStereoDepthConfig::PostProcessing::bilateralSigmaValue, DOC(dai, RawStereoDepthConfig, PostProcessing, bilateralSigmaValue)) .def_readwrite("spatialFilter", &RawStereoDepthConfig::PostProcessing::spatialFilter, DOC(dai, RawStereoDepthConfig, PostProcessing, spatialFilter)) From 9d437e1837147c0bdb366dd5e0fc87e645362972 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Wed, 9 Oct 2024 18:00:43 +0300 Subject: [PATCH 45/48] Stereo: Scale disparity to 13 bit range prior to filtering --- depthai-core | 2 +- src/pipeline/datatype/StereoDepthConfigBindings.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/depthai-core b/depthai-core index 76e5cbd15..7e11d0603 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 76e5cbd15309fbdb259267120e38a93c72a65cb2 +Subproject commit 7e11d0603c7a716d79426051f5d4740fca579069 diff --git a/src/pipeline/datatype/StereoDepthConfigBindings.cpp b/src/pipeline/datatype/StereoDepthConfigBindings.cpp index 2c07e0bf5..3dd024b40 100644 --- a/src/pipeline/datatype/StereoDepthConfigBindings.cpp +++ b/src/pipeline/datatype/StereoDepthConfigBindings.cpp @@ -55,7 +55,6 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ filter .value("DECIMATION", RawStereoDepthConfig::PostProcessing::Filter::DECIMATION, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, DECIMATION)) .value("SPECKLE", RawStereoDepthConfig::PostProcessing::Filter::SPECKLE, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPECKLE)) - .value("MEDIAN", RawStereoDepthConfig::PostProcessing::Filter::MEDIAN, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, MEDIAN)) .value("TEMPORAL", RawStereoDepthConfig::PostProcessing::Filter::TEMPORAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, TEMPORAL)) .value("SPATIAL", RawStereoDepthConfig::PostProcessing::Filter::SPATIAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPATIAL)) .value("FILTER_COUNT", RawStereoDepthConfig::PostProcessing::Filter::FILTER_COUNT, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, FILTER_COUNT)) From ef571f1412688562f6b9d10d646be222bf77cff2 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Fri, 11 Oct 2024 13:37:05 +0300 Subject: [PATCH 46/48] StereoDepth: postprocessing: handle edge case when post-processing filter is enabled, disparity output disabled, median enabled --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 7e11d0603..bc7c7cc20 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 7e11d0603c7a716d79426051f5d4740fca579069 +Subproject commit bc7c7cc202e16fb8f1b5f89c45679e657929feb0 From 1f1a1e4e7be59ecbe39d73f4c7dbfc2ba0318510 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Thu, 17 Oct 2024 15:21:55 +0300 Subject: [PATCH 47/48] StereoDepth: Add back MedianFilter to filtering order --- depthai-core | 2 +- src/pipeline/datatype/StereoDepthConfigBindings.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index bc7c7cc20..69f7669b4 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit bc7c7cc202e16fb8f1b5f89c45679e657929feb0 +Subproject commit 69f7669b43b1a45777f5e02f203e3ab8e2146d01 diff --git a/src/pipeline/datatype/StereoDepthConfigBindings.cpp b/src/pipeline/datatype/StereoDepthConfigBindings.cpp index 3dd024b40..2c07e0bf5 100644 --- a/src/pipeline/datatype/StereoDepthConfigBindings.cpp +++ b/src/pipeline/datatype/StereoDepthConfigBindings.cpp @@ -55,6 +55,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){ filter .value("DECIMATION", RawStereoDepthConfig::PostProcessing::Filter::DECIMATION, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, DECIMATION)) .value("SPECKLE", RawStereoDepthConfig::PostProcessing::Filter::SPECKLE, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPECKLE)) + .value("MEDIAN", RawStereoDepthConfig::PostProcessing::Filter::MEDIAN, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, MEDIAN)) .value("TEMPORAL", RawStereoDepthConfig::PostProcessing::Filter::TEMPORAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, TEMPORAL)) .value("SPATIAL", RawStereoDepthConfig::PostProcessing::Filter::SPATIAL, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, SPATIAL)) .value("FILTER_COUNT", RawStereoDepthConfig::PostProcessing::Filter::FILTER_COUNT, DOC(dai, RawStereoDepthConfig, PostProcessing, Filter, FILTER_COUNT)) From 53887f7ef959b2b21d132e70c070c7b618a12089 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Mon, 21 Oct 2024 15:50:41 +0300 Subject: [PATCH 48/48] StereoDepth: add arbitrary filtering order support with scaling --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 69f7669b4..60d84e720 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 69f7669b43b1a45777f5e02f203e3ab8e2146d01 +Subproject commit 60d84e7206e765477d09e0bb8d0b0f7d003581dd