Java Code Examples for org.opencv.core.MatOfDMatch

The following are top voted examples for showing how to use org.opencv.core.MatOfDMatch. 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: FaceDetectDemo   File: Converters.java   View source code 6 votes vote down vote up
public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
    if (lvdm == 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);
    lvdm.clear();
    for (Mat mi : mats) {
        MatOfDMatch vdm = new MatOfDMatch(mi);
        lvdm.add(vdm);
        mi.release();
    }
    mats.clear();
}
 
Example 2
Project: RobotIGS   File: Converters.java   View source code 6 votes vote down vote up
public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
    if (lvdm == 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);
    lvdm.clear();
    for (Mat mi : mats) {
        MatOfDMatch vdm = new MatOfDMatch(mi);
        lvdm.add(vdm);
        mi.release();
    }
    mats.clear();
}
 
Example 3
Project: Image-Detection-Samples   File: Converters.java   View source code 6 votes vote down vote up
public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
    if (lvdm == 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);
    lvdm.clear();
    for (Mat mi : mats) {
        MatOfDMatch vdm = new MatOfDMatch(mi);
        lvdm.add(vdm);
        mi.release();
    }
    mats.clear();
}
 
Example 4
Project: Ftc2018RelicRecovery   File: Converters.java   View source code 6 votes vote down vote up
public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
    if (lvdm == 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);
    lvdm.clear();
    for (Mat mi : mats) {
        MatOfDMatch vdm = new MatOfDMatch(mi);
        lvdm.add(vdm);
        mi.release();
    }
    mats.clear();
}
 
Example 5
Project: mao-android   File: Converters.java   View source code 6 votes vote down vote up
public static void Mat_to_vector_vector_DMatch(Mat m, List<MatOfDMatch> lvdm) {
    if (lvdm == 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);
    lvdm.clear();
    for (Mat mi : mats) {
        MatOfDMatch vdm = new MatOfDMatch(mi);
        lvdm.add(vdm);
        mi.release();
    }
    mats.clear();
}
 
Example 6
Project: opencv-documentscanner-android   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k)
{
    Mat matches_mat = new Mat();
    knnMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 7
Project: react-native-scan-doc   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 8
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)
{
    Mat matches_mat = new Mat();
    radiusMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 9
Project: opencv-documentscanner-android   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, MatOfDMatch matches)
{
    Mat matches_mat = matches;
    match_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj);
    
    return;
}
 
Example 10
Project: EyeShopping   File: Features2d.java   View source code 5 votes vote down vote up
public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask, int flags)
{
    Mat keypoints1_mat = keypoints1;
    Mat keypoints2_mat = keypoints2;
    Mat matches1to2_mat = matches1to2;
    Mat matchesMask_mat = matchesMask;
    drawMatches_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;
}
 
Example 11
Project: RobotIGS   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches, Mat mask)
{
    Mat matches_mat = matches;
    match_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, mask.nativeObj);
    
    return;
}
 
Example 12
Project: mao-android   File: Features2d.java   View source code 5 votes vote down vote up
public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg)
{
    Mat keypoints1_mat = keypoints1;
    Mat keypoints2_mat = keypoints2;
    Mat matches1to2_mat = matches1to2;
    drawMatches_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
    
    return;
}
 
Example 13
Project: MOAAP   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 14
Project: FaceDetectDemo   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 15
Project: FTC2016   File: ObjectDetection.java   View source code 5 votes vote down vote up
/**
 * Analyzes a scene for a target object.
 *
 * @param scene    The scene to be analyzed as a GRAYSCALE matrix
 * @param analysis The target object's analysis from analyzeObject
 * @return A complete scene analysis
 */
public SceneAnalysis analyzeScene(Mat scene, ObjectAnalysis analysis) throws IllegalArgumentException {
    MatOfKeyPoint keypointsScene = new MatOfKeyPoint();

    //DETECT KEYPOINTS in scene
    detector.detect(scene, keypointsScene);

    //EXTRACT KEYPOINT INFO from scene
    Mat descriptorsScene = new Mat();
    extractor.compute(scene, keypointsScene, descriptorsScene);

    if (analysis == null) {
        throw new IllegalArgumentException("Analysis must not be null!");
    }

    if (analysis.descriptors.cols() != descriptorsScene.cols() || analysis.descriptors.type() != descriptorsScene.type()) {
        throw new IllegalArgumentException("Object and scene descriptors do not match in cols() or type().");
    }

    MatOfDMatch matches = new MatOfDMatch();
    matcher.match(analysis.descriptors, descriptorsScene, matches);

    //FILTER KEYPOINTS
     /*double max_dist = 0, min_dist = 100;

    for(int i = 0; i < objectAnalysis.descriptors.rows(); i++) {
        double dist = matches.get;
        if(dist < )
    }*/

    //STORE SCENE ANALYSIS
    return new SceneAnalysis(keypointsScene, descriptorsScene, matches, scene);
}
 
