Pipeline
Pipeline is a collection of Nodes and links between them. This flow provides an extensive flexibility that users get for their OAK device.Pipeline first steps
To get DepthAI up and running, you have to create a pipeline, populate it with nodes, configure the nodes and link them together. After that, the pipeline can be loaded onto the Device and be started.Python
1with dai.Pipeline() as pipeline:
2
3 # Create nodes, configure them and link them together
4 ...
5
6 # Upload the pipeline to the device
7 pipeline.start()
Using multiple devices
If user has multiple Luxonis' devices, each device can run a different pipeline or the same pipeline. See Multi-device Setup for more information.How to place it
Python
C++
Python
Python
1pipeline = dai.Pipeline() # though we usually prefer to use the context manager (with statement)
Reference
class
dai::Pipeline
inline function
PipelineImpl * impl()
inline function
const PipelineImpl * impl()
inline function
std::vector< std::shared_ptr< Node > > getSourceNodes()
explicit function
Pipeline(bool createImplicitDevice)
Creates a pipeline
Parameters
- createImplicitDevice: If true, creates a default device (default = true)
explicit function
Pipeline(std::shared_ptr< Device > device)
Creates a pipeline with specified device
explicit function
Pipeline(std::shared_ptr< PipelineImpl > pimpl)
Creates a pipeline with specified device
inline function
GlobalProperties getGlobalProperties()
Returns
Global properties of current pipeline
inline function
void setGlobalProperties(GlobalProperties globalProperties)
Sets global properties of pipeline
function
PipelineSchema getPipelineSchema(SerializationType type)
Returns
Pipeline schema
inline function
void serialize(PipelineSchema & schema, Assets & assets, std::vector< std::uint8_t > & assetStorage)
inline function
nlohmann::json serializeToJson(bool includeAssests)
inline function
std::shared_ptr< N > create(Args &&... args)
inline function
void add(std::shared_ptr< Node > node)
Adds an existing node to the pipeline
inline function
void remove(std::shared_ptr< Node > node)
inline function
std::vector< std::shared_ptr< Node > > getAllNodes()
inline function
inline function
inline function
std::vector< Node::Connection > getConnections()
inline function
NodeConnectionMap getConnectionMap()
inline function
const AssetManager & getAssetManager()
inline function
AssetManager & getAssetManager()
inline function
void setOpenVINOVersion(OpenVINO::Version version)
inline function
void setCalibrationData(CalibrationHandler calibrationDataHandler)
Sets the calibration in pipeline which overrides the calibration data in eeprom
Parameters
- calibrationDataHandler: CalibrationHandler object which is loaded with calibration information.
inline function
CalibrationHandler getCalibrationData()
gets the calibration data which is set through pipeline
Returns
the calibrationHandler with calib data in the pipeline
inline function
bool isCalibrationDataAvailable()
check if calib data has been set or the default will be returned
Returns
true - calib data has been set
Returns
false - calib data has not been set - default will be returned
inline function
std::optional< EepromData > getEepromData()
gets the eeprom data from the pipeline
Returns
eepromData from the the pipeline
inline function
void setEepromData(std::optional< EepromData > eepromData)
Sets the eeprom data in pipeline
Parameters
- eepromData: EepromData object that is loaded in the pipeline.
inline function
void setCameraTuningBlobPath(const dai::Path & path)
inline function
void setXLinkChunkSize(int sizeBytes)
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.
inline function
void setSippBufferSize(int sizeBytes)
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.
inline function
void setSippDmaBufferSize(int sizeBytes)
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.
inline function
void setBoardConfig(BoardConfig board)
inline function
BoardConfig getBoardConfig()
inline function
Device::Config getDeviceConfig()
inline function
bool isRunning()
inline function
bool isBuilt()
inline function
void build()
inline function
void start()
inline function
void wait()
inline function
void stop()
inline function
void processTasks(bool waitForTasks, double timeoutSeconds)
inline function
void run()
inline function
std::shared_ptr< Device > getDefaultDevice()
inline function
void addTask(std::function< void()> task)
function
void enableHolisticRecord(const RecordConfig & config)
function
void enableHolisticReplay(const std::string & pathToRecording)
enum