Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/source/components/nodes/spatial_location_calculator.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
SpatialLocationCalculator
=========================

SpatialLocationCalculator will calculate the depth based on the :code:`depth` map from the :code:`inputDepth` and ROI (region-of-interest)
provided from the :code:`inputConfig`. It will average the depth values in the ROI and remove the ones out of range.
**SpatialLocationCalculator node** calculates the spatial coordinates of the ROI (region-of-interest) based on the
:code:`depth` map from the :code:`inputDepth`. It will average the depth values in the ROI and remove the ones out of range.

You can also calculate spatial coordiantes on host side, `demo here <https://github.com/luxonis/depthai-experiments/tree/master/gen2-calc-spatials-on-host>`__.
The demo also has the same logic that's performed on the device (:code:`calc.py` file).

.. image:: https://user-images.githubusercontent.com/18037362/146296930-9e7071f5-33b9-45f9-af21-cace7ffffc0f.gif

How to place it
###############
Expand Down
14 changes: 10 additions & 4 deletions docs/source/samples/ImageManip/rgb_rotate_warp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ Setup
Demo
####

.. raw:: html
.. image:: https://user-images.githubusercontent.com/18037362/152208899-461fa163-42ec-4922-84b5-5cd09332ea32.png

.. code-block::

=== Controls:
z -rotated rectangle crop, decrease rate
x -rotated rectangle crop, increase rate
c -warp 4-point transform, cycle through modes
v -resize cropped region, or disable resize
h -print controls (help)

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
<iframe src="https://www.youtube.com/embed/31K5dTLHQac" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
</div>

Source code
###########
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Spatial location calculator
This example shows how to retrieve spatial location data (X,Y,Z) on a runtime configurable ROI. You can move the ROI using WASD keys.
X,Y,Z coordinates are relative to the center of depth map.

setConfidenceThreshold - confidence threshold above which objects are detected
You can also calculate spatial coordiantes on host side, `demo here <https://github.com/luxonis/depthai-experiments/tree/master/gen2-calc-spatials-on-host>`__.

.. rubric:: Similar samples:

Expand All @@ -16,11 +16,7 @@ setConfidenceThreshold - confidence threshold above which objects are detected
Demo
####

.. raw:: html

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
<iframe src="https://www.youtube.com/embed/mbZViuS4WEQ" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
</div>
.. image:: https://user-images.githubusercontent.com/18037362/146296930-9e7071f5-33b9-45f9-af21-cace7ffffc0f.gif

Setup
#####
Expand Down