Hello all,
I used a chessboard calibration procedure to obtain a camera matrix using OpenCV and python based on this tutorial: http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_calib3d/py_calibration/py_calibration.html
I ran through the sample code on that page and was able to reproduce their results with the chessboard pictures in the OpenCV folder to get a camera matrix.
I then tried the same procedure with my own checkerboard grid and camera, and I obtained the following matrix:
mtx = [1535 0 638
0 1536 204
0 0 1]
I am trying to better understand these results, based on the camera sensor and lens I am using.
Based on: http://ksimek.github.io/2013/08/13/intrinsic/
Fx = fx * W/w
Fx = focal length in mm
W = sensor width in mm
w = image width in pixels
fx = focal length in pixels
The size of my images: 1264 x 512 (width x height)
I am using the following lens: http://www.edmundoptics.com/imaging/imaging-lenses/edmund-optics-designed-lenses/megapixel-finite-conjugate-video-imaging-lenses/58203/
This has focal length 8 mm.
I am using a FL3-U3-13Y3 camera from PtGrey (https://www.ptgrey.com/flea3-13-mp-mono-usb3-vision-vita-1300-camera), which has an image width of 12 mm, according to this picture:

From the camera matrix, fx is the element in the first row, first column. So above, fx = 1535. In short:
fx = 1535 pixels (from camera matrix I obtained)
w = 1264 pixels (image size I set)
W = 12 mm (from datasheet)
Fx = 8 mm (from datasheet)
Using: Fx = fx * W/w, we would expect
Fx = 1535 * 12 / 1264 = 14.57 mm
But the actual lens is 8 mm. Why the discrepancy?
I would think that the actual size of a chess grid would have to be known, but I did not see mention of manipulation of that in the tutorial link I provided. I basically had to scale down the chessboard grid so that it would work with my camera setup.
I would appreciate any help or insight on this.
Thanks in advance
**EDIT:**
Actually to be more specific, the lens has a maximum camera sensor format of 1/3", while the camera sensor format is 1/2". I found an article on this: http://www.cambridgeincolour.com/tutorials/digital-camera-sensor-size.htm
Focal length multiplier = (1/2) / (1/3) = 1.5
Focal length of lens as listed on datasheet = 8 mm
Equivalent focal length of lens= 1.5 * 8 mm = 12 mm
Still, 12 mm is off from 14.57 mm. Am I not factoring something else in my calculation? Could this be happening from bad images that still happen to find the chessboard corners?
Below is an example image:

↧