Skip to content

Files

Latest commit

author
Matevz Morato
Jun 27, 2022
e4746ff · Jun 27, 2022

History

History
This branch is 3 commits ahead of, 254 commits behind luxonis/depthai-experiments:master.

gen2-calc-spatials-on-host

Calculate spatial coordinates on the host

This example shows how to calcualte spatial coordinates of a ROI on the host and gets depth frames from the device. Other option is to use SpatialLocationCalculator to calcualte spatial coordinates on the device.

If you already have depth frames and ROI (Region-Of-Interest, eg. bounding box of an object) / POI (Point-Of-Interest, eg. feature/key-point) on the host, it might be easier to just calculate the spatial coordiantes of that region/point on the host, instead of sending depth/ROI back to the device.

Note using single points / tiny ROIs (eg. 3x3) should be avoided, as depth frame can be noisy, so you should use at least 10x10 depth pixels ROI. Also note that to maximize spatial coordinates accuracy, you should define min and max threshold accurately.

Demo

Demo

Installation

python3 -m pip install -r requirements.txt