Skip to content

Commit e5f2c09

Browse files
authored
Merge branch 'main' into main
2 parents ca875ea + 600e863 commit e5f2c09

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docs/source/samples/calibration/calibration_reader.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Here's theoretical calculation of the focal length in pixels:
2727

2828
.. math::
2929
30-
focalLength = width_px * 0.5 / tan(hfov * 0.5 * pi / 180)
30+
f_x = \text{width}_x \cdot \frac{1}{\tan \left(\frac{\text{HFOV}_x}{2}\frac{\pi}{180}\right)}
3131
3232
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
3333
specif alpha parameter.
@@ -36,13 +36,14 @@ With 400P (640x400) camera resolution where HFOV=71.9 degrees:
3636

3737
.. math::
3838
39-
focalLength = 640 * 0.5 / tan(71.9 * 0.5 * PI / 180) = 441.25
39+
f_x = 640 \cdot \frac{1}{\tan \left(\frac{71.9}{2}\frac{\pi}{180}\right)} = 441.25
4040
4141
And for 800P (1280x800) camera resolution where HFOV=71.9 degrees:
4242

4343
.. math::
4444
45-
focalLength = 1280 * 0.5 / tan(71.9 * 0.5 * PI / 180) = 882.5
45+
f_x = 1280 \cdot \frac{1}{\tan \left(\frac{71.9}{2}\frac{\pi}{180}\right)} = 882.5
46+
4647
4748
4849

docs/source/tutorials/configuring-stereo-depth.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ Let's first look at how the depth is calculated:
3434

3535
.. math::
3636
37-
depth [mm] = focalLength [pix] * baseline [mm] / disparity [pix]
37+
\text{depth[mm]} =f_{x}\text{[px]} \cdot \frac{\text{baseline[mm]}}{\text{disparity[px]}}
3838
3939
Examples for calculating the depth value, using the OAK-D (7.5cm baseline OV9282), for 400P resolution and disparity of 50 pixels:
4040

4141
.. math::
4242
43-
depth = 441.25 * 7.5 / 50 = 66.19 cm
43+
\text{depth} = 441.25 \cdot \frac{7.5}{50} = 66.19 \text{ cm}
4444
4545
`RVC2 <https://docs.luxonis.com/projects/hardware/en/latest/pages/rvc/rvc2.html>`__-based cameras have a **0..95 disparity search** range,
4646
which limits the minimal depth perception. Baseline is the distance between two cameras of the

0 commit comments

Comments
 (0)