This forum is disabled, please visit https://forum.opencv.org

1 | initial version |

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

(x*x + y*y + z*z) == (y*y + x*x + z*z) == (z*z + y*y + x*x) == ...

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.

2 | No.2 Revision |

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

(x*x *

`(x*x +`

~~y~~`y y*y +`

~~z~~z)z*z) ==y (y*y +~~(y~~~~x~~xx*x +z) z*z) ==~~z~~~~(z~~z(z*z +y y*y + x*x) ==~~y~~~~...~~...

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.

3 | No.3 Revision |

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

` `~~(x*x ~~(x1*x2 + ~~y*y ~~y1*y2 + ~~z*z) ~~z1*z2) == ~~(y*y ~~(y1*y2 + ~~x*x ~~x1*x2 + ~~z*z) ~~z1*z2) == ~~(z*z ~~(z1*z2 + ~~y*y ~~y1*y2 + ~~x*x) ~~x1*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.

4 | No.4 Revision |

**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)
```

* one* of the vectors. again, if you use the same permutation for

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.