MATLAB: Which unit of measurement are the cameraParameters

backgroundComputer Vision ToolboxImage Acquisition Toolboximage processingImage Processing ToolboxMATLABradial distortiontangential distortionvision

I'm searching for the unit of measurement from the camera Parameters especially of the radial and tangential distortion.
The answer to my question is not mm / m, because I already try to change the change my squarsize and it does not influence the radial and tangential distortion at all. So morelikely it would be like degree or pixels. I thought it would be degrees but I don't see any lecture about it, to confirm my idea.

Best Answer

Hi Joep,
The correct answer is that the distortion coefficients are dimensionless, and they do not depend on the checkerboard square size at all. In fact, none of the intrinsic camera parameters depend on the square size. The optical center (cx,cy) is in pixels. The focal lengths (fx,fy) are also in pixels. fx = f / px, where px is the pixel size in world units (e.g. mm) and f is the actual focal length of the lens, also in world units. So the world units cancel out, and fx and fy are in pixels.
Now let us look at the equations for the radial distortion:
Xdist = X(1 + k1 * r^2 + k2 * r^4 + k3 * r^6)
Ydist = Y(1 + k1 * r^2 + k2 * r^4 + k3 * r^6)
In these equations X and Y are normalized image coordinates with the origin is at the optical center. Let (i,j) be the row-column pixel coordinates. The normalized image coordinates are computed as follows (assuming that the skew is 0):
X = (j - cx) / fx
Y = (i - cy) / fy
Since all the values here are in pixels, (X,Y) end up being dimensionless. Thus r = sqrt(X^2 + Y^2) and the coefficients also have no units.
So, if you change the square size, the only thing that will change in cameraParameters are the extrinsics.