diff --git a/cmake/Depthai/DepthaiDeviceRVC4Config.cmake b/cmake/Depthai/DepthaiDeviceRVC4Config.cmake index 695a5c487d..e47d0aefdc 100644 --- a/cmake/Depthai/DepthaiDeviceRVC4Config.cmake +++ b/cmake/Depthai/DepthaiDeviceRVC4Config.cmake @@ -3,4 +3,4 @@ set(DEPTHAI_DEVICE_RVC4_MATURITY "snapshot") # "version if applicable" -set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+619c87a0023757020150faf07ccbddb13af24533") +set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+3a19ee3e8dc838e417fa752567c282d92145d2dd") diff --git a/include/depthai/pipeline/node/ToF.hpp b/include/depthai/pipeline/node/ToF.hpp index 9cf7dee4cc..17a18dbe5a 100644 --- a/include/depthai/pipeline/node/ToF.hpp +++ b/include/depthai/pipeline/node/ToF.hpp @@ -5,9 +5,6 @@ #include #include -// standard -#include - // shared #include diff --git a/src/pipeline/node/Rectification.cpp b/src/pipeline/node/Rectification.cpp index 7941f1819d..3de567e734 100644 --- a/src/pipeline/node/Rectification.cpp +++ b/src/pipeline/node/Rectification.cpp @@ -101,17 +101,13 @@ CalibrationHandler Rectification::getCalibrationData() const { void Rectification::run() { auto& logger = pimpl->logger; using namespace std::chrono; - if(runOnHost()) { - auto device = getParentPipeline().getDefaultDevice(); - if(device && device->getPlatform() != Platform::RVC4) { - throw std::runtime_error("Rectification node is only supported on RVC4 platform"); - } - } bool initialized = false; cv::Mat cv_rectificationMap1X, cv_rectificationMap1Y; cv::Mat cv_rectificationMap2X, cv_rectificationMap2Y; + uint32_t latestEepromId = getParentPipeline().getEepromId(); + cv::Mat cv_targetCameraMatrix1, cv_targetCameraMatrix2; std::array, 3> targetM1, targetM2; dai::ImgTransformation output1ImgTransformation; @@ -141,6 +137,13 @@ void Rectification::run() { output2FrameHeight = input2Frame->getHeight(); } + // If the EEPROM identifier has changed, we need to re-initialize the rectification matrices + uint32_t currentEepromId = getParentPipeline().getEepromId(); + if(latestEepromId != currentEepromId) { + latestEepromId = currentEepromId; + initialized = false; + } + if(!initialized) { output1ImgTransformation = input1Frame->transformation; output2ImgTransformation = input2Frame->transformation;