calibrationMatrixValues: consider principalPoint in FOV computation

The FOV depends on the principal point location. Use formula of
viz::Camera.
This commit is contained in:
Pavel Rojtberg
2016-04-27 14:47:52 +02:00
parent 86959310f9
commit 8ed1945ccd
2 changed files with 6 additions and 4 deletions

View File

@@ -875,8 +875,8 @@ void CV_CalibrationMatrixValuesTest::run(int)
ny = goodAspectRatio;
}
goodFovx = 2 * atan( imageSize.width / (2 * fx)) * 180.0 / CV_PI;
goodFovy = 2 * atan( imageSize.height / (2 * fy)) * 180.0 / CV_PI;
goodFovx = (atan2(cx, fx) + atan2(imageSize.width - cx, fx)) * 180.0 / CV_PI;
goodFovy = (atan2(cy, fy) + atan2(imageSize.height - cy, fy)) * 180.0 / CV_PI;
goodFocalLength = fx / nx;