List of usage examples for org.opencv.core Core checkRange
public static boolean checkRange(Mat a)
From source file:de.vion.eyetracking.cameracalib.calibration.opencv.CameraCalibrator.java
public void calibrate() { ArrayList<Mat> rvecs = new ArrayList<Mat>(); ArrayList<Mat> tvecs = new ArrayList<Mat>(); Mat reprojectionErrors = new Mat(); ArrayList<Mat> objectPoints = new ArrayList<Mat>(); objectPoints.add(Mat.zeros(this.mCornersSize, 1, CvType.CV_32FC3)); calcBoardCornerPositions(objectPoints.get(0)); for (int i = 1; i < this.mCornersBuffer.size(); i++) { objectPoints.add(objectPoints.get(0)); }//from ww w.j av a 2s. c o m Calib3d.calibrateCamera(objectPoints, this.mCornersBuffer, this.mImageSize, this.mCameraMatrix, this.mDistortionCoefficients, rvecs, tvecs, this.mFlags); this.mIsCalibrated = Core.checkRange(this.mCameraMatrix) && Core.checkRange(this.mDistortionCoefficients); this.mRms = computeReprojectionErrors(objectPoints, rvecs, tvecs, reprojectionErrors); }