# ToF Depth Perception

Time-of-flight (ToF) technology works by sending out modulated light signal (infrared, at 940nm in our case), which bounces off
objects and returns to the sensor. The sensor then measures the time taken by the light to travel back and uses this to calculate
the distance (depth) of the object/scene from the sensor.

| Specs | Value |
| --- | --- |
| Depth range limits | 20cm - 5m |
| Depth accuracy | <1% indoors, <2% outdoors |
| Depth precision | <0.1% |
| VSCEL wavelength | 940nm |
| Output interface: | 2-lane MIPI |
| Ideal operating range [1] | 0°C - 60°C |
| Operating temperature [2] | -20°C to 70°C |

[1]: No visible degradation of the depth quality [2]: ToF is still fully functioning

Note that the temperature ranges are for the ToF sensor itself, not for the whole camera. The SoM/RVC2 itself heats up the whole
camera quite a bit, and we haven’t yet measured the ambient temperature ranges for the OAK-D ToF.

## ToF vs Stereo for depth perception

#### Environment

 * Active stereo cameras can work in low-light conditions but might struggle outside, as dots from dot projector are not visible
   in sunlight (due to overexposure/saturation)
 * ToF isn’t as affected by the lighting conditions; it works in low-light environments and outside (a lot of light) as well

#### Depth error

 * Stereo depth cameras usually have below 3% of depth error. Its depth error increases exponentially with distance.
 * ToF sensors have a depth error of <1% indoors, <2% outdoors. Its depth error doesn’t increase exponentially with distance.

#### Potential Stereo issues

 * Repetitive textures (workaround: [lower confidence
   threshold)](https://docs.luxonis.com/hardware/platform/depth/configuring-stereo-depth.md#stereo-depth-confidence-threshold)
 * Reflective surfaces / Transparent surfaces
 * Occlusions (workaround: [Left-Right
   check)](https://docs.luxonis.com/software/depthai-components/nodes/stereo_depth.md#currently-configurable-blocks)
 * Textureless surfaces (workaround: [active
   stereo)](https://docs.luxonis.com/hardware/platform/depth/configuring-stereo-depth.md#scene-texture)
 * Disparity jumps (workaround: [subpixel
   mode)](https://docs.luxonis.com/hardware/platform/depth/configuring-stereo-depth.md#stereo-subpixel-effect-on-layering)

#### Potential ToF issues

 * Issues when using multiple ToFs (interference)
 * Reflective surfaces / Transparent surfaces
 * Multiple-path reflections (where the light bounces off multiple surfaces before returning to the sensor)
 * Limited resolution: 640x480, which is considered quite high among ToF sensors.
