StereoCalib()
found = findChessboardCorners(timg, boardSize, corners,
CALIB_CB_ADAPTIVE_THRESH | CALIB_CB_NORMALIZE_IMAGE);
cornerSubPix(img, corners, Size(11,11), Size(-1,-1)...)
double rms = stereoCalibrate(objectPoints, imagePoints[0], imagePoints[1],
cameraMatrix[0], distCoeffs[0],
cameraMatrix[1], distCoeffs[1]...)
intrinsics.yml (M1 M2 D1 D2)
stereoRectify(cameraMatrix[0], distCoeffs[0],
cameraMatrix[1], distCoeffs[1]..R, T, R1, R2, P1, P2, Q)
extrinsics.yml (R, T, R1, R2, P1, P2, Q)
initUndistortRectifyMap()
initUndistortRectifyMap()
Mat img = imread()
remap(img, rimg, rmap[k][0], rmap[k][1], INTER_LINEAR);
imshow("rectified", canvas);
网友评论