Skip to content

Commit af360d5

Browse files
authored
Update calibration_reader.rst (#973)
Fixed focal length formulas
1 parent a16efa1 commit af360d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/source/samples/calibration/calibration_reader.rst

Lines changed: 3 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-
f_x = \text{width}_x \cdot \frac{1}{\tan \left(\frac{\text{HFOV}_x}{2}\frac{\pi}{180}\right)}
30+
f_x = \text{width}_x \cdot \frac{1}{2 \cdot \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,13 @@ With 400P (640x400) camera resolution where HFOV=71.9 degrees:
3636

3737
.. math::
3838
39-
f_x = 640 \cdot \frac{1}{\tan \left(\frac{71.9}{2}\frac{\pi}{180}\right)} = 441.25
39+
f_x = 640 \cdot \frac{1}{2 \cdot \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-
f_x = 1280 \cdot \frac{1}{\tan \left(\frac{71.9}{2}\frac{\pi}{180}\right)} = 882.5
45+
f_x = 1280 \cdot \frac{1}{2 \cdot \tan \left(\frac{71.9}{2}\frac{\pi}{180}\right)} = 882.5
4646
4747
4848

0 commit comments

Comments
 (0)