Java Code Examples for org.opencv.utils.Converters

The following are top voted examples for showing how to use org.opencv.utils.Converters. 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   File: Core.java   View source code 5 votes vote down vote up
public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
    Mat fromTo_mat = fromTo;
    mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
    
    return;
}
 
Example 2
Project: Image-Detection-Samples   File: Photo.java   View source code 5 votes vote down vote up
public static void denoise_TVL1(List<Mat> observations, Mat result, double lambda, int niters)
{
    Mat observations_mat = Converters.vector_Mat_to_Mat(observations);
    denoise_TVL1_0(observations_mat.nativeObj, result.nativeObj, lambda, niters);
    
    return;
}
 
Example 3
Project: Team9261-2017-2018   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance, List<Mat> masks, boolean compactResult)
{
    Mat matches_mat = new Mat();
    Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
    radiusMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, masks_mat.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 4
Project: Image-Detection-Samples   File: FeatureDetector.java   View source code 5 votes vote down vote up
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 5
Project: android-things-drawbot   File: Calib3d.java   View source code 5 votes vote down vote up
public static float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, List<Mat> imgpt1, List<Mat> imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat R1, Mat R2, Mat R3, Mat P1, Mat P2, Mat P3, Mat Q, double alpha, Size newImgSize, Rect roi1, Rect roi2, int flags)
{
    Mat imgpt1_mat = Converters.vector_Mat_to_Mat(imgpt1);
    Mat imgpt3_mat = Converters.vector_Mat_to_Mat(imgpt3);
    double[] roi1_out = new double[4];
    double[] roi2_out = new double[4];
    float retVal = rectify3Collinear_0(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, cameraMatrix3.nativeObj, distCoeffs3.nativeObj, imgpt1_mat.nativeObj, imgpt3_mat.nativeObj, imageSize.width, imageSize.height, R12.nativeObj, T12.nativeObj, R13.nativeObj, T13.nativeObj, R1.nativeObj, R2.nativeObj, R3.nativeObj, P1.nativeObj, P2.nativeObj, P3.nativeObj, Q.nativeObj, alpha, newImgSize.width, newImgSize.height, roi1_out, roi2_out, flags);
    if(roi1!=null){ roi1.x = (int)roi1_out[0]; roi1.y = (int)roi1_out[1]; roi1.width = (int)roi1_out[2]; roi1.height = (int)roi1_out[3]; }
    if(roi2!=null){ roi2.x = (int)roi2_out[0]; roi2.y = (int)roi2_out[1]; roi2.width = (int)roi2_out[2]; roi2.height = (int)roi2_out[3]; }
    return retVal;
}
 
Example 6
Project: fingerblox   File: MergeRobertson.java   View source code 5 votes vote down vote up
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 7
Project: Microsphere   File: MergeMertens.java   View source code 5 votes vote down vote up
public  void process(List<Mat> src, Mat dst)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    process_1(nativeObj, src_mat.nativeObj, dst.nativeObj);
    
    return;
}
 
Example 8
Project: Android-Code-Demos   File: AlignExposures.java   View source code 5 votes vote down vote up
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 9
Project: DogeCV   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void knnMatch(Mat queryDescriptors, List<MatOfDMatch> matches, int k)
{
    Mat matches_mat = new Mat();
    knnMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, k);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 10
Project: react-native-scan-doc   File: Calib3d.java   View source code 5 votes vote down vote up
public static double calibrateCamera(List<Mat> objectPoints, List<Mat> imagePoints, Size imageSize, Mat cameraMatrix, Mat distCoeffs, 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 = calibrateCamera_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, imageSize.width, imageSize.height, cameraMatrix.nativeObj, distCoeffs.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 11
Project: MOAAP   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance, List<Mat> masks, boolean compactResult)
{
    Mat matches_mat = new Mat();
    Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
    radiusMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, masks_mat.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 12
Project: real_time_circle_detection_android   File: Calib3d.java   View source code 5 votes vote down vote up
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 13
Project: Team9261-2017-2018   File: Imgproc.java   View source code 5 votes vote down vote up
public static void polylines(Mat img, List<MatOfPoint> pts, boolean isClosed, Scalar color, int thickness, int lineType, int shift)
{
    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_0(img.nativeObj, pts_mat.nativeObj, isClosed, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, shift);
    
    return;
}
 
Example 14
Project: MOAAP   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
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 15
Project: OpenCV   File: BOWTrainer.java   View source code 5 votes vote down vote up
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 16
Project: fingerblox   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance, List<Mat> masks, boolean compactResult)
{
    Mat matches_mat = new Mat();
    Mat masks_mat = Converters.vector_Mat_to_Mat(masks);
    radiusMatch_2(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, masks_mat.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 17
Project: MOAAP   File: MergeRobertson.java   View source code 5 votes vote down vote up
public  void process(List<Mat> src, Mat dst, Mat times)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
    
    return;
}
 
Example 18
Project: MOAAP   File: Calib3d.java   View source code 5 votes vote down vote up
public static float rectify3Collinear(Mat cameraMatrix1, Mat distCoeffs1, Mat cameraMatrix2, Mat distCoeffs2, Mat cameraMatrix3, Mat distCoeffs3, List<Mat> imgpt1, List<Mat> imgpt3, Size imageSize, Mat R12, Mat T12, Mat R13, Mat T13, Mat R1, Mat R2, Mat R3, Mat P1, Mat P2, Mat P3, Mat Q, double alpha, Size newImgSize, Rect roi1, Rect roi2, int flags)
{
    Mat imgpt1_mat = Converters.vector_Mat_to_Mat(imgpt1);
    Mat imgpt3_mat = Converters.vector_Mat_to_Mat(imgpt3);
    double[] roi1_out = new double[4];
    double[] roi2_out = new double[4];
    float retVal = rectify3Collinear_0(cameraMatrix1.nativeObj, distCoeffs1.nativeObj, cameraMatrix2.nativeObj, distCoeffs2.nativeObj, cameraMatrix3.nativeObj, distCoeffs3.nativeObj, imgpt1_mat.nativeObj, imgpt3_mat.nativeObj, imageSize.width, imageSize.height, R12.nativeObj, T12.nativeObj, R13.nativeObj, T13.nativeObj, R1.nativeObj, R2.nativeObj, R3.nativeObj, P1.nativeObj, P2.nativeObj, P3.nativeObj, Q.nativeObj, alpha, newImgSize.width, newImgSize.height, roi1_out, roi2_out, flags);
    if(roi1!=null){ roi1.x = (int)roi1_out[0]; roi1.y = (int)roi1_out[1]; roi1.width = (int)roi1_out[2]; roi1.height = (int)roi1_out[3]; } 
    if(roi2!=null){ roi2.x = (int)roi2_out[0]; roi2.y = (int)roi2_out[1]; roi2.width = (int)roi2_out[2]; roi2.height = (int)roi2_out[3]; } 
    return retVal;
}
 
Example 19
Project: MOAAP   File: MergeMertens.java   View source code 5 votes vote down vote up
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 20
Project: react-native-scan-doc   File: Feature2D.java   View source code 5 votes vote down vote up
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 21
Project: MOAAP   File: Photo.java   View source code 5 votes vote down vote up
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 22
Project: Microsphere   File: MergeDebevec.java   View source code 5 votes vote down vote up
public  void process(List<Mat> src, Mat dst, Mat times)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
    
    return;
}
 
