문제

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.

도움이 되었습니까?

해결책

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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top