Ask Your Question

Revision history [back]

You have to use the setMatchingMask function. This function isn't in the documentation, but it's used when matching two images (see the below extracted from matcher.cpp

for (int i = 0; i < num_images - 1; ++i)
    for (int j = i + 1; j < num_images; ++j)
        if (features[i].keypoints.size() > 0 && features[j].keypoints.size() > 0 && mask_(i, j))
            near_pairs.push_back(make_pair(i, j));

Where mask_(i,j) is your mask set by setMatchingMask. If you successfully used this function, please create a pull request for the doc, it will help others...