Are camera calibration matrices (intrinsic (K) and extrinsic (P)) supposed to be unique or is only the homography KP unique

34 views Asked by At

I am dealing with camera calibration parameters using Zhang's method, I implement the algorithm and get an intrinsic matrix K and extrinsic matrix P and all seems to be fine when I remap the points from world frame to image frame the reprojection error is low.

However when I try to verify my results by comparing them to the opencv calibratecamera function I am getting different results from intrinsic and extrinsic matrices and both of them work in terms of mapping the points from world frame to image frame.

I was always under the assumption that intrinsic and extrinsic matrices where unique because the represented a physical transformation between one frame and another which can only be done with a unique rotation and translation.

My question is are intrinsic and extrinsic matrices K and P unique or is it only the Homography KP that needs to be unique and why.

For reference these are the two different K and P matrices I get from the different approaches and they both work.

Using my own implementation of Zhang's method, note: the extrinsic matrix is for the same viewpoint of the checkerboard

K = [[1.02586809e+03 1.96405231e+01 3.08689414e+02]
     [0.00000000e+00 1.00989351e+03 4.84567246e+02]
     [0.00000000e+00 0.00000000e+00 1.00000000e+00]]

P = [[-0.98628405  0.03810428  0.16435003  1.5267843 ]
     [ 0.02967643  1.00742854  0.01962815 -2.60575424]
     [-0.16236713  0.02617403 -0.99474149 18.46864394]]

Using opencv calibratecamera

K = [[1.04688515e+03 0.00000000e+00 5.09484541e+02]
     [0.00000000e+00 1.05913035e+03 2.74172463e+02]
     [0.00000000e+00 0.00000000e+00 1.00000000e+00]]

P = [[ 5.19185813e-02  9.98590632e-01 -1.10095604e-02 -3.11218907e+00]
     [-9.84203067e-01  4.92958164e-02 -1.70041896e-01  2.08838343e+00]
     [-1.69259519e-01  1.96639770e-02  9.85375331e-01  1.90869949e+01]]`

What is the reason for this discrepancy.

The resulting image frame vector x is the same after dividing the vector by the last element of vector x to recover the homogeneous form

0

There are 0 answers