vector of distortion coefficients returned by calibrate camera function opencv

35 Views Asked by At

What flags should i use in the cv.calibrate function to return all the distortion coefficients (k1,k2,p1,p2[,k3[,k4,k5,k6[,s1,s2,s3,s4[,τx,τy]]]])

retR, cameraMatrixR, distR, rvecsR, tvecsR = cv.calibrateCamera(
    objpoints, imgpointsR, frameSize, None, None, None, None, flags=cv.CALIB_RATIONAL_MODEL   , criteria=None)


I want to find all the distorsion coef

1

There are 1 best solutions below

0
crazysra On

There are two Flags you need to use

CALIB_THIN_PRISM_MODEL

CALIB_RATIONAL_MODEL

retR, cameraMatrixR, distR, rvecsR, tvecsR = cv.calibrateCamera(
objpoints, imgpointsR, frameSize, None, None, None, None, flags=cv.CALIB_RATIONAL_MODEL + cv.CALIB_THIN_PRISM_MODEL   , criteria=None)

You Can know more about them here