SpatialDetectionNetwork node. Runs a neural inference on input image and calculates spatial location data. More...
#include <SpatialDetectionNetwork.hpp>
Public Member Functions | |
void | setBoundingBoxScaleFactor (float scaleFactor) |
void | setDepthLowerThreshold (uint32_t lowerThreshold) |
void | setDepthUpperThreshold (uint32_t upperThreshold) |
void | setSpatialCalculationAlgorithm (dai::SpatialLocationCalculatorAlgorithm calculationAlgorithm) |
void | setSpatialCalculationStepSize (int stepSize) |
![]() | |
std::unique_ptr< Node > | clone () const override |
const char * | getName () const override |
Public Attributes | |
Output | boundingBoxMapping {*this, "boundingBoxMapping", Output::Type::MSender, {{DatatypeEnum::SpatialLocationCalculatorConfig, false}}} |
Input | input {*this, "in", Input::Type::SReceiver, true, 5, true, {{DatatypeEnum::ImgFrame, false}}} |
Input | inputDepth {*this, "inputDepth", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}} |
Output | out {*this, "out", Output::Type::MSender, {{DatatypeEnum::SpatialImgDetections, false}}} |
Output | passthrough {*this, "passthrough", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
Output | passthroughDepth {*this, "passthroughDepth", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
Output | spatialLocationCalculatorOutput |
![]() | |
Properties & | properties |
Underlying properties. More... | |
Static Public Attributes | |
constexpr static const char * | NAME = "SpatialDetectionNetwork" |
Protected Member Functions | |
SpatialDetectionNetwork (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId) | |
SpatialDetectionNetwork (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId, std::unique_ptr< Properties > props) | |
Additional Inherited Members | |
![]() | |
using | Properties = SpatialDetectionNetworkProperties |
SpatialDetectionNetwork node. Runs a neural inference on input image and calculates spatial location data.
Definition at line 20 of file SpatialDetectionNetwork.hpp.
|
protected |
Definition at line 14 of file SpatialDetectionNetwork.cpp.
|
protected |
Definition at line 16 of file SpatialDetectionNetwork.cpp.
void SpatialDetectionNetwork::setBoundingBoxScaleFactor | ( | float | scaleFactor | ) |
Specifies scale factor for detected bounding boxes.
scaleFactor | Scale factor must be in the interval (0,1]. |
Definition at line 22 of file SpatialDetectionNetwork.cpp.
void SpatialDetectionNetwork::setDepthLowerThreshold | ( | uint32_t | lowerThreshold | ) |
Specifies lower threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
lowerThreshold | LowerThreshold must be in the interval [0,upperThreshold] and less than upperThreshold. |
Definition at line 26 of file SpatialDetectionNetwork.cpp.
void SpatialDetectionNetwork::setDepthUpperThreshold | ( | uint32_t | upperThreshold | ) |
Specifies upper threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
upperThreshold | UpperThreshold must be in the interval (lowerThreshold,65535]. |
Definition at line 30 of file SpatialDetectionNetwork.cpp.
void SpatialDetectionNetwork::setSpatialCalculationAlgorithm | ( | dai::SpatialLocationCalculatorAlgorithm | calculationAlgorithm | ) |
Specifies spatial location calculator algorithm: Average/Min/Max
calculationAlgorithm | Calculation algorithm. |
Definition at line 34 of file SpatialDetectionNetwork.cpp.
void SpatialDetectionNetwork::setSpatialCalculationStepSize | ( | int | stepSize | ) |
Specifies spatial location calculator step size for depth calculation. Step size 1 means that every pixel is taken into calculation, size 2 means every second etc.
stepSize | Step size. |
Definition at line 38 of file SpatialDetectionNetwork.cpp.
Output dai::node::SpatialDetectionNetwork::boundingBoxMapping {*this, "boundingBoxMapping", Output::Type::MSender, {{DatatypeEnum::SpatialLocationCalculatorConfig, false}}} |
Outputs mapping of detected bounding boxes relative to depth map
Suitable for when displaying remapped bounding boxes on depth frame
Definition at line 51 of file SpatialDetectionNetwork.hpp.
Input dai::node::SpatialDetectionNetwork::input {*this, "in", Input::Type::SReceiver, true, 5, true, {{DatatypeEnum::ImgFrame, false}}} |
Input message with data to be inferred upon Default queue is blocking with size 5
Definition at line 33 of file SpatialDetectionNetwork.hpp.
Input dai::node::SpatialDetectionNetwork::inputDepth {*this, "inputDepth", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}} |
Input message with depth data used to retrieve spatial information about detected object Default queue is non-blocking with size 4
Definition at line 39 of file SpatialDetectionNetwork.hpp.
|
staticconstexpr |
Definition at line 22 of file SpatialDetectionNetwork.hpp.
Output dai::node::SpatialDetectionNetwork::out {*this, "out", Output::Type::MSender, {{DatatypeEnum::SpatialImgDetections, false}}} |
Outputs ImgDetections message that carries parsed detection results.
Definition at line 44 of file SpatialDetectionNetwork.hpp.
Output dai::node::SpatialDetectionNetwork::passthrough {*this, "passthrough", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
Passthrough message on which the inference was performed.
Suitable for when input queue is set to non-blocking behavior.
Definition at line 58 of file SpatialDetectionNetwork.hpp.
Output dai::node::SpatialDetectionNetwork::passthroughDepth {*this, "passthroughDepth", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
Passthrough message for depth frame on which the spatial location calculation was performed.
Suitable for when input queue is set to non-blocking behavior.
Definition at line 65 of file SpatialDetectionNetwork.hpp.
Output dai::node::SpatialDetectionNetwork::spatialLocationCalculatorOutput |
Output of SpatialLocationCalculator node, which is used internally by SpatialDetectionNetwork. Suitable when extra information is required from SpatialLocationCalculator node, e.g. minimum, maximum distance.
Definition at line 71 of file SpatialDetectionNetwork.hpp.