Frame syncing on OAK¶
This example showcases how you can use Script node to perform Message syncing of multiple streams. Example uses ImgFrame’s timestamps to achieve syncing precision.
Similar syncing demo scripts (python) can be found at our depthai-experiments repository in gen2-syncing folder.
Demo¶
Terminal log after about 13 minutes. Color and disparity streams are perfectly in-sync.
[1662574807.8811488] Stream rgb, timestamp: 7:26:21.601595, sequence number: 21852 [1662574807.8821492] Stream disp, timestamp: 7:26:21.601401, sequence number: 21852
[1662574807.913144] Stream rgb, timestamp: 7:26:21.634982, sequence number: 21853 [1662574807.9141443] Stream disp, timestamp: 7:26:21.634730, sequence number: 21853
[1662574807.9451444] Stream rgb, timestamp: 7:26:21.668243, sequence number: 21854 [1662574807.946151] Stream disp, timestamp: 7:26:21.668057, sequence number: 21854
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-python repository first and then run the script
git clone https://github.com/luxonis/depthai-python.git
cd depthai-python/examples
python3 install_requirements.py
For additional information, please follow installation guide
This example script requires external file(s) to run. If you are using:
depthai-python, run
python3 examples/install_requirements.py
to download required file(s)dephtai-core, required file(s) will get downloaded automatically when building the example
Source code¶
Also available on GitHub
Also available on GitHub