Class NeuralDepth

Inheritance Relationships

Base Type

Class Documentation

class NeuralDepth : public dai::DeviceNodeCRTP<DeviceNode, NeuralDepth, NeuralDepthProperties>

NeuralDepth node. Compute depth from left-right image pair using neural network.

Public Functions

NeuralDepth &setRectification(bool enable)

Enable or disable rectification (useful for prerectified inputs)

std::shared_ptr<NeuralDepth> build(Output &left, Output &right, DeviceModelZoo model = DeviceModelZoo::NEURAL_DEPTH_SMALL)
virtual void buildInternal() override

Function called from within the create function to build the node. This function is useful for initialization, setting up inputs and outputs = stuff that cannot be perform in the constuctor.

Public Members

std::shared_ptr<NeuralDepthConfig> initialConfig = std::make_shared<NeuralDepthConfig>()

Initial config to use for NeuralDepth.

Subnode<Sync> sync = {*this, "sync"}
Subnode<MessageDemux> messageDemux = {*this, "messageDemux"}
Subnode<Rectification> rectification = {*this, "rectification"}
Subnode<NeuralNetwork> neuralNetwork = {*this, "neuralNetwork"}
Input &left = {sync->inputs["left"]}

Input for left ImgFrame of left-right pair

Input &right = {sync->inputs["right"]}

Input for right ImgFrame of left-right pair

Output &rectifiedLeft = {rectification->output1}

Output for rectified left ImgFrame

Output &rectifiedRight = {rectification->output2}

Output for rectified right ImgFrame

Input inputConfig = {*this, {"inputConfig", DEFAULT_GROUP, true, 5, {{{DatatypeEnum::NeuralDepthConfig, false}}}}}

Input config to modify parameters in runtime.

Input nnDataInput = {*this, {"nnDataInput", DEFAULT_GROUP, true, 5, {{{DatatypeEnum::NNData, false}}}}}

Input NNData to parse

Input leftInternal = {*this, {"leftFrameInternal", DEFAULT_GROUP, false, 1, {{{DatatypeEnum::ImgFrame, false}}}}}

Input left frame internal, used to extract frame info

Input rightInternal = {*this, {"rightFrameInternal", DEFAULT_GROUP, false, 1, {{{DatatypeEnum::ImgFrame, false}}}}}

Input right frame internal, used to extract frame info

Output disparity = {*this, {"disparity", DEFAULT_GROUP, {{{DatatypeEnum::ImgFrame, false}}}}}

Output disparity ImgFrame

Output depth = {*this, {"depth", DEFAULT_GROUP, {{{DatatypeEnum::ImgFrame, false}}}}}

Output depth ImgFrame

Output edge = {*this, {"edge", DEFAULT_GROUP, {{{DatatypeEnum::ImgFrame, false}}}}}

Output edge ImgFrame

Output confidence = {*this, {"confidence", DEFAULT_GROUP, {{{DatatypeEnum::ImgFrame, false}}}}}

Output confidence ImgFrame

Public Static Functions

static std::pair<int, int> getInputSize(DeviceModelZoo model)

Get input size for specific model

Public Static Attributes

static constexpr const char *NAME = "NeuralDepth"

Protected Functions

virtual Properties &getProperties() override
NeuralDepth() = default
NeuralDepth(std::unique_ptr<Properties> props)
inline DeviceNodeCRTP()
inline DeviceNodeCRTP(const std::shared_ptr<Device> &device)
inline DeviceNodeCRTP(std::unique_ptr<Properties> props)
inline DeviceNodeCRTP(std::unique_ptr<Properties> props, bool confMode)
inline DeviceNodeCRTP(const std::shared_ptr<Device> &device, std::unique_ptr<Properties> props, bool confMode)