how to calculate field of view of the camera from camera intrinsic matrix?

Wooni picture Wooni · Oct 12, 2016 · Viewed 15.3k times · Source

I got camera intrinsic matrix and distortion parameters using camera calibration.

The unit of the focal length is pixels, i guess.

Then, how can i calculate field of view (along y) ?

Is this formula right?

double fov_y = 2*atan(height/2/fy)*180/CV_PI;

I'll use it to parameters of

gluPerspective()

Answer

Michael Allwright picture Michael Allwright · Dec 14, 2016

OpenCV has a function that does this. Looking at the implementation (available on GitHub) we have given an image with dimensions w x h and a camera matrix:

    camera intrinsic matrix

the equations for the field of view are:

field of view y    field of view x