Ask Your Question

Revision history [back]

What do you mean? The docu says: "or so that min(dist) = alpha and max(dist) = beta when normType=NORM_MINMAX (for dense arrays only)"

What do you mean? The docu says: "or so that min(dist) = alpha and max(dist) = beta when normType=NORM_MINMAX (for dense arrays only)"

As it only scales and shifts, the transformation should be (if a and b are you lower and upper bound in the input)

dst = (x-a)/(b-a)*(beta-alpha) + alpha

(but that should be easy to verify in the code)

What do you mean? The docu says: "or so that min(dist) = alpha and max(dist) = beta when normType=NORM_MINMAX (for dense arrays only)"

As it only scales and shifts, the transformation should be (if a and b are you lower and upper bound in the input)

dst = (x-a)/(b-a)*(beta-alpha) + alpha

(but that should be easy to verify in the code)

// the code is here: https://github.com/Itseez/opencv/blob/master/modules/core/src/convert.cpp#L6076