Java Code Examples for org.opencv.core.MatOfPoint2f
The following are top voted examples for showing how to use
org.opencv.core.MatOfPoint2f. These examples are extracted from open source projects.
You can vote up the examples you like and your votes will be used in our system to generate
more good examples.
Example 1
Project: opencv-documentscanner-android File: Imgproc.java View source code | 6 votes |
public static RotatedRect minAreaRect(MatOfPoint2f points) { Mat points_mat = points; RotatedRect retVal = new RotatedRect(minAreaRect_0(points_mat.nativeObj)); return retVal; }
Example 2
Project: MOAAP File: Converters.java View source code | 6 votes |
public static void Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> pts) { if (pts == null) throw new java.lang.IllegalArgumentException("Output List can't be null"); if (m == null) throw new java.lang.IllegalArgumentException("Input Mat can't be null"); List<Mat> mats = new ArrayList<Mat>(m.rows()); Mat_to_vector_Mat(m, mats); for (Mat mi : mats) { MatOfPoint2f pt = new MatOfPoint2f(mi); pts.add(pt); mi.release(); } mats.clear(); }
Example 3
Project: react-native-scan-doc File: Converters.java View source code | 6 votes |
public static void Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> pts) { if (pts == null) throw new java.lang.IllegalArgumentException("Output List can't be null"); if (m == null) throw new java.lang.IllegalArgumentException("Input Mat can't be null"); List<Mat> mats = new ArrayList<Mat>(m.rows()); Mat_to_vector_Mat(m, mats); for (Mat mi : mats) { MatOfPoint2f pt = new MatOfPoint2f(mi); pts.add(pt); mi.release(); } mats.clear(); }
Example 4
Project: Microsphere File: Converters.java View source code | 6 votes |
public static void Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> pts) { if (pts == null) throw new java.lang.IllegalArgumentException("Output List can't be null"); if (m == null) throw new java.lang.IllegalArgumentException("Input Mat can't be null"); List<Mat> mats = new ArrayList<Mat>(m.rows()); Mat_to_vector_Mat(m, mats); for (Mat mi : mats) { MatOfPoint2f pt = new MatOfPoint2f(mi); pts.add(pt); mi.release(); } mats.clear(); }
Example 5
Project: react-native-scan-doc File: Calib3d.java View source code | 5 votes |
public static Mat findFundamentalMat(MatOfPoint2f points1, MatOfPoint2f points2, int method, double param1, double param2) { Mat points1_mat = points1; Mat points2_mat = points2; Mat retVal = new Mat(findFundamentalMat_1(points1_mat.nativeObj, points2_mat.nativeObj, method, param1, param2)); return retVal; }
Example 6
Project: OpenCV File: Calib3d.java View source code | 5 votes |
public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; projectPoints_3(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj); return; }
Example 7
Project: AndroidCameraSudokuSolver File: Converters.java View source code | 5 votes |
public static void Mat_to_vector_vector_Point2f(Mat m, List<MatOfPoint2f> pts) { if (pts == null) throw new java.lang.IllegalArgumentException("Output List can't be null"); if (m == null) throw new java.lang.IllegalArgumentException("Input Mat can't be null"); List<Mat> mats = new ArrayList<Mat>(m.rows()); Mat_to_vector_Mat(m, mats); for (Mat mi : mats) { MatOfPoint2f pt = new MatOfPoint2f(mi); pts.add(pt); } }
Example 8
Project: opencv-documentscanner-android File: Imgproc.java View source code | 5 votes |
public static double pointPolygonTest(MatOfPoint2f contour, Point pt, boolean measureDist) { Mat contour_mat = contour; double retVal = pointPolygonTest_0(contour_mat.nativeObj, pt.x, pt.y, measureDist); return retVal; }
Example 9
Project: FTC2016 File: Calib3d.java View source code | 5 votes |
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; Mat distCoeffs_mat = distCoeffs; boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags); return retVal; }
Example 10
Project: FaceDetectDemo File: Calib3d.java View source code | 5 votes |
public static boolean solvePnPRansac(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 = solvePnPRansac_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj); return retVal; }
Example 11
Project: Image-Detection-Samples File: Calib3d.java View source code | 5 votes |
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; Mat distCoeffs_mat = distCoeffs; boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags); return retVal; }
Example 12
Project: MOAAP File: Video.java View source code | 5 votes |
public static void calcOpticalFlowPyrLK(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel) { Mat prevPts_mat = prevPts; Mat nextPts_mat = nextPts; Mat status_mat = status; Mat err_mat = err; calcOpticalFlowPyrLK_1(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel); return; }
Example 13
Project: mao-android File: Imgproc.java View source code | 5 votes |
public static void minEnclosingCircle(MatOfPoint2f points, Point center, float[] radius) { Mat points_mat = points; double[] center_out = new double[2]; double[] radius_out = new double[1]; minEnclosingCircle_0(points_mat.nativeObj, center_out, radius_out); if(center!=null){ center.x = center_out[0]; center.y = center_out[1]; } if(radius!=null) radius[0] = (float)radius_out[0]; return; }
Example 14
Project: Android-Code-Demos File: Calib3d.java View source code | 5 votes |
public static void projectPoints(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat rvec, Mat tvec, Mat K, Mat D) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; projectPoints_3(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, K.nativeObj, D.nativeObj); return; }
Example 15
Project: MOAAP File: Subdiv2D.java View source code | 5 votes |
public void insert(MatOfPoint2f ptvec) { Mat ptvec_mat = ptvec; insert_1(nativeObj, ptvec_mat.nativeObj); return; }
Example 16
Project: FTC2016 File: Imgproc.java View source code | 5 votes |
public static RotatedRect minAreaRect(MatOfPoint2f points) { Mat points_mat = points; RotatedRect retVal = new RotatedRect(minAreaRect_0(points_mat.nativeObj)); return retVal; }
Example 17
Project: RobotIGS File: Calib3d.java View source code | 5 votes |
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; Mat distCoeffs_mat = distCoeffs; boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags); return retVal; }
Example 18
Project: Team9261-2017-2018 File: Calib3d.java View source code | 5 votes |
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; Mat distCoeffs_mat = distCoeffs; boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags); return retVal; }
Example 19
Project: opencv-documentscanner-android File: Calib3d.java View source code | 5 votes |
public static Mat findHomography(MatOfPoint2f srcPoints, MatOfPoint2f dstPoints, int method, double ransacReprojThreshold, Mat mask, int maxIters, double confidence) { Mat srcPoints_mat = srcPoints; Mat dstPoints_mat = dstPoints; Mat retVal = new Mat(findHomography_0(srcPoints_mat.nativeObj, dstPoints_mat.nativeObj, method, ransacReprojThreshold, mask.nativeObj, maxIters, confidence)); return retVal; }
Example 20
Project: Microsphere File: Imgproc.java View source code | 5 votes |
public static double arcLength(MatOfPoint2f curve, boolean closed) { Mat curve_mat = curve; double retVal = arcLength_0(curve_mat.nativeObj, closed); return retVal; }
Example 21
Project: DNNLibrary File: Calib3d.java View source code | 5 votes |
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; }
Example 22
Project: MOAAP File: PCTSignatures.java View source code | 5 votes |
public static PCTSignatures create(MatOfPoint2f initSamplingPoints, MatOfInt initClusterSeedIndexes) { Mat initSamplingPoints_mat = initSamplingPoints; Mat initClusterSeedIndexes_mat = initClusterSeedIndexes; PCTSignatures retVal = new PCTSignatures(create_3(initSamplingPoints_mat.nativeObj, initClusterSeedIndexes_mat.nativeObj)); return retVal; }
Example 23
Project: RobotIGS File: Imgproc.java View source code | 5 votes |
public static Mat getAffineTransform(MatOfPoint2f src, MatOfPoint2f dst) { Mat src_mat = src; Mat dst_mat = dst; Mat retVal = new Mat(getAffineTransform_0(src_mat.nativeObj, dst_mat.nativeObj)); return retVal; }
Example 24
Project: react-native-scan-doc File: Imgproc.java View source code | 5 votes |
public static Mat getAffineTransform(MatOfPoint2f src, MatOfPoint2f dst) { Mat src_mat = src; Mat dst_mat = dst; Mat retVal = new Mat(getAffineTransform_0(src_mat.nativeObj, dst_mat.nativeObj)); return retVal; }
Example 25
Project: MOAAP File: Imgproc.java View source code | 5 votes |
public static void approxPolyDP(MatOfPoint2f curve, MatOfPoint2f approxCurve, double epsilon, boolean closed) { Mat curve_mat = curve; Mat approxCurve_mat = approxCurve; approxPolyDP_0(curve_mat.nativeObj, approxCurve_mat.nativeObj, epsilon, closed); return; }
Example 26
Project: DNNLibrary File: Calib3d.java View source code | 5 votes |
public static boolean solvePnPRansac(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 = solvePnPRansac_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj); return retVal; }
Example 27
Project: opencv-documentscanner-android File: Calib3d.java View source code | 5 votes |
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; Mat distCoeffs_mat = distCoeffs; boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags); return retVal; }
Example 28
Project: opencv-documentscanner-android File: Calib3d.java View source code | 5 votes |
public static boolean solvePnPRansac(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 = solvePnPRansac_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj); return retVal; }
Example 29
Project: MOAAP File: Imgproc.java View source code | 5 votes |
public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P) { Mat src_mat = src; Mat dst_mat = dst; undistortPoints_0(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, P.nativeObj); return; }
Example 30
Project: DNNLibrary File: Calib3d.java View source code | 5 votes |
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; }
Example 31
Project: react-native-scan-doc File: Calib3d.java View source code | 5 votes |
public static void drawChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, boolean patternWasFound) { Mat corners_mat = corners; drawChessboardCorners_0(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj, patternWasFound); return; }
Example 32
Project: real_time_circle_detection_android File: Calib3d.java View source code | 5 votes |
public static boolean findChessboardCorners(Mat image, Size patternSize, MatOfPoint2f corners, int flags) { Mat corners_mat = corners; boolean retVal = findChessboardCorners_0(image.nativeObj, patternSize.width, patternSize.height, corners_mat.nativeObj, flags); return retVal; }
Example 33
Project: MOAAP File: Calib3d.java View source code | 5 votes |
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints) { Mat objectPoints_mat = objectPoints; Mat distCoeffs_mat = distCoeffs; Mat imagePoints_mat = imagePoints; projectPoints_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj); return; }
Example 34
Project: Android-Code-Demos File: Imgproc.java View source code | 5 votes |
public static void undistortPoints(MatOfPoint2f src, MatOfPoint2f dst, Mat cameraMatrix, Mat distCoeffs, Mat R, Mat P) { Mat src_mat = src; Mat dst_mat = dst; undistortPoints_0(src_mat.nativeObj, dst_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, R.nativeObj, P.nativeObj); return; }
Example 35
Project: NotifyTools File: Imgproc.java View source code | 5 votes |
public static Mat getAffineTransform(MatOfPoint2f src, MatOfPoint2f dst) { Mat src_mat = src; Mat dst_mat = dst; Mat retVal = new Mat(getAffineTransform_0(src_mat.nativeObj, dst_mat.nativeObj)); return retVal; }
Example 36
Project: Microsphere File: Calib3d.java View source code | 5 votes |
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags) { Mat objectPoints_mat = objectPoints; Mat imagePoints_mat = imagePoints; Mat distCoeffs_mat = distCoeffs; boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags); return retVal; }
Example 37
Project: Team9261-2017-2018 File: Calib3d.java View source code | 5 votes |
public static Mat initCameraMatrix2D(List<MatOfPoint3f> objectPoints, List<MatOfPoint2f> imagePoints, Size imageSize, double aspectRatio) { List<Mat> objectPoints_tmplm = new ArrayList<Mat>((objectPoints != null) ? objectPoints.size() : 0); Mat objectPoints_mat = Converters.vector_vector_Point3f_to_Mat(objectPoints, objectPoints_tmplm); List<Mat> imagePoints_tmplm = new ArrayList<Mat>((imagePoints != null) ? imagePoints.size() : 0); Mat imagePoints_mat = Converters.vector_vector_Point2f_to_Mat(imagePoints, imagePoints_tmplm); Mat retVal = new Mat(initCameraMatrix2D_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, aspectRatio)); return retVal; }
Example 38
Project: renderscript_examples File: Imgproc.java View source code | 5 votes |
public static void cornerSubPix(Mat image, MatOfPoint2f corners, Size winSize, Size zeroZone, TermCriteria criteria) { Mat corners_mat = corners; cornerSubPix_0(image.nativeObj, corners_mat.nativeObj, winSize.width, winSize.height, zeroZone.width, zeroZone.height, criteria.type, criteria.maxCount, criteria.epsilon); return; }
Example 39
Project: android-age-estimator File: Calib3d.java View source code | 5 votes |
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; }
Example 40
Project: FaceDetectDemo File: Imgproc.java View source code | 5 votes |
public static RotatedRect fitEllipse(MatOfPoint2f points) { Mat points_mat = points; RotatedRect retVal = new RotatedRect(fitEllipse_0(points_mat.nativeObj)); return retVal; }