The formula is:
out_val=(in_val-min_val)/(max_val-min_val);
- in_val - input matrix element value;
- out_val - output matrix element value;
- min_val - minimal element in input matrix;
- max_val - maximal element in input matrix.
Pergunta
I was wondering does anyone know / where I could find the calculations or formulas used for OpenCV's Normalize function on a distance map given the beta value 0 and alpha value 1, with the normalization type NORM_MINMAX:
normalize(distanceT, distanceT, 0, 1, NORM_MINMAX);
I cannot find any information in the documentation so I have been looking at articles such as: http://en.wikipedia.org/wiki/Normalization_%28image_processing%29
but doing the calculations do not yield the same results as the OpenCV's algorithm.
Many thanks.
Solução
The formula is:
out_val=(in_val-min_val)/(max_val-min_val);