Updated by Alexander Shishkov almost 13 years ago

I use the BruteForceMatcher to match SurfFeature descriptors.
<pre><code class="cpp">


Mat d1, d2;
BruteForceMatcher<L2<float> > BFM;
vector<DMatch> Matches;
BFM.match(d1, d2, Matches);
</code></pre>

now it appears, that some entries of Matches have distance = -nan;
so I just used one single SurfFeature descriptor for d1, and d1.copyTo(d2), so d1 is identical to d2. Depending on the length of the descriptors (i cut so pieces off) i got Matchesr0.distance = {0, 0.000247, 0.00017, -nan, ...} which shouldn't happen as I think.
If I use BruteForceMatcher<L2<double> > ... all seems to be ok, meaning for the checks there are always distances 0.

I have a 64bit Machine with Ubuntu 10.04, compiled Opencv 2.3.1a with SSE, SSE2, I also tried other combintaions (+ SSE41, SSSE3).

The same error occurs on 64bit Ubuntu 11.04 opencv 2.3.1a and trunk.

But it didn't occur on a 64bit Ubunutu 11.10 machine unsing opencv trunk, SSE, SSE2.

Back