Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
dai::Pipeline Class Reference

Represents the pipeline, set of nodes and connections between them. More...

#include <Pipeline.hpp>

Public Types

using NodeConnectionMap = PipelineImpl::NodeConnectionMap
 
using NodeMap = PipelineImpl::NodeMap
 

Public Member Functions

Pipeline clone () const
 Clone the pipeline (Creates a copy) More...
 
template<class N >
std::shared_ptr< N > create ()
 
std::vector< std::shared_ptr< Node > > getAllNodes ()
 Get a vector of all nodes. More...
 
std::vector< std::shared_ptr< const Node > > getAllNodes () const
 Get a vector of all nodes. More...
 
AssetManagergetAssetManager ()
 Get pipelines AssetManager as reference. More...
 
const AssetManagergetAssetManager () const
 Get pipelines AssetManager as reference. More...
 
BoardConfig getBoardConfig () const
 Gets board configuration. More...
 
CalibrationHandler getCalibrationData () const
 
const NodeConnectionMapgetConnectionMap () const
 Get a reference to internal connection representation. More...
 
std::vector< Node::ConnectiongetConnections () const
 Get all connections. More...
 
Device::Config getDeviceConfig () const
 Get device configuration needed for this pipeline. More...
 
GlobalProperties getGlobalProperties () const
 
std::shared_ptr< NodegetNode (Node::Id id)
 Get node with id if it exists, nullptr otherwise. More...
 
std::shared_ptr< const NodegetNode (Node::Id id) const
 Get node with id if it exists, nullptr otherwise. More...
 
const NodeMapgetNodeMap () const
 Get a reference to internal node map. More...
 
OpenVINO::Version getOpenVINOVersion () const
 Get possible OpenVINO version to run this pipeline. More...
 
PipelineSchema getPipelineSchema (SerializationType type=DEFAULT_SERIALIZATION_TYPE) const
 
tl::optional< OpenVINO::VersiongetRequiredOpenVINOVersion () const
 Get required OpenVINO version to run this pipeline. Can be none. More...
 
bool isOpenVINOVersionCompatible (OpenVINO::Version version) const
 Checks whether a given OpenVINO version is compatible with the pipeline. More...
 
void link (const Node::Output &out, const Node::Input &in)
 
 Pipeline ()
 
 Pipeline (const std::shared_ptr< PipelineImpl > &pimpl)
 
void remove (std::shared_ptr< Node > node)
 Removes a node from pipeline. More...
 
void serialize (PipelineSchema &schema, Assets &assets, std::vector< std::uint8_t > &assetStorage) const
 
nlohmann::json serializeToJson () const
 Returns whole pipeline represented as JSON. More...
 
void setBoardConfig (BoardConfig board)
 Sets board configuration. More...
 
void setCalibrationData (CalibrationHandler calibrationDataHandler)
 
void setCameraTuningBlobPath (const dai::Path &path)
 Set a camera IQ (Image Quality) tuning blob, used for all cameras. More...
 
void setOpenVINOVersion (OpenVINO::Version version)
 Set a specific OpenVINO version to use with this pipeline. More...
 
void setSippBufferSize (int sizeBytes)
 
void setSippDmaBufferSize (int sizeBytes)
 
void setXLinkChunkSize (int sizeBytes)
 
void unlink (const Node::Output &out, const Node::Input &in)
 

Private Member Functions

PipelineImplimpl ()
 
const PipelineImplimpl () const
 

Private Attributes

std::shared_ptr< PipelineImplpimpl
 

Detailed Description

Represents the pipeline, set of nodes and connections between them.

Definition at line 100 of file Pipeline.hpp.

Member Typedef Documentation

◆ NodeConnectionMap

Definition at line 177 of file Pipeline.hpp.

◆ NodeMap

Definition at line 183 of file Pipeline.hpp.

Constructor & Destructor Documentation

◆ Pipeline() [1/2]

dai::Pipeline::Pipeline ( )

Constructs a new pipeline

Definition at line 19 of file Pipeline.cpp.

◆ Pipeline() [2/2]

dai::Pipeline::Pipeline ( const std::shared_ptr< PipelineImpl > &  pimpl)
explicit

