Spatial Calculator Multi-ROI
============================

This example shows how one can use multiple ROIs with a single :ref:`SpatialLocationCalculator` node. A similar logic could be used as a simple depth line
scanning camera for mobile robots.

.. rubric:: Similar samples:

- :ref:`Spatial location calculator`

Demo
####

.. image:: https://user-images.githubusercontent.com/18037362/190861621-b57fd1e3-5a3d-4d79-b1a7-d17a0b78c63e.gif

Setup
#####

.. include::  /includes/install_from_pypi.rst

Source code
###########

.. tabs::

    .. tab:: Python

        Also `available on GitHub <https://github.com/luxonis/depthai-python/blob/main/examples/SpatialDetection/spatial_calculator_multi_roi.py>`__

        .. literalinclude:: ../../../../examples/SpatialDetection/spatial_calculator_multi_roi.py
           :language: python
           :linenos:

    .. tab:: C++

        Also `available on GitHub <https://github.com/luxonis/depthai-core/blob/main/examples/SpatialDetection/spatial_calculator_multi_roi.cpp>`__

        .. literalinclude:: ../../../../depthai-core/examples/SpatialDetection/spatial_calculator_multi_roi.cpp
           :language: cpp
           :linenos:

.. include::  /includes/footer-short.rst
