Ask Your Question
0

Calculation of focal length

asked 2018-10-26 03:51:55 -0600

Hello, I have to calculate the focal length. My parameters are the Matrix of the intrinsic parameters, Nx and Ny(number of pixel in x and y direction). Someone can help me? Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-10-26 09:21:17 -0600

kbarni gravatar image
FL=(d/2)/tan(a/2)

where FL is the focal length, d is the sensor diagonal and a is the diagonal field of view.

The resolution (Nx and Ny) and the other parameters of the camera don't have any incidence on the focal length.

N.B. this formula is true in the other side of the lens too. For example to get the height of the image (the object that fits in the image) OH at a given distance D given a vertical angle of view av:

OH=2*D*tan(av/2)

More details on angle of view, focal length and image area here.

edit flag offensive delete link more

Comments

Thanks for your answer. The problem is that I don't have d and a, in your formula. Maybe I can do something with intrinsic matrix?. It's something like this: K =[1. 3, 0, 0.3; 0, 1.3, 0.3; 0, 0,0.001]; Thanks again.

Leonard993 gravatar imageLeonard993 ( 2018-10-26 12:20:29 -0600 )edit

That is probably not enough. The intrinsic camera matrix doesn't contain any information about the physical dimensions of the sensor, which is needed to get the focal distance.

Take a look at this document for explanation of the camera matrix and how to get the focal length from it.

kbarni gravatar imagekbarni ( 2018-10-26 13:56:12 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-10-26 03:51:55 -0600

Seen: 1,241 times

Last updated: Oct 26 '18