org.opencv.utils.Converters Java Examples
The following examples show how to use
org.opencv.utils.Converters.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Aruco.java From MOAAP with MIT License | 5 votes |
public static void drawDetectedMarkers(Mat image, List<Mat> corners) { Mat corners_mat = Converters.vector_Mat_to_Mat(corners); drawDetectedMarkers_1(image.nativeObj, corners_mat.nativeObj); return; }
Example #2
Source File: Dnn.java From AndroidDocumentScanner with MIT License | 5 votes |
public static Mat blobFromImages(List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop) { Mat images_mat = Converters.vector_Mat_to_Mat(images); Mat retVal = new Mat(blobFromImages_0(images_mat.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3], swapRB, crop)); return retVal; }
Example #3
Source File: Calib3d.java From sudokufx with Apache License 2.0 | 5 votes |
public static double calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs) { 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_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.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; }
Example #4
Source File: Imgcodecs.java From MOAAP with MIT License | 5 votes |
public static boolean imreadmulti(String filename, List<Mat> mats, int flags) { Mat mats_mat = Converters.vector_Mat_to_Mat(mats); boolean retVal = imreadmulti_0(filename, mats_mat.nativeObj, flags); return retVal; }
Example #5
Source File: DescriptorMatcher.java From FTCVision with MIT License | 5 votes |
public void knnMatch(Mat queryDescriptors, List<MatOfDMatch> matches, int k, List<Mat> masks, boolean compactResult) { Mat matches_mat = new Mat(); Mat masks_mat = Converters.vector_Mat_to_Mat(masks); knnMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k, masks_mat.nativeObj, compactResult); Converters.Mat_to_vector_vector_DMatch(matches_mat, matches); matches_mat.release(); return; }
Example #6
Source File: Calib3d.java From AndroidDocumentScanner with MIT License | 5 votes |
public static double calibrate(List<Mat> objectPoints, List<Mat> imagePoints, Size image_size, Mat K, Mat D, List<Mat> rvecs, List<Mat> tvecs) { 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_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.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; }
Example #7
Source File: Video.java From LicensePlateDiscern with MIT License | 5 votes |
public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder) { Mat pyramid_mat = new Mat(); int retVal = buildOpticalFlowPyramid_1(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives, pyrBorder, derivBorder); Converters.Mat_to_vector_Mat(pyramid_mat, pyramid); pyramid_mat.release(); return retVal; }
Example #8
Source File: GenericDescriptorMatcher.java From marvel with MIT License | 5 votes |
/** * <p>Returns a train keypoints collection.</p> * * @see <a href="http://docs.opencv.org/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.html#genericdescriptormatcher-gettrainkeypoints">org.opencv.features2d.GenericDescriptorMatcher.getTrainKeypoints</a> */ public List<MatOfKeyPoint> getTrainKeypoints() { List<MatOfKeyPoint> retVal = new ArrayList<MatOfKeyPoint>(); Mat retValMat = new Mat(getTrainKeypoints_0(nativeObj)); Converters.Mat_to_vector_vector_KeyPoint(retValMat, retVal); return retVal; }
Example #9
Source File: Calib3d.java From OpenCV-android with Apache License 2.0 | 5 votes |
public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, 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 = calibrateCamera_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.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; }
Example #10
Source File: Calib3d.java From OpenCvFaceDetect with Apache License 2.0 | 5 votes |
public static double stereoCalibrateExtended(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 perViewErrors, 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 = stereoCalibrateExtended_0(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, perViewErrors.nativeObj, flags, criteria.type, criteria.maxCount, criteria.epsilon); return retVal; }
Example #11
Source File: AlignMTB.java From FaceDetectDemo with Apache License 2.0 | 5 votes |
public void process(List<Mat> src, List<Mat> dst, Mat times, Mat response) { Mat src_mat = Converters.vector_Mat_to_Mat(src); Mat dst_mat = Converters.vector_Mat_to_Mat(dst); process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj); return; }
Example #12
Source File: Text.java From OpenCvFaceDetect with Apache License 2.0 | 5 votes |
public static void erGrouping(Mat image, Mat channel, List<MatOfPoint> regions, MatOfRect groups_rects, int method, String filename, float minProbablity) { List<Mat> regions_tmplm = new ArrayList<Mat>((regions != null) ? regions.size() : 0); Mat regions_mat = Converters.vector_vector_Point_to_Mat(regions, regions_tmplm); Mat groups_rects_mat = groups_rects; erGrouping_0(image.nativeObj, channel.nativeObj, regions_mat.nativeObj, groups_rects_mat.nativeObj, method, filename, minProbablity); return; }
Example #13
Source File: Video.java From VIA-AI with MIT License | 5 votes |
public static int buildOpticalFlowPyramid(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives) { Mat pyramid_mat = new Mat(); int retVal = buildOpticalFlowPyramid_3(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives); Converters.Mat_to_vector_Mat(pyramid_mat, pyramid); pyramid_mat.release(); return retVal; }
Example #14
Source File: Photo.java From ml-authentication with Apache License 2.0 | 5 votes |
public static void fastNlMeansDenoisingColoredMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize) { Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs); fastNlMeansDenoisingColoredMulti_1(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize); return; }
Example #15
Source File: Core.java From SmartPaperScan with Apache License 2.0 | 5 votes |
public static void hconcat(List<Mat> src, Mat dst) { Mat src_mat = Converters.vector_Mat_to_Mat(src); hconcat_0(src_mat.nativeObj, dst.nativeObj); return; }
Example #16
Source File: Photo.java From MOAAP with MIT License | 5 votes |
public static void denoise_TVL1(List<Mat> observations, Mat result) { Mat observations_mat = Converters.vector_Mat_to_Mat(observations); denoise_TVL1_1(observations_mat.nativeObj, result.nativeObj); return; }
Example #17
Source File: Calib3d.java From pasm-yolov3-Android with GNU General Public License v3.0 | 5 votes |
public static double fisheye_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 = fisheye_stereoCalibrate_0(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; }
Example #18
Source File: Core.java From AndroidDocumentScanner with MIT License | 5 votes |
public static void split(Mat m, List<Mat> mv) { Mat mv_mat = new Mat(); split_0(m.nativeObj, mv_mat.nativeObj); Converters.Mat_to_vector_Mat(mv_mat, mv); mv_mat.release(); return; }
Example #19
Source File: Calib3d.java From sudokufx with Apache License 2.0 | 5 votes |
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, 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_0(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, flags, criteria.type, criteria.maxCount, criteria.epsilon); return retVal; }
Example #20
Source File: Imgproc.java From FaceT with Mozilla Public License 2.0 | 5 votes |
public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color) { List<Mat> pts_tmplm = new ArrayList<Mat>((pts != null) ? pts.size() : 0); Mat pts_mat = Converters.vector_vector_Point_to_Mat(pts, pts_tmplm); polylines_2(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3]); return; }
Example #21
Source File: Calib3d.java From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License | 5 votes |
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; }
Example #22
Source File: MergeRobertson.java From FaceDetectDemo with Apache License 2.0 | 5 votes |
public void process(List<Mat> src, Mat dst, Mat times, Mat response) { Mat src_mat = Converters.vector_Mat_to_Mat(src); process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj); return; }
Example #23
Source File: MergeRobertson.java From react-native-documentscanner-android with MIT License | 5 votes |
public void process(List<Mat> src, Mat dst, Mat times, Mat response) { Mat src_mat = Converters.vector_Mat_to_Mat(src); process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj); return; }
Example #24
Source File: Photo.java From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License | 5 votes |
public static void fastNlMeansDenoisingMulti(List<Mat> srcImgs, Mat dst, int imgToDenoiseIndex, int temporalWindowSize, MatOfFloat h, int templateWindowSize, int searchWindowSize, int normType) { Mat srcImgs_mat = Converters.vector_Mat_to_Mat(srcImgs); Mat h_mat = h; fastNlMeansDenoisingMulti_2(srcImgs_mat.nativeObj, dst.nativeObj, imgToDenoiseIndex, temporalWindowSize, h_mat.nativeObj, templateWindowSize, searchWindowSize, normType); return; }
Example #25
Source File: FeatureDetector.java From OpenCV-AndroidSamples with MIT License | 5 votes |
public void detect(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> masks) { Mat images_mat = Converters.vector_Mat_to_Mat(images); Mat keypoints_mat = new Mat(); Mat masks_mat = Converters.vector_Mat_to_Mat(masks); detect_2(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, masks_mat.nativeObj); Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints); keypoints_mat.release(); return; }
Example #26
Source File: Dnn.java From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License | 5 votes |
public static Mat blobFromImages(List<Mat> images, double scalefactor, Size size, Scalar mean, boolean swapRB, boolean crop) { Mat images_mat = Converters.vector_Mat_to_Mat(images); Mat retVal = new Mat(blobFromImages_0(images_mat.nativeObj, scalefactor, size.width, size.height, mean.val[0], mean.val[1], mean.val[2], mean.val[3], swapRB, crop)); return retVal; }
Example #27
Source File: AlignExposures.java From LPR with Apache License 2.0 | 5 votes |
public void process(List<Mat> src, List<Mat> dst, Mat times, Mat response) { Mat src_mat = Converters.vector_Mat_to_Mat(src); Mat dst_mat = Converters.vector_Mat_to_Mat(dst); process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj); return; }
Example #28
Source File: Aruco.java From OpenCvFaceDetect with Apache License 2.0 | 5 votes |
public static void refineDetectedMarkers(Mat image, Board board, List<Mat> detectedCorners, Mat detectedIds, List<Mat> rejectedCorners, Mat cameraMatrix) { Mat detectedCorners_mat = Converters.vector_Mat_to_Mat(detectedCorners); Mat rejectedCorners_mat = Converters.vector_Mat_to_Mat(rejectedCorners); refineDetectedMarkers_6(image.nativeObj, board.getNativeObjAddr(), detectedCorners_mat.nativeObj, detectedIds.nativeObj, rejectedCorners_mat.nativeObj, cameraMatrix.nativeObj); Converters.Mat_to_vector_Mat(detectedCorners_mat, detectedCorners); detectedCorners_mat.release(); Converters.Mat_to_vector_Mat(rejectedCorners_mat, rejectedCorners); rejectedCorners_mat.release(); return; }
Example #29
Source File: EM.java From MOAAP with MIT License | 5 votes |
public void getCovs(List<Mat> covs) { Mat covs_mat = new Mat(); getCovs_0(nativeObj, covs_mat.nativeObj); Converters.Mat_to_vector_Mat(covs_mat, covs); covs_mat.release(); return; }
Example #30
Source File: Calib3d.java From MOAAP with MIT License | 5 votes |
public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, 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 = calibrateCamera_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.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; }