Adding more dependencies in Windows CI

This commit is contained in:
matlabbe
2026-06-28 19:47:28 -07:00
parent d39733b995
commit c53ce8fe9f
9 changed files with 349 additions and 24 deletions
-1
View File
@@ -392,7 +392,6 @@ IF(depthai_FOUND)
SET(PUBLIC_LIBRARIES
${PUBLIC_LIBRARIES}
depthai::core
depthai::opencv
)
ENDIF(depthai_FOUND)
+16 -1
View File
@@ -729,6 +729,21 @@ std::string CameraDepthAI::getSerial() const
return "";
}
#ifdef RTABMAP_DEPTHAI
namespace {
// Convert the depthai depth ImgFrame to cv::Mat (similar to dai::ImgFrame::getCvFrame())
cv::Mat depthImgFrameToCvMat(const std::shared_ptr<dai::ImgFrame> & frame)
{
if(frame->getType() != dai::ImgFrame::Type::RAW16)
{
UERROR("Expected RAW16 depth ImgFrame but got type %d", (int)frame->getType());
return cv::Mat();
}
return cv::Mat((int)frame->getHeight(), (int)frame->getWidth(), CV_16UC1, frame->getData().data()).clone();
}
}
#endif
SensorData CameraDepthAI::captureImage(SensorCaptureInfo * info)
{
SensorData data;
@@ -740,7 +755,7 @@ SensorData CameraDepthAI::captureImage(SensorCaptureInfo * info)
double stamp = std::chrono::duration<double>(depthOrRight->getTimestampDevice(dai::CameraExposureOffset::MIDDLE).time_since_epoch()).count();
if(outputMode_)
data = SensorData(cv::imdecode(rgbOrLeft->getData(), cv::IMREAD_ANYCOLOR), depthOrRight->getCvFrame(), stereoModel_.left(), this->getNextSeqID(), stamp);
data = SensorData(cv::imdecode(rgbOrLeft->getData(), cv::IMREAD_ANYCOLOR), depthImgFrameToCvMat(depthOrRight), stereoModel_.left(), this->getNextSeqID(), stamp);
else
data = SensorData(cv::imdecode(rgbOrLeft->getData(), cv::IMREAD_GRAYSCALE), cv::imdecode(depthOrRight->getData(), cv::IMREAD_GRAYSCALE), stereoModel_, this->getNextSeqID(), stamp);