Technical - How do I find the vertical Field of View

July 31, 2012 - 1:11pm #1

Sometimes it is necessary to find the field of view of the camera, especially when integrating with third party rendering engines. This can be calculated from the CameraCalibration size and focal length parameters. This article describes the relationship between field of view and focal length:


Here's a code snippet for finding the vertical field of view:

const QCAR::CameraCalibration& cameraCalibration =

QCAR::Vec2F size = cameraCalibration.getSize();
QCAR::Vec2F focalLength = cameraCalibration.getFocalLength();

float fovRadians = 2 * atan(0.5f *[1] /[1]);
float fovDegrees = fovRadians * 180.0f / M_PI;


Topic locked