Program Listing for File StereoDepth.hpp
↰ Return to documentation for file (include/depthai/pipeline/node/StereoDepth.hpp)
#pragma once
#include "depthai/pipeline/Node.hpp"
// shared
#include "depthai-shared/properties/StereoDepthProperties.hpp"
#include "depthai/pipeline/datatype/StereoDepthConfig.hpp"
namespace dai {
namespace node {
class StereoDepth : public NodeCRTP<Node, StereoDepth, StereoDepthProperties> {
public:
constexpr static const char* NAME = "StereoDepth";
enum class PresetMode : std::uint32_t {
HIGH_ACCURACY [[deprecated("Will be removed in future releases and replaced with DEFAULT")]],
HIGH_DENSITY [[deprecated("Will be removed in future releases and replaced with DEFAULT")]],
DEFAULT,
FACE,
HIGH_DETAIL,
ROBOTICS
};
protected:
Properties& getProperties();
private:
PresetMode presetMode = PresetMode::HIGH_DENSITY;
std::shared_ptr<RawStereoDepthConfig> rawConfig;
public:
StereoDepth(const std::shared_ptr<PipelineImpl>& par, int64_t nodeId);
StereoDepth(const std::shared_ptr<PipelineImpl>& par, int64_t nodeId, std::unique_ptr<Properties> props);
StereoDepthConfig initialConfig;
Input inputConfig{*this, "inputConfig", Input::Type::SReceiver, false, 4, {{DatatypeEnum::StereoDepthConfig, false}}};
Input left{*this, "left", Input::Type::SReceiver, false, 8, true, {{DatatypeEnum::ImgFrame, true}}};
Input right{*this, "right", Input::Type::SReceiver, false, 8, true, {{DatatypeEnum::ImgFrame, true}}};
Output depth{*this, "depth", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output disparity{*this, "disparity", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output syncedLeft{*this, "syncedLeft", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output syncedRight{*this, "syncedRight", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output rectifiedLeft{*this, "rectifiedLeft", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output rectifiedRight{*this, "rectifiedRight", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output outConfig{*this, "outConfig", Output::Type::MSender, {{DatatypeEnum::StereoDepthConfig, false}}};
Output debugDispLrCheckIt1{*this, "debugDispLrCheckIt1", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output debugDispLrCheckIt2{*this, "debugDispLrCheckIt2", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output debugExtDispLrCheckIt1{*this, "debugExtDispLrCheckIt1", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output debugExtDispLrCheckIt2{*this, "debugExtDispLrCheckIt2", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output debugDispCostDump{*this, "debugDispCostDump", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
Output confidenceMap{*this, "confidenceMap", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}};
[[deprecated("Use 'Stereo::setRectification(false)' instead")]] void setEmptyCalibration();
void loadMeshFiles(const dai::Path& pathLeft, const dai::Path& pathRight);
void loadMeshData(const std::vector<std::uint8_t>& dataLeft, const std::vector<std::uint8_t>& dataRight);
void setMeshStep(int width, int height);
void setInputResolution(int width, int height);
void setInputResolution(std::tuple<int, int> resolution);
void setOutputSize(int width, int height);
void setOutputKeepAspectRatio(bool keep);
[[deprecated("Use 'initialConfig.setMedianFilter()' instead")]] void setMedianFilter(dai::MedianFilter median);
void setDepthAlign(Properties::DepthAlign align);
void setDepthAlign(CameraBoardSocket camera);
[[deprecated("Use 'initialConfig.setConfidenceThreshold()' instead")]] void setConfidenceThreshold(int confThr);
void setRectification(bool enable);
void setLeftRightCheck(bool enable);
void setSubpixel(bool enable);
void setSubpixelFractionalBits(int subpixelFractionalBits);
void setExtendedDisparity(bool enable);
void setRectifyEdgeFillColor(int color);
[[deprecated("Function call should be removed")]] void setRectifyMirrorFrame(bool enable);
[[deprecated("Function call should be removed")]] void setOutputRectified(bool enable);
[[deprecated("Function call should be removed")]] void setOutputDepth(bool enable);
void setRuntimeModeSwitch(bool enable);
void setNumFramesPool(int numFramesPool);
[[deprecated("Use 'initialConfig.getMaxDisparity()' instead")]] float getMaxDisparity() const;
void setPostProcessingHardwareResources(int numShaves, int numMemorySlices);
void setDefaultProfilePreset(PresetMode mode);
[[deprecated("setFocalLengthFromCalibration is deprecated. Default value is true.")]] void setFocalLengthFromCalibration(bool focalLengthFromCalibration);
void useHomographyRectification(bool useHomographyRectification);
void enableDistortionCorrection(bool enableDistortionCorrection);
void setBaseline(float baseline);
void setFocalLength(float focalLength);
void setDisparityToDepthUseSpecTranslation(bool specTranslation);
void setRectificationUseSpecTranslation(bool specTranslation);
void setDepthAlignmentUseSpecTranslation(bool specTranslation);
void setAlphaScaling(float alpha);
};
} // namespace node
} // namespace dai