Ask Your Question

JohnyK.'s profile - activity

2014-11-25 02:48:32 -0600 asked a question How can I exclude certain keypoint from matching?

Hi,

I have two cv::Mat with descriptors desc1 and desc2.

Now I want to perform a matching of these key points in two steps.

First step: Match all descriptors in desc1 with desc2 (excluding 1, 5, 8, 9 for example) Second step: Match descriptors in desc1 that where not matched in first step with following descriptors in desc2 (1, 5, 8, 9).

I hope that you understand what I mean. I think this should be possible using masks. But how?

Thanks in advance!

2014-11-11 09:24:21 -0600 asked a question cv::findHomography does not work

Hi,

I use the following code:

    //Points
    std::vector<cv::Point2f> detectedPoints;
    std::vector<cv::Point2f> localPoints;

    for (std::vector< cv::DMatch >::iterator i = matches.begin(); i != matches.end(); ++i)
    {
        detectedPoints.push_back(detectedKeyPoints.at(i->queryIdx).pt);
        localPoints.push_back(localKeyPoints.at(i->trainIdx).pt);
        std::cout << "Detected: " << detectedKeyPoints.at(i->queryIdx).pt << " Local: " << localKeyPoints.at(i->trainIdx).pt << std::endl;
    }

    cv::Mat H12;
    cv::Mat mask;

    H12 = cv::findHomography(detectedPoints, localPoints, mask, CV_RANSAC, 3);

    std::cout << mask << std::endl;

That is resulting in the following output:

Detected: [139.324, 160.001] Local: [139.323, 160]
Detected: [256.327, 212.994] Local: [256.323, 213]
Detected: [141.323, 140] Local: [141.323, 140]
Detected: [139.323, 141.001] Local: [187.323, 159]
Detected: [176.318, 61.9985] Local: [176.323, 62]
Detected: [255.328, 239.994] Local: [86.323, 218]
Detected: [133.318, 62.0009] Local: [126.323, 216]
[1; 1; 0; 0; 0; 1; 1]

Point 1 seems to be a good match so is point 2. But why is point 3 marked as outlier whereas points 6 and 7 are marked as inliers but they are definitely not.

2014-10-28 08:54:26 -0600 received badge  Student (source)
2014-10-10 04:42:57 -0600 asked a question Matcher: Why match() uses const Mat& queryDescriptors as input for descriptors while add() is using const vector<Mat>& descriptors

Hi,

I am a bit confused about the input types. I want to implement matching for the following scenario:

  1. Perform a scan (in the scan there are several descriptors that should be matched to landmarks)
  2. Do the matching
  3. When one descriptor(landmark) is identified then do s.th. otherwise add the descriptor to the matcher's train set.

When should I use vectors and when matrices?

2014-10-07 09:42:54 -0600 asked a question How can I change the norm used by cv::FlannBasedMatcher?

Hi, I use the following code to create a cv::FlannBasedMatcher.

new cv::FlannBasedMatcher(new cv::flann::LshIndexParams(6, 12, 2));

How can I change the norm used by the matcher?

Thx

2014-10-06 03:06:58 -0600 asked a question How can I use the FlannBasedMatcher with HierarchicalClustering for matching binary features using the Hamming norm?

Hi,

can anyone provide a code snippet please?

Thanks