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
7 changes: 4 additions & 3 deletions docs/source/samples/calibration/calibration_reader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Here's theoretical calculation of the focal length in pixels:

.. math::

focalLength = width_px * 0.5 / tan(hfov * 0.5 * pi / 180)
f_x = \text{width}_x \cdot \frac{1}{\tan \left(\frac{\text{HFOV}_x}{2}\frac{\pi}{180}\right)}

To get the HFOV you can use `this script <https://gist.github.com/Erol444/4aff71f4576637624d56dce4a60ad62e>`__, which also works for wide-FOV cameras and allows you to
specif alpha parameter.
Expand All @@ -36,13 +36,14 @@ With 400P (640x400) camera resolution where HFOV=71.9 degrees:

.. math::

focalLength = 640 * 0.5 / tan(71.9 * 0.5 * PI / 180) = 441.25
f_x = 640 \cdot \frac{1}{\tan \left(\frac{71.9}{2}\frac{\pi}{180}\right)} = 441.25

And for 800P (1280x800) camera resolution where HFOV=71.9 degrees:

.. math::

focalLength = 1280 * 0.5 / tan(71.9 * 0.5 * PI / 180) = 882.5
f_x = 1280 \cdot \frac{1}{\tan \left(\frac{71.9}{2}\frac{\pi}{180}\right)} = 882.5




Expand Down
4 changes: 2 additions & 2 deletions docs/source/tutorials/configuring-stereo-depth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ Let's first look at how the depth is calculated:

.. math::

depth [mm] = focalLength [pix] * baseline [mm] / disparity [pix]
\text{depth[mm]} =f_{x}\text{[px]} \cdot \frac{\text{baseline[mm]}}{\text{disparity[px]}}

Examples for calculating the depth value, using the OAK-D (7.5cm baseline OV9282), for 400P resolution and disparity of 50 pixels:

.. math::

depth = 441.25 * 7.5 / 50 = 66.19 cm
\text{depth} = 441.25 \cdot \frac{7.5}{50} = 66.19 \text{ cm}

`RVC2 <https://docs.luxonis.com/projects/hardware/en/latest/pages/rvc/rvc2.html>`__-based cameras have a **0..95 disparity search** range,
which limits the minimal depth perception. Baseline is the distance between two cameras of the
Expand Down