ToF depth ========= This is a sample code that showcases how to use the ToF sensor. The :ref:`ToF node ` converts raw data from the ToF sensor into a depth map. Demo #### This demo was recorded using the `OAK-D SR PoE `__, that's why we selected CAM_A port on the ToF sensor. .. raw:: html
With keyboard you can configure ToF settings: * *FPPN Correction*; Turn on/off with `f`. It's a process that corrects the fixed pattern noise (FPN) of the ToF sensor. Should be enabled. * *Wiggle Correction*: Turn on/off with `w`. It's a process that corrects the wiggle effect of the ToF sensor. Should be enabled. * *Temperature Correction*: Turn on/off with `t`. It's a process that corrects the temperature effect of the ToF sensor. Should be enabled. * *Optical Correction*: Turn on/off with `o`. It's a process that corrects the optical effect (On -> ToF returns distance represented by Green Line), so it matches stereo depth reporting. * *Phase Unwrapping* - Process that corrects the phase wrapping effect of the ToF sensor. The higher the number, the longer the ToF range, but it also increases the noise. * `0` - Disabled, up to ~1.87 meters * `1` - Up to ~3 meters * `2` - Up to ~4.5 meters * `3` - Up to ~6 meters * `4` - Up to ~7.5 meters .. image:: /_static/images/components/tof-optical-correction.png Setup ##### .. include:: /includes/install_from_pypi.rst Source code ########### .. tabs:: .. tab:: Python Also `available on GitHub `__ .. literalinclude:: ../../../../examples/ToF/tof_depth.py :language: python :linenos: .. tab:: C++ .. Also `available on GitHub `__ .. literalinclude:: ../../../../depthai-core/examples/ToF/tof_depth.cpp :language: cpp :linenos: .. include:: /includes/footer-short.rst