Java Code Examples for org.opencv.utils.Converters#Mat_to_vector_Mat
The following examples show how to use
org.opencv.utils.Converters#Mat_to_vector_Mat .
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: DescriptorExtractor.java From VIA-AI with MIT License | 5 votes |
public void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors) { Mat images_mat = Converters.vector_Mat_to_Mat(images); List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0); Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm); Mat descriptors_mat = new Mat(); compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj); Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints); keypoints_mat.release(); Converters.Mat_to_vector_Mat(descriptors_mat, descriptors); descriptors_mat.release(); return; }
Example 2
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) { 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_2(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.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 3
Source File: Calib3d.java From MOAAP 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, 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 = calibrate_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.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 4
Source File: Aruco.java From OpenCvFaceDetect with Apache License 2.0 | 5 votes |
public static double calibrateCameraCharuco(List<Mat> charucoCorners, List<Mat> charucoIds, CharucoBoard board, Size imageSize, Mat cameraMatrix, Mat distCoeffs, List<Mat> rvecs) { Mat charucoCorners_mat = Converters.vector_Mat_to_Mat(charucoCorners); Mat charucoIds_mat = Converters.vector_Mat_to_Mat(charucoIds); Mat rvecs_mat = new Mat(); double retVal = calibrateCameraCharuco_3(charucoCorners_mat.nativeObj, charucoIds_mat.nativeObj, board.getNativeObjAddr(), imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.nativeObj, rvecs_mat.nativeObj); Converters.Mat_to_vector_Mat(rvecs_mat, rvecs); rvecs_mat.release(); return retVal; }
Example 5
Source File: Core.java From VIA-AI 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 6
Source File: DescriptorMatcher.java From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License | 5 votes |
public List<Mat> getTrainDescriptors() { List<Mat> retVal = new ArrayList<Mat>(); Mat retValMat = new Mat(getTrainDescriptors_0(nativeObj)); Converters.Mat_to_vector_Mat(retValMat, retVal); return retVal; }
Example 7
Source File: Imgcodecs.java From AndroidDocumentScanner with MIT License | 5 votes |
public static boolean imreadmulti(String filename, List<Mat> mats, int flags) { Mat mats_mat = new Mat(); boolean retVal = imreadmulti_0(filename, mats_mat.nativeObj, flags); Converters.Mat_to_vector_Mat(mats_mat, mats); mats_mat.release(); return retVal; }
Example 8
Source File: Calib3d.java From Machine-Learning-Projects-for-Mobile-Applications 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, 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; }
Example 9
Source File: Imgcodecs.java From LPR with Apache License 2.0 | 5 votes |
public static boolean imreadmulti(String filename, List<Mat> mats, int flags) { Mat mats_mat = new Mat(); boolean retVal = imreadmulti_0(filename, mats_mat.nativeObj, flags); Converters.Mat_to_vector_Mat(mats_mat, mats); mats_mat.release(); return retVal; }
Example 10
Source File: Calib3d.java From Machine-Learning-Projects-for-Mobile-Applications 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 11
Source File: DescriptorMatcher.java From MOAAP with MIT License | 5 votes |
public List<Mat> getTrainDescriptors() { List<Mat> retVal = new ArrayList<Mat>(); Mat retValMat = new Mat(getTrainDescriptors_0(nativeObj)); Converters.Mat_to_vector_Mat(retValMat, retVal); return retVal; }
Example 12
Source File: DescriptorExtractor.java From OpenCV-AndroidSamples with MIT License | 5 votes |
public void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors) { Mat images_mat = Converters.vector_Mat_to_Mat(images); List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0); Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm); Mat descriptors_mat = new Mat(); compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj); Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints); keypoints_mat.release(); Converters.Mat_to_vector_Mat(descriptors_mat, descriptors); descriptors_mat.release(); return; }
Example 13
Source File: Calib3d.java From MOAAP 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, 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; }
Example 14
Source File: DescriptorExtractor.java From SmartPaperScan with Apache License 2.0 | 5 votes |
public void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors) { Mat images_mat = Converters.vector_Mat_to_Mat(images); List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0); Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm); Mat descriptors_mat = new Mat(); compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj); Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints); keypoints_mat.release(); Converters.Mat_to_vector_Mat(descriptors_mat, descriptors); descriptors_mat.release(); return; }
Example 15
Source File: EM.java From react-native-documentscanner-android 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 16
Source File: BOWTrainer.java From OpenCV-android with Apache License 2.0 | 5 votes |
public List<Mat> getDescriptors() { List<Mat> retVal = new ArrayList<Mat>(); Mat retValMat = new Mat(getDescriptors_0(nativeObj)); Converters.Mat_to_vector_Mat(retValMat, retVal); return retVal; }
Example 17
Source File: DescriptorExtractor.java From react-native-documentscanner-android with MIT License | 5 votes |
public void compute(List<Mat> images, List<MatOfKeyPoint> keypoints, List<Mat> descriptors) { Mat images_mat = Converters.vector_Mat_to_Mat(images); List<Mat> keypoints_tmplm = new ArrayList<Mat>((keypoints != null) ? keypoints.size() : 0); Mat keypoints_mat = Converters.vector_vector_KeyPoint_to_Mat(keypoints, keypoints_tmplm); Mat descriptors_mat = new Mat(); compute_1(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj, descriptors_mat.nativeObj); Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints); keypoints_mat.release(); Converters.Mat_to_vector_Mat(descriptors_mat, descriptors); descriptors_mat.release(); return; }
Example 18
Source File: Core.java From FTCVision 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: 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 20
Source File: Calib3d.java From FaceDetectDemo 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, 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 = calibrate_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, image_size.width, image_size.height, K.nativeObj, D.nativeObj, rvecs_mat.nativeObj, tvecs_mat.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; }