use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Imgproc method findContours.
// javadoc: findContours(image, contours, hierarchy, mode, method)
public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method) {
Mat contours_mat = new Mat();
findContours_1(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method);
Converters.Mat_to_vector_vector_Point(contours_mat, contours);
contours_mat.release();
return;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Imgproc method goodFeaturesToTrack.
//
// C++: void goodFeaturesToTrack(Mat image, vector_Point& corners, int maxCorners, double qualityLevel, double minDistance, Mat mask = Mat(), int blockSize = 3, bool useHarrisDetector = false, double k = 0.04)
//
// javadoc: goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, mask, blockSize, useHarrisDetector, k)
public static void goodFeaturesToTrack(Mat image, MatOfPoint corners, int maxCorners, double qualityLevel, double minDistance, Mat mask, int blockSize, boolean useHarrisDetector, double k) {
Mat corners_mat = corners;
goodFeaturesToTrack_0(image.nativeObj, corners_mat.nativeObj, maxCorners, qualityLevel, minDistance, mask.nativeObj, blockSize, useHarrisDetector, k);
return;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Imgproc method drawContours.
//
// C++: void drawContours(Mat& image, vector_vector_Point contours, int contourIdx, Scalar color, int thickness = 1, int lineType = LINE_8, Mat hierarchy = Mat(), int maxLevel = INT_MAX, Point offset = Point())
//
// javadoc: drawContours(image, contours, contourIdx, color, thickness, lineType, hierarchy, maxLevel, offset)
public static void drawContours(Mat image, List<MatOfPoint> contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset) {
List<Mat> contours_tmplm = new ArrayList<Mat>((contours != null) ? contours.size() : 0);
Mat contours_mat = Converters.vector_vector_Point_to_Mat(contours, contours_tmplm);
drawContours_0(image.nativeObj, contours_mat.nativeObj, contourIdx, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, hierarchy.nativeObj, maxLevel, offset.x, offset.y);
return;
}
use of org.opencv.core.Mat in project Relic_Main by TeamOverdrive.
the class Calib3d method stereoCalibrate.
//
// C++: double stereoCalibrate(vector_Mat objectPoints, vector_Mat imagePoints1, vector_Mat imagePoints2, Mat& K1, Mat& D1, Mat& K2, Mat& D2, Size imageSize, Mat& R, Mat& T, int flags = fisheye::CALIB_FIX_INTRINSIC, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON))
//
// javadoc: stereoCalibrate(objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize, R, T, flags, criteria)
public static double stereoCalibrate(List<Mat> objectPoints, List<Mat> imagePoints1, List<Mat> imagePoints2, Mat K1, Mat D1, Mat K2, Mat D2, Size imageSize, Mat R, Mat T, int flags, TermCriteria criteria) {
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_3(objectPoints_mat.nativeObj, imagePoints1_mat.nativeObj, imagePoints2_mat.nativeObj, K1.nativeObj, D1.nativeObj, K2.nativeObj, D2.nativeObj, imageSize.width, imageSize.height, R.nativeObj, T.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon);
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, flags)
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, int flags) {
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_1(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, flags);
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