diff --git a/corelib/src/camera/CameraDepthAI.cpp b/corelib/src/camera/CameraDepthAI.cpp index beb36ce755..3a0568b916 100644 --- a/corelib/src/camera/CameraDepthAI.cpp +++ b/corelib/src/camera/CameraDepthAI.cpp @@ -320,7 +320,11 @@ bool CameraDepthAI::init(const std::string & calibrationFolder, const std::strin stereo->initialConfig.setConfidenceThreshold(depthConfidence_); stereo->initialConfig.setLeftRightCheck(true); stereo->initialConfig.setLeftRightCheckThreshold(5); - stereo->initialConfig.setMedianFilter(dai::MedianFilter::KERNEL_5x5); + stereo->initialConfig.setMedianFilter(dai::MedianFilter::KERNEL_7x7); + auto config = stereo->initialConfig.get(); + config.censusTransform.kernelSize = dai::StereoDepthConfig::CensusTransform::KernelSize::KERNEL_7x9; + config.censusTransform.kernelMask = 0X2AA00AA805540155; + stereo->initialConfig.set(config); // Link plugins CAM -> STEREO -> XLINK monoLeft->out.link(stereo->left); @@ -345,7 +349,7 @@ bool CameraDepthAI::init(const std::string & calibrationFolder, const std::strin { stereo->setSubpixel(true); stereo->setSubpixelFractionalBits(4); - auto config = stereo->initialConfig.get(); + config = stereo->initialConfig.get(); config.costMatching.disparityWidth = dai::StereoDepthConfig::CostMatching::DisparityWidth::DISPARITY_64; config.costMatching.enableCompanding = true; stereo->initialConfig.set(config); @@ -358,8 +362,8 @@ bool CameraDepthAI::init(const std::string & calibrationFolder, const std::strin if(imuPublished_) { - // enable ACCELEROMETER_RAW and GYROSCOPE_RAW at 200 hz rate - imu->enableIMUSensor({dai::IMUSensor::ACCELEROMETER_RAW, dai::IMUSensor::GYROSCOPE_RAW}, 200); + // enable ACCELEROMETER_RAW and GYROSCOPE_RAW at 100 hz rate + imu->enableIMUSensor({dai::IMUSensor::ACCELEROMETER_RAW, dai::IMUSensor::GYROSCOPE_RAW}, 100); // above this threshold packets will be sent in batch of X, if the host is not blocked and USB bandwidth is available imu->setBatchReportThreshold(1); // maximum number of IMU packets in a batch, if it's reached device will block sending until host can receive it