Commit 16e20e5c authored by laurentBerger's avatar laurentBerger

An another improvement?

parent 26d7da68
......@@ -97,12 +97,18 @@ int main(int argc, char *argv[])
// Match method loop
for (itMatcher = typeAlgoMatch.begin(); itMatcher != typeAlgoMatch.end(); itMatcher++){
descriptorMatcher = DescriptorMatcher::create(*itMatcher);
if ((*itMatcher == "BruteForce-Hamming" || *itMatcher == "BruteForce-Hamming(2)") && (b->descriptorType() == CV_32F || b->defaultNorm() <= NORM_L2SQR) )
if ((*itMatcher == "BruteForce-Hamming" || *itMatcher == "BruteForce-Hamming(2)") && (b->descriptorType() == CV_32F || b->defaultNorm() <= NORM_L2SQR))
{
cout << "**************************************************************************\n";
cout << "It's strange. You should use Hamming distance only for a binary descriptor\n";
cout << "**************************************************************************\n";
}
if ((*itMatcher == "BruteForce" || *itMatcher == "BruteForce-L1") && (b->defaultNorm() >= NORM_HAMMING))
{
cout << "**************************************************************************\n";
cout << "It's strange. You shouldn't use L1 or L2 distance for a binary descriptor\n";
cout << "**************************************************************************\n";
}
try
{
descriptorMatcher->match(descImg1, descImg2, matches, Mat());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment