Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

tricky one!

you messed up alpha and beta in normalize().

try:

normalize(hist, hist, 1, 0, NORM_L2, -1, Mat());

instead

tricky one!

you messed up alpha and beta in normalize().

try:

normalize(hist, hist, 1, 0, NORM_L2, -1, Mat());

instead


Histogram Matrix:[2, 2, 3, 4, 1, 2]
hist:[1; 3; 1; 1]
Normalize hist:[0.28867513; 0.86602539; 0.28867513; 0.28867513]