diff --git a/cmake/Depthai/DepthaiDeviceSideConfig.cmake b/cmake/Depthai/DepthaiDeviceSideConfig.cmake index 0331069d9..83779f736 100644 --- a/cmake/Depthai/DepthaiDeviceSideConfig.cmake +++ b/cmake/Depthai/DepthaiDeviceSideConfig.cmake @@ -2,7 +2,7 @@ set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot") # "full commit hash of device side binary" -set(DEPTHAI_DEVICE_SIDE_COMMIT "9f8bc9fe677b7a1fce27f78448fe348ce6e122e0") +set(DEPTHAI_DEVICE_SIDE_COMMIT "cae51725e78d8128ee7324c13f74648bcc59addc") # "version if applicable" set(DEPTHAI_DEVICE_SIDE_VERSION "") diff --git a/include/depthai/pipeline/datatype/CameraControl.hpp b/include/depthai/pipeline/datatype/CameraControl.hpp index 4160d8361..6d006a8b9 100644 --- a/include/depthai/pipeline/datatype/CameraControl.hpp +++ b/include/depthai/pipeline/datatype/CameraControl.hpp @@ -161,6 +161,22 @@ class CameraControl : public Buffer { */ CameraControl& setAutoExposureCompensation(int compensation); + /** + * Set a command to specify the maximum exposure time limit for auto-exposure. By default + * the AE algorithm prioritizes increasing exposure over ISO, up to around frame-time + * (subject to further limits imposed by anti-banding) + * @param maxExposureTimeUs Maximum exposure time in microseconds + */ + CameraControl& setAutoExposureLimit(uint32_t maxExposureTimeUs); + + /** + * Set a command to specify the maximum exposure time limit for auto-exposure. By default + * the AE algorithm prioritizes increasing exposure over ISO, up to around frame-time + * (subject to further limits imposed by anti-banding) + * @param maxExposureTime Maximum exposure time + */ + CameraControl& setAutoExposureLimit(std::chrono::microseconds maxExposureTime); + /** * Set a command to specify anti-banding mode. Anti-banding / anti-flicker * works in auto-exposure mode, by controlling the exposure time to be applied @@ -186,7 +202,7 @@ class CameraControl : public Buffer { * @param exposureTime Exposure time * @param sensitivityIso Sensitivity as ISO value, usual range 100..1600 */ - void setManualExposure(std::chrono::microseconds exposureTime, uint32_t sensitivityIso); + CameraControl& setManualExposure(std::chrono::microseconds exposureTime, uint32_t sensitivityIso); // White Balance /** diff --git a/shared/depthai-shared b/shared/depthai-shared index 4bc7b858c..ab11424d6 160000 --- a/shared/depthai-shared +++ b/shared/depthai-shared @@ -1 +1 @@ -Subproject commit 4bc7b858cb129d93c78911eb3538c91c35dfd986 +Subproject commit ab11424d61f5afc8ad0158706687b48469e4e1c3 diff --git a/src/pipeline/datatype/CameraControl.cpp b/src/pipeline/datatype/CameraControl.cpp index d824a26a5..6b1ab049d 100644 --- a/src/pipeline/datatype/CameraControl.cpp +++ b/src/pipeline/datatype/CameraControl.cpp @@ -115,6 +115,14 @@ CameraControl& CameraControl::setAutoExposureCompensation(int compensation) { cfg.expCompensation = compensation; return *this; } +CameraControl& CameraControl::setAutoExposureLimit(uint32_t maxExposureTimeUs) { + cfg.setCommand(RawCameraControl::Command::AE_TARGET_FPS_RANGE); + cfg.aeMaxExposureTimeUs = maxExposureTimeUs; + return *this; +} +CameraControl& CameraControl::setAutoExposureLimit(std::chrono::microseconds maxExposureTime) { + return setAutoExposureLimit(maxExposureTime.count()); +} CameraControl& CameraControl::setAntiBandingMode(AntiBandingMode mode) { cfg.setCommand(RawCameraControl::Command::ANTIBANDING_MODE); cfg.antiBandingMode = mode; @@ -128,8 +136,8 @@ CameraControl& CameraControl::setManualExposure(uint32_t exposureTimeUs, uint32_ return *this; } -void CameraControl::setManualExposure(std::chrono::microseconds exposureTime, uint32_t sensitivityIso) { - setManualExposure(exposureTime.count(), sensitivityIso); +CameraControl& CameraControl::setManualExposure(std::chrono::microseconds exposureTime, uint32_t sensitivityIso) { + return setManualExposure(exposureTime.count(), sensitivityIso); } // White Balance