Example 23
Project: MOAAP   File: BOWTrainer.java   View source code 5 votes vote down vote up
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 24
Project: android-imaging-utils   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
    
    return;
}
 
Example 25
Project: android-imaging-utils   File: Calib3d.java   View source code 5 votes vote down vote up
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, 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 = calibrateCameraExtended_0(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, 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 26
Project: react-native-scan-doc   File: Photo.java   View source code 5 votes vote down vote up
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 27
Project: react-native-scan-doc   File: Photo.java   View source code 5 votes vote down vote up
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 28
Project: MOAAP   File: FeatureDetector.java   View source code 5 votes vote down vote up
public  void detect(List<Mat> images, List<MatOfKeyPoint> keypoints)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat keypoints_mat = new Mat();
    detect_3(nativeObj, images_mat.nativeObj, keypoints_mat.nativeObj);
    Converters.Mat_to_vector_vector_KeyPoint(keypoints_mat, keypoints);
    keypoints_mat.release();
    return;
}
 
Example 29
Project: MOAAP   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat ranges_mat = ranges;
    calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
    
    return;
}
 
Example 30
Project: FTC2016   File: Core.java   View source code 5 votes vote down vote up
public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
    Mat fromTo_mat = fromTo;
    mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
    
    return;
}
 
Example 31
Project: real_time_circle_detection_android   File: Calib3d.java   View source code 5 votes vote down vote up
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;
}
 
Example 32
Project: MOAAP   File: Calib3d.java   View source code 5 votes vote down vote up
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 33
Project: EyeShopping   File: Core.java   View source code 5 votes vote down vote up
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 34
Project: Android-Code-Demos   File: Core.java   View source code 5 votes vote down vote up
public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
    Mat fromTo_mat = fromTo;
    mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
    
    return;
}
 
Example 35
Project: opencv-documentscanner-android   File: MSER.java   View source code 5 votes vote down vote up
public  void detectRegions(Mat image, List<MatOfPoint> msers, MatOfRect bboxes)
{
    Mat msers_mat = new Mat();
    Mat bboxes_mat = bboxes;
    detectRegions_0(nativeObj, image.nativeObj, msers_mat.nativeObj, bboxes_mat.nativeObj);
    Converters.Mat_to_vector_vector_Point(msers_mat, msers);
    msers_mat.release();
    return;
}
 
Example 36
Project: FTC2016   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
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 37
Project: android-age-estimator   File: Imgproc.java   View source code 5 votes vote down vote up
public static void findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method, Point offset)
{
    Mat contours_mat = new Mat();
    findContours_0(image.nativeObj, contours_mat.nativeObj, hierarchy.nativeObj, mode, method, offset.x, offset.y);
    Converters.Mat_to_vector_vector_Point(contours_mat, contours);
    contours_mat.release();
    return;
}
 
Example 38
Project: FTC2016   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat ranges_mat = ranges;
    calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
    
    return;
}
 
Example 39
Project: OpenCV   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_1(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj);
    
    return;
}
 
Example 40
Project: Android-Code-Demos   File: Features2d.java   View source code 5 votes vote down vote up
public static void drawMatches2(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List<MatOfByte> matchesMask, int flags)
{
    Mat keypoints1_mat = keypoints1;
    Mat keypoints2_mat = keypoints2;
    List<Mat> matches1to2_tmplm = new ArrayList<Mat>((matches1to2 != null) ? matches1to2.size() : 0);
    Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
    List<Mat> matchesMask_tmplm = new ArrayList<Mat>((matchesMask != null) ? matchesMask.size() : 0);
    Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
    drawMatches2_0(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj, flags);
    
    return;
}