use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Calib3d method stereoCalibrate.
// javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E, F)
public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Size imageSize, Mat R, Mat T, Mat E, Mat F) {
Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
Mat imagePoints1_mat = Converters.vector_Mat_to_Mat(imagePoints1);
Mat imagePoints2_mat = Converters.vector_Mat_to_Mat(imagePoints2);
double retVal = stereoCalibrate_2(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, E.nativeObj, F.nativeObj);
return retVal;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Calib3d method calibrateCameraExtended.
// javadoc: calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, stdDeviationsIntrinsics, stdDeviationsExtrinsics, perViewErrors)
public static double calibrateCameraExtended(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs, List<Mat> tvecs, Mat stdDeviationsIntrinsics, Mat stdDeviationsExtrinsics, Mat perViewErrors) {
Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
Mat rvecs_mat = new Mat();
Mat tvecs_mat = new Mat();
double retVal = calibrateCameraExtended_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, stdDeviationsIntrinsics.nativeObj, stdDeviationsExtrinsics.nativeObj, perViewErrors.nativeObj);
Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
rvecs_mat.release();
Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
tvecs_mat.release();
return retVal;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Calib3d method findChessboardCorners.
// javadoc: findChessboardCorners(image, patternSize, corners)
public static boolean findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners) {
Mat corners_mat = corners;
boolean retVal = findChessboardCorners_1(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj);
return retVal;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Calib3d method solvePnP.
// javadoc: solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec)
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec) {
Mat objectPoints_mat = objectPoints;
Mat imagePoints_mat = imagePoints;
Mat distCoeffs_mat = distCoeffs;
boolean retVal = solvePnP_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
return retVal;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Calib3d method calibrate.
//
// C++: double calibrate(vector_Mat objectPoints, vector_Mat imagePoints, Size image_size, Mat& K, Mat& D, vector_Mat& rvecs, vector_Mat& tvecs, int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
//
// javadoc: calibrate(objectPoints, imagePoints, image_size, K, D, rvecs, tvecs, flags, criteria)
public static double calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs, int flags, TermCriteria criteria) {
Mat objectPoints_mat = Converters.vector_Mat_to_Mat(objectPoints);
Mat imagePoints_mat = Converters.vector_Mat_to_Mat(imagePoints);
Mat rvecs_mat = new Mat();
Mat tvecs_mat = new Mat();
double retVal = calibrate_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
Converters.Mat_to_vector_Mat(rvecs_mat, rvecs);
rvecs_mat.release();
Converters.Mat_to_vector_Mat(tvecs_mat, tvecs);
tvecs_mat.release();
return retVal;
}
Aggregations