如何从OpenCV 3 Java中的文件读取/写入内部和失真矩阵

时间:2018-06-10 12:48:53

标签: opencv camera-calibration fisheye

我想做鱼眼相机帧失真,我用下面的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);

0 个答案:

没有答案