# Camera Calibration : fx and fy

Hi, can somebody explain why I get focus lenghts fx AND fy? One focal lenght is "normal" for optical instruments using monochrom light. So what is the different of fx and fy? Thanks!

edit retag close merge delete

A question, can i compare thees values with the original focal lenght of my camera? My camera has a focal lenght =60mm , and after the calibration in open cv i have fx=38246.8 fy 38074.0 the pixel size is 0,00571

( 2015-06-10 05:01:45 -0600 )edit

Hi,

how can I get focal length in pixels from fx and fy? I need to get disparity using z = b*f / d,

where z is the depth (in meters), b is the horizontal baseline between the cameras (in meters), f is the (common) focal length of the cameras (in pixels), and d is the disparity (in pixels). At zero disparity, the rays from each camera are parallel, and the depth is infinite. Larger values for the disparity mean shorter distances.

I am using kinect with the focal length: fx_rgb = 5.1885790117450188e+02 * ratio; fy_rgb = 5.1946961112127485e+02 * ratio;

Kinect is not a stereo sensor, therefore I dont have a "baseline".

( 2016-03-29 11:25:55 -0600 )edit

^^ @ayeshas , please do not make answers, if you have a question or a comment.

( 2016-03-29 12:00:17 -0600 )edit

^^ @ayeshas , please do not make answers, if you have a question or a comment.

( 2016-03-29 12:00:28 -0600 )edit

Sort by ยป oldest newest most voted

You are right that a normal optical instrument has only one focal length. But here, you look at a combination of a lense and(!) a sensor that consist of a 2d-array of detectors (formerly known as pixels). Your focal length therefore has the unit meters/px. If your camera's pixel pattern is a perfect square, fx equals fy. If the pixels are a bit rectangular and not quadratic, fx differs from fy. This effect can be captured by using two different focal lengths.

There is even a version of the intrinsic calibration where there is a skew value that incorporates an angle between the rows and columns of your pixel array that is not 90deg.

more

If you need more explanation about the theory, have a look at the first section of the calibration tutorial here. It will explain why fx and fy are needed.

But basically, as @Ziyou said, it's because image are not square (I should say not spherical) but a rectangle. Therefore, you need an estimation of the focal on Height and the focal Width.

more

An image has two dimensions, thus have two focal length values.

more

Official site

GitHub

Wiki

Documentation