Example 16
Project: opencv-documentscanner-android   File: Features2d.java   View source code 5 votes vote down vote up
public static void drawMatchesKnn(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);
    drawMatchesKnn_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;
}
 
Example 17
Project: MOAAP   File: Features2d.java   View source code 5 votes vote down vote up
public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg)
{
    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);
    drawMatchesKnn_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
    
    return;
}
 
Example 18
Project: Image-Detection-Samples   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 19
Project: MOAAP   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)
{
    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);
    drawMatches2_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
    
    return;
}
 
Example 20
Project: NotifyTools   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 21
Project: FaceDetectDemo   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k, Mat mask, boolean compactResult)
{
    Mat matches_mat = new Mat();
    knnMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k, mask.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 22
Project: Ftc2018RelicRecovery   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, MatOfDMatch matches)
{
    Mat matches_mat = matches;
    match_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj);
    
    return;
}
 
Example 23
Project: android-age-estimator   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 24
Project: MOAAP   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches)
{
    Mat matches_mat = matches;
    match_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj);
    
    return;
}
 
Example 25
Project: Team9261-2017-2018   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k)
{
    Mat matches_mat = new Mat();
    knnMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 26
Project: Team9261-2017-2018   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches)
{
    Mat matches_mat = matches;
    match_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj);
    
    return;
}
 
Example 27
Project: MOAAP   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, MatOfDMatch matches)
{
    Mat matches_mat = matches;
    match_3(nativeObj, queryDescriptors.nativeObj, matches_mat.nativeObj);
    
    return;
}
 
Example 28
Project: FTC2016   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)
{
    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);
    drawMatches2_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
    
    return;
}
 
Example 29
Project: FaceDetectDemo   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 30
Project: react-native-scan-doc   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance, Mat mask, boolean compactResult)
{
    Mat matches_mat = new Mat();
    radiusMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, mask.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 31
Project: FaceDetectDemo   File: Features2d.java   View source code 5 votes vote down vote up
public static void drawMatchesKnn(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);
    drawMatchesKnn_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;
}
 
Example 32
Project: Sikulix2opencv   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance, Mat mask, boolean compactResult)
{
    Mat matches_mat = new Mat();
    radiusMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, mask.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 33
Project: FTC2016   File: Features2d.java   View source code 5 votes vote down vote up
public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg)
{
    Mat keypoints1_mat = keypoints1;
    Mat keypoints2_mat = keypoints2;
    Mat matches1to2_mat = matches1to2;
    drawMatches_1(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
    
    return;
}
 
Example 34
Project: DNNLibrary   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches, Mat mask)
{
    Mat matches_mat = matches;
    match_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, mask.nativeObj);
    
    return;
}
 
Example 35
Project: Microsphere   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance)
{
    Mat matches_mat = new Mat();
    radiusMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 36
Project: FaceDetectDemo   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void knnMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, int k)
{
    Mat matches_mat = new Mat();
    knnMatch_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, k);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 37
Project: renderscript_examples   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void radiusMatch(Mat queryDescriptors, Mat trainDescriptors, List<MatOfDMatch> matches, float maxDistance, Mat mask, boolean compactResult)
{
    Mat matches_mat = new Mat();
    radiusMatch_0(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj, maxDistance, mask.nativeObj, compactResult);
    Converters.Mat_to_vector_vector_DMatch(matches_mat, matches);
    matches_mat.release();
    return;
}
 
Example 38
Project: MOAAP   File: DescriptorMatcher.java   View source code 5 votes vote down vote up
public  void match(Mat queryDescriptors, Mat trainDescriptors, MatOfDMatch matches)
{
    Mat matches_mat = matches;
    match_1(nativeObj, queryDescriptors.nativeObj, trainDescriptors.nativeObj, matches_mat.nativeObj);
    
    return;
}
 
Example 39
Project: mao-android   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;
}
 
Example 40
Project: mao-android   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;
}