3
$\begingroup$

I'm trying to use ORB features with a cv::BFMatcher. ORB is based on binary descriptors so HAMMING must be the choice, but I'm not sure I understand the difference between NORM_HAMMING2 vs NORM_HAMMING and witch one is the right choice.

I made some test but I couldn't find any reliable difference.

$\endgroup$
3
$\begingroup$

From BFMatcher constructor documentation:

NORM_HAMMING should be used with ORB, BRISK and BRIEF, NORM_HAMMING2 should be used with ORB when WTA_K==3 or 4 (see ORB::ORB constructor description)

And ORB constructor documentation:

WTA_K - [...] Other possible values are 3 and 4. [...] Such output will occupy 2 bits, and therefore it will need a special variant of Hamming distance, denoted as NORM_HAMMING2 (2 bits per bin).

In other words the right choice is the one that matches your ORB configuration (NORM_HAMMING when WTA_K==2, and NORM_HAMMING2 when WTA_K==3 or WTA_K==4), otherwise you'll wind up with incorrect norms and correspondingly poorer/inconsistent matching performance.

$\endgroup$
  • $\begingroup$ Nice! I thought It was just a faster algorithm. I didn't notice it was already explained in the WTA_K documentation. $\endgroup$ – Albert Garcias Mirabent Jan 30 '16 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.