Ask Your Question
3

How can i use a custom norm with BruteForceMatcher ?

asked 2012-12-04 09:52:17 -0600

Amy gravatar image

I was trying to use FREAKS (https://github.com/kikohs/freak) & BRISK (http://www.asl.ethz.ch/people/lestefan/personal/BRISK) author's code. They both define custom Hamming norms to use SSSE3 instructions.

Only there's a major difference between 2.3.x and 2.4.x in BruteForceMatcher. Since commit 957e80ab, BruteForceMatcher takes an (int normType) instead of a Distance.

Thus their code using custom norms is now broken, and I don't quite see how to use a custom distance without modifying library code.

The only solution i have seen up to now is

  1. add a <custom_norm_type> to the enum list in core.hpp (l.124)
  2. add calls to the custom norm function in similar ways than where NORM_HAMMING is used, i.e. lots of changes in core/src/stat.cpp

Now i have to recompile OpenCV & use a custom version. This is annoying.

If you check the links above, you'll see how much more practical it was before.

So what do you recommend now?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-01-07 01:34:14 -0600

laoli_jade gravatar image

updated 2013-01-07 01:36:48 -0600

In my BRISK test,the custom Hamming norms to use SSSE3 instructions can not be run in opencv 2.3.1, so i did not use the custom hamming method. how to see the implementation code of the feature matching algorithm?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-12-04 09:52:17 -0600

Seen: 1,347 times

Last updated: Jan 07 '13