Field of view of a GoPro camera
<p>I have calibrated my GoPro Hero 4 Black using <em>Camera calibration toolbox for Matlab</em> and calculated its fields of view and focal length using <em>OpenCV</em>'s <em>calibrationMatrixValues()</em>. These, however, differ from GoPro's specifications. Istead of 118.2/69.5 FOVs I get 95.4/63.4 and focal length 2.8mm instead of 17.2mm. Obviously something is wrong. </p>

<p>I suppose the calibration itself is correct since image undistortion seems to be working well.</p>

<p>Can anyone please give me a hint where I made a mistake? I am posting my code below.</p>

<p>Thanks.</p>

<h2>Code</h2>

<pre><code>cameraMatrix = new Mat(3, 3, 6);
for (int i = 0; i &lt; cameraMatrix.height(); i ++)
    for (int j = 0; j &lt; cameraMatrix.width(); j ++) {
    cameraMatrix.put(i, j, 0);
}
cameraMatrix.put(0, 0, 582.18394);
cameraMatrix.put(0, 2, 663.50655);
cameraMatrix.put(1, 1, 582.52915);
cameraMatrix.put(1, 2, 378.74541);
cameraMatrix.put(2, 2, 1.);

org.opencv.core.Size size = new org.opencv.core.Size(1280, 720);
//output parameters
double [] fovx = new double[1];
double [] fovy = new double[1];
double [] focLen = new double[1];
double [] aspectRatio = new double[1];
Point ppov = new Point(0, 0);
org.opencv.calib3d.Calib3d.calibrationMatrixValues(cameraMatrix, size,
        6.17, 4.55, fovx, fovy, focLen, ppov, aspectRatio);


System.out.println("FoVx: " + fovx[0]);
System.out.println("FoVy: " + fovy[0]);
System.out.println("Focal length: " + focLen[0]);
System.out.println("Principal point of view; x: " + ppov.x + ", y: " + ppov.y);
System.out.println("Aspect ratio: " + aspectRatio[0]);
</code></pre>

<h2>Results</h2>

<pre><code>FoVx: 95.41677635378488
FoVy: 63.43170132212425
Focal length: 2.8063085232812504
Principal point of view; x: 3.198308916796875, y: 2.3934605770833333
Aspect ratio: 1.0005929569269807
</code></pre>

<h2>GoPro specifications</h2>

<p><a href="https://gopro.com/help/articles/Question_Answer/HERO4-Field-of-View-FOV-Information" rel="nofollow">https://gopro.com/help/articles/Question_Answer/HERO4-Field-of-View-FOV-Information</a></p>

<h2>Edit</h2>

<p>Matlab calibration results</p>

<pre><code>Focal Length:          fc = [ 582.18394   582.52915 ] ± [ 0.77471   0.78080 ]
Principal point:       cc = [ 663.50655   378.74541 ] ± [ 1.40781   1.13965 ]
Skew:             alpha_c = [ -0.00028 ] ± [ 0.00056  ]   =&gt; angle of pixel axes = 90.01599 ± 0.03208 degrees
Distortion:            kc = [ -0.25722   0.09022   -0.00060   0.00009  -0.01662 ] ± [ 0.00228   0.00276   0.00020   0.00018  0.00098 ]
Pixel error:          err = [ 0.30001   0.28188 ]
</code></pre>

<p>One of the images used for calibration
<a href="https://postimg.org/image/d6b3o9akf/" rel="nofollow"><img src="https://s11.postimg.org/ac7yat8eb/image.jpg" alt="13.jpg"></a></p>

<p>And the undistorted image
<a href="https://postimg.org/image/xec41160z/" rel="nofollow"><img src="https://s21.postimg.org/iv4yzmcw7/rect13.jpg" alt="_rect13.jpg"></a></p>