我想做鱼眼相机帧失真,我用下面的java代码来计算相机矩阵和失真系数,如何将这些数据保存为xml / yaml文件并读取它。
...
Mat intrinsic = new Mat(3, 3, CvType.CV_32FC1);
Mat distCoeffs = new Mat();
Calib3d.calibrateCamera(objectPoints, imagePoints, savedImage.size(), intrinsic, distCoeffs, rvecs, tvecs);
...
//fisheye undistortion
Imgproc.undistort(frameMat, undistoredFrameMat, intrinsic, distCoeffs);