Custom Trigger

This example shows how to set custom trigger condition in DepthAI SDK. The trigger condition returns a boolean value if the condition is met. In this case the trigger will start a recording of disparity stream when all depth values are below 1 meter.

Note

Visualization in current example is done with blocking behavor. This means that the program will halt at oak.start() until the window is closed. This is done to keep the example simple. For more advanced usage, see Blocking behavior section.

Setup

Please run the install script to download all required dependencies. Please note that this script must be ran from git context, so you have to download the depthai repository first and then run the script

git clone https://github.com/luxonis/depthai.git
cd depthai/
python3 install_requirements.py

For additional information, please follow our installation guide.

Pipeline

Pipeline graph

Source Code

Got questions?

Head over to Discussion Forum for technical support or any other questions you might have.