Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiDeviceRVC4Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
3 changes: 0 additions & 3 deletions include/depthai/pipeline/node/ToF.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#include <depthai/pipeline/Subnode.hpp>
#include <depthai/pipeline/node/ImageFilters.hpp>

// standard
#include <fstream>

// shared
#include <depthai/properties/ToFProperties.hpp>

Expand Down
15 changes: 9 additions & 6 deletions src/pipeline/node/Rectification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::array<float, 3>, 3> targetM1, targetM2;
dai::ImgTransformation output1ImgTransformation;
Expand Down Expand Up @@ -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;
Expand Down
Loading