Go to the documentation of this file.
6 #include "spdlog/spdlog.h"
17 initialConfig(rawConfig) {
44 logger::warn(
"{} is deprecated. This function call can be replaced by Stereo::setRectification(false). ", __func__);
48 if(dataLeft.size() != dataRight.size()) {
49 throw std::runtime_error(
"StereoDepth | left and right mesh sizes must match");
56 meshAsset.
data = dataLeft;
57 assetKey =
"meshLeft";
60 meshAsset.
data = dataRight;
61 assetKey =
"meshRight";
68 std::ifstream streamLeft(pathLeft, std::ios::binary);
69 if(!streamLeft.is_open()) {
70 throw std::runtime_error(fmt::format(
"StereoDepth | Cannot open mesh at path: {}", pathLeft));
72 std::vector<std::uint8_t> dataLeft = std::vector<std::uint8_t>(std::istreambuf_iterator<char>(streamLeft), {});
74 std::ifstream streamRight(pathRight, std::ios::binary);
75 if(!streamRight.is_open()) {
76 throw std::runtime_error(fmt::format(
"StereoDepth | Cannot open mesh at path: {}", pathRight));
78 std::vector<std::uint8_t> dataRight = std::vector<std::uint8_t>(std::istreambuf_iterator<char>(streamRight), {});
146 logger::warn(
"{} is deprecated. The output is auto-enabled if used", __func__);
150 logger::warn(
"{} is deprecated. The output is auto-enabled if used", __func__);
Properties & properties
Underlying properties.
StereoDepthConfig & setSubpixelFractionalBits(int subpixelFractionalBits)
void setSubpixel(bool enable)
void setOutputSize(int width, int height)
std::array< Filter, 5 > filteringOrder
StereoDepthConfig initialConfig
void setSubpixelFractionalBits(int subpixelFractionalBits)
void enableDistortionCorrection(bool enableDistortionCorrection)
StereoDepth node. Compute stereo disparity and depth from left-right image pair.
tl::optional< std::int32_t > height
StereoDepth(const std::shared_ptr< PipelineImpl > &par, int64_t nodeId)
void setDefaultProfilePreset(PresetMode mode)
void setInputRefs(std::initializer_list< Input * > l)
SpeckleFilter speckleFilter
Output debugDispLrCheckIt1
PostProcessing postProcessing
void setOutputRectified(bool enable)
StereoDepthConfig & set(dai::RawStereoDepthConfig config)
tl::optional< bool > useHomographyRectification
tl::optional< float > alphaScaling
std::uint32_t speckleRange
StereoDepthConfig & setConfidenceThreshold(int confThr)
tl::optional< float > focalLength
TemporalFilter temporalFilter
float getMaxDisparity() const
std::int32_t numIterations
void setDepthAlignmentUseSpecTranslation(bool specTranslation)
StereoDepthConfig & setExtendedDisparity(bool enable)
void setMedianFilter(dai::MedianFilter median)
tl::optional< std::int32_t > width
AssetManager assetManager
std::vector< std::uint8_t > data
void setRectification(bool enable)
void setDepthAlign(Properties::DepthAlign align)
void setLeftRightCheck(bool enable)
void warn(const FormatString &fmt, Args &&...args)
StereoDepthConfig & setDepthAlign(AlgorithmControl::DepthAlign align)
void setFocalLengthFromCalibration(bool focalLengthFromCalibration)
std::int32_t numPostProcessingMemorySlices
void setRectificationUseSpecTranslation(bool specTranslation)
Output debugDispLrCheckIt2
StereoDepthConfig & setLeftRightCheck(bool enable)
void setRectifyMirrorFrame(bool enable)
DecimationFilter decimationFilter
void setFocalLength(float focalLength)
std::uint32_t differenceThreshold
void setPostProcessingHardwareResources(int numShaves, int numMemorySlices)
SpatialFilter spatialFilter
void setAlphaScaling(float alpha)
CameraBoardSocket depthAlignCamera
Asset is identified with string key and can store arbitrary binary data.
void setMeshStep(int width, int height)
StereoDepthConfig & setSubpixel(bool enable)
void useHomographyRectification(bool useHomographyRectification)
float getMaxDisparity() const
tl::optional< bool > depthAlignmentUseSpecTranslation
bool focalLengthFromCalibration
void loadMeshFiles(const dai::Path &pathLeft, const dai::Path &pathRight)
void setOutputDepth(bool enable)
std::shared_ptr< dai::Asset > set(Asset asset)
std::uint32_t decimationFactor
void setDisparityToDepthUseSpecTranslation(bool specTranslation)
void setRectifyEdgeFillColor(int color)
tl::optional< float > baseline
void setBaseline(float baseline)
std::int32_t numPostProcessingShaves
tl::optional< std::uint32_t > meshSize
DecimationMode decimationMode
Base Properties structure.
tl::optional< std::int32_t > outHeight
std::uint8_t holeFillingRadius
Output debugExtDispLrCheckIt2
std::shared_ptr< RawStereoDepthConfig > rawConfig
StereoDepthConfig & setMedianFilter(MedianFilter median)
void setOutputRefs(std::initializer_list< Output * > l)
Properties & getProperties()
void setInputResolution(int width, int height)
void loadMeshData(const std::vector< std::uint8_t > &dataLeft, const std::vector< std::uint8_t > &dataRight)
void setExtendedDisparity(bool enable)
StereoDepthConfig & setLeftRightCheckThreshold(int threshold)
dai::RawStereoDepthConfig get() const
tl::optional< bool > rectificationUseSpecTranslation
std::int32_t rectifyEdgeFillColor
ThresholdFilter thresholdFilter
tl::optional< bool > disparityToDepthUseSpecTranslation
void setEmptyCalibration()
int numFramesPool
Num frames in output pool.
Output debugExtDispLrCheckIt1
Represents paths on a filesystem; accepts utf-8, Windows utf-16 wchar_t, or std::filesystem::path.
RawStereoDepthConfig configuration structure.
void setRuntimeModeSwitch(bool enable)
RawStereoDepthConfig initialConfig
Initial stereo config.
bool enableRuntimeStereoModeSwitch
void setConfidenceThreshold(int confThr)
tl::optional< std::int32_t > outWidth
void setOutputKeepAspectRatio(bool keep)
void setNumFramesPool(int numFramesPool)
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19