Ask Your Question
0

Brute Force Matching with L2-Norm

asked 2017-10-25 07:48:00 -0500

Grillteller gravatar image

When I use the default method L2-Norm in cv::BFMatcher on an own defined descriptor, is it irrelevant which position every value in my descriptor vector has?

So when I have a descriptor vector (1, 1, 2, 2, 6, 8, 4, 5, ...) according to http://mathworld.wolfram.com/L2-Norm.... it should have the same L2-Norm as (6, 2, 5, 4, 2, 8, 2, 1, 1...).

When I would use NORM_HAMMING is the position then relevant? Am I right or completely confused?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-10-25 09:50:48 -0500

berak gravatar image

updated 2017-10-25 10:15:22 -0500

for both L2 and HAMMING norm, the position of the values is irrelevant, as long as you stay consistant with the ordering

 (x1*x2 + y1*y2 + z1*z2) == (y1*y2 + x1*x2 + z1*z2) == (z1*z2 + y1*y2 + x1*x2) == ...

let me try another drawing:

// ok.
(x1 y1 z1)
(x2 y2 z2)

// still ok (same result as above):
(z1 y1 x1)
(z2 y2 x2)

// not ok:
(x1 y1 z1)
(z2 y2 x2)

your example above will "fail" for both norms, since you arbitrarily change the order in one of the vectors. again, if you use the same permutation for all of your vectors, the results will be the same.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-10-25 07:48:00 -0500

Seen: 258 times

Last updated: Oct 25 '17