Definition at line 46 of file Pipeline.cpp.

Member Function Documentation

◆ clone()

Pipeline dai::Pipeline::clone ( ) const

Clone the pipeline (Creates a copy)

Definition at line 24 of file Pipeline.cpp.

◆ create()

template<class N >
std::shared_ptr<N> dai::Pipeline::create ( )
inline

Adds a node to pipeline.

Node is specified by template argument N

Definition at line 145 of file Pipeline.hpp.

◆ getAllNodes() [1/2]

std::vector<std::shared_ptr<Node> > dai::Pipeline::getAllNodes ( )
inline

Get a vector of all nodes.

Definition at line 159 of file Pipeline.hpp.

◆ getAllNodes() [2/2]

std::vector<std::shared_ptr<const Node> > dai::Pipeline::getAllNodes ( ) const
inline

Get a vector of all nodes.

Definition at line 155 of file Pipeline.hpp.

◆ getAssetManager() [1/2]

AssetManager& dai::Pipeline::getAssetManager ( )
inline

Get pipelines AssetManager as reference.

Definition at line 219 of file Pipeline.hpp.

◆ getAssetManager() [2/2]

const AssetManager& dai::Pipeline::getAssetManager ( ) const
inline

Get pipelines AssetManager as reference.

Definition at line 214 of file Pipeline.hpp.

◆ getBoardConfig()

BoardConfig dai::Pipeline::getBoardConfig ( ) const
inline

Gets board configuration.

Definition at line 303 of file Pipeline.hpp.

◆ getCalibrationData()

CalibrationHandler dai::Pipeline::getCalibrationData ( ) const
inline

gets the calibration data which is set through pipeline

Returns
the calibrationHandler with calib data in the pipeline

Definition at line 242 of file Pipeline.hpp.

◆ getConnectionMap()

const NodeConnectionMap& dai::Pipeline::getConnectionMap ( ) const
inline

Get a reference to internal connection representation.

Definition at line 179 of file Pipeline.hpp.

◆ getConnections()

std::vector<Node::Connection> dai::Pipeline::getConnections ( ) const
inline

Get all connections.

Definition at line 173 of file Pipeline.hpp.

◆ getDeviceConfig()

Device::Config dai::Pipeline::getDeviceConfig ( ) const
inline

Get device configuration needed for this pipeline.

Definition at line 308 of file Pipeline.hpp.

◆ getGlobalProperties()

GlobalProperties dai::Pipeline::getGlobalProperties ( ) const
Returns
Global properties of current pipeline

Definition at line 50 of file Pipeline.cpp.

◆ getNode() [1/2]

std::shared_ptr<Node> dai::Pipeline::getNode ( Node::Id  id)
inline

Get node with id if it exists, nullptr otherwise.

Definition at line 168 of file Pipeline.hpp.

◆ getNode() [2/2]

std::shared_ptr<const Node> dai::Pipeline::getNode ( Node::Id  id) const
inline

Get node with id if it exists, nullptr otherwise.

Definition at line 164 of file Pipeline.hpp.

◆ getNodeMap()

const NodeMap& dai::Pipeline::getNodeMap ( ) const
inline

Get a reference to internal node map.

Definition at line 185 of file Pipeline.hpp.

◆ getOpenVINOVersion()

OpenVINO::Version dai::Pipeline::getOpenVINOVersion ( ) const
inline

Get possible OpenVINO version to run this pipeline.

Definition at line 247 of file Pipeline.hpp.

◆ getPipelineSchema()

PipelineSchema dai::Pipeline::getPipelineSchema ( SerializationType  type = DEFAULT_SERIALIZATION_TYPE) const
Returns
Pipeline schema

Definition at line 54 of file Pipeline.cpp.

◆ getRequiredOpenVINOVersion()

tl::optional<OpenVINO::Version> dai::Pipeline::getRequiredOpenVINOVersion ( ) const
inline

Get required OpenVINO version to run this pipeline. Can be none.

Definition at line 252 of file Pipeline.hpp.

◆ impl() [1/2]

PipelineImpl* dai::Pipeline::impl ( )
inlineprivate

Definition at line 102 of file Pipeline.hpp.

◆ impl() [2/2]

const PipelineImpl* dai::Pipeline::impl ( ) const
inlineprivate

Definition at line 105 of file Pipeline.hpp.

◆ isOpenVINOVersionCompatible()

bool dai::Pipeline::isOpenVINOVersionCompatible ( OpenVINO::Version  version) const
inline

Checks whether a given OpenVINO version is compatible with the pipeline.

Definition at line 293 of file Pipeline.hpp.

◆ link()

void dai::Pipeline::link ( const Node::Output out,
const Node::Input in 
)
inline

Link output to an input. Both nodes must be on the same pipeline

Throws an error if they aren't or cannot be connected

Parameters
outNodes output to connect from
inNodes input to connect to

Definition at line 197 of file Pipeline.hpp.

◆ remove()

void dai::Pipeline::remove ( std::shared_ptr< Node node)
inline

Removes a node from pipeline.

Definition at line 150 of file Pipeline.hpp.

◆ serialize()

void dai::Pipeline::serialize ( PipelineSchema schema,
Assets assets,
std::vector< std::uint8_t > &  assetStorage 
) const
inline

Definition at line 130 of file Pipeline.hpp.

◆ serializeToJson()

nlohmann::json dai::Pipeline::serializeToJson ( ) const
inline

Returns whole pipeline represented as JSON.

Definition at line 135 of file Pipeline.hpp.

◆ setBoardConfig()

void dai::Pipeline::setBoardConfig ( BoardConfig  board)
inline

Sets board configuration.

Definition at line 298 of file Pipeline.hpp.

◆ setCalibrationData()

void dai::Pipeline::setCalibrationData ( CalibrationHandler  calibrationDataHandler)
inline

Sets the calibration in pipeline which overrides the calibration data in eeprom

Parameters
calibrationDataHandlerCalibrationHandler object which is loaded with calibration information.

Definition at line 233 of file Pipeline.hpp.

◆ setCameraTuningBlobPath()

void dai::Pipeline::setCameraTuningBlobPath ( const dai::Path path)
inline

Set a camera IQ (Image Quality) tuning blob, used for all cameras.

Definition at line 257 of file Pipeline.hpp.

◆ setOpenVINOVersion()

void dai::Pipeline::setOpenVINOVersion ( OpenVINO::Version  version)
inline

Set a specific OpenVINO version to use with this pipeline.

Definition at line 224 of file Pipeline.hpp.

◆ setSippBufferSize()

void dai::Pipeline::setSippBufferSize ( int  sizeBytes)
inline

SIPP (Signal Image Processing Pipeline) internal memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. By default memory is allocated in high speed CMX memory. Setting to 0 will allocate in DDR 256 kilobytes. Units are bytes.

Definition at line 277 of file Pipeline.hpp.

◆ setSippDmaBufferSize()

void dai::Pipeline::setSippDmaBufferSize ( int  sizeBytes)
inline

SIPP (Signal Image Processing Pipeline) internal DMA memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. Memory is allocated in high speed CMX memory Units are bytes.

Definition at line 288 of file Pipeline.hpp.

◆ setXLinkChunkSize()

void dai::Pipeline::setXLinkChunkSize ( int  sizeBytes)
inline

Set chunk size for splitting device-sent XLink packets, in bytes. A larger value could increase performance, with 0 disabling chunking. A negative value won't modify the device defaults - configured per protocol, currently 64*1024 for both USB and Ethernet.

Definition at line 266 of file Pipeline.hpp.

◆ unlink()

void dai::Pipeline::unlink ( const Node::Output out,
const Node::Input in 
)
inline

Unlink output from an input.

Throws an error if link doesn't exists

Parameters
outNodes output to unlink from
inNodes input to unlink to

Definition at line 209 of file Pipeline.hpp.

Member Data Documentation

◆ pimpl

std::shared_ptr<PipelineImpl> dai::Pipeline::pimpl
private

Definition at line 101 of file Pipeline.hpp.


The documentation for this class was generated from the following files:


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:20