Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the focal length in the camera intrinsics matrix have two dimensions?

In the pinhole camera model there is only one focal length which is between the principal point and the camera center.

However, after calculating the camera's intrinsic parameters, the matrix contains

(fx,  0,  offsetx,  0,  0,  fy,  offsety,  0,  0,   0,  1,        0) 

Is this because the pixels of the image sensor are not square in x and y?

Thank you.

like image 636
binzhang Avatar asked May 02 '13 03:05

binzhang


People also ask

What is a camera intrinsic matrix?

The intrinsic matrix (commonly represented in equations as K ) allows you to transform 3D coordinates to 2D coordinates on an image plane using the pinhole camera model. The values fx and fy are the pixel focal length, and are identical for square pixels.

How do you find the focal length of a projection matrix?

The focal length is merely the first element in the matrix ( m11 ). The focal point, however, cannot be extracted from this matrix alone - you need the camera direction D and position P . Once you have them, simply do P + D * m11 to obtain the focal point.


1 Answers

In short: yes. In order to make a mathematical model that can describe a camera with rectangular pixels, you have to introduce two separate focal lengths. I'll quote from the often recommended "Learning OpenCV" (p. 373) which covers that section pretty well and which I recommend getting if you would like more background on this:

The focal length fx (for example) is actually the product of the physical focal length of the lens and the size sx of the individual imager elements (this should make sense because sx has units of pixels per millimeter while F has units of millimeters, which means that fx is in the required units of pixels). [...] It is important to keep in mind, though, that sx and sy cannot be measured directly via any camera calibration process, and neither is the physical focal length F directly measurable. Only the combinations fx = F*sx and fy = F*sy can be derived without actually dismantling the camera and measuring its components directly.

like image 109
FvD Avatar answered Sep 21 '22 02:09

FvD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!