normalize

Description

Normalizes the norm or value range of an array.

Signature

cv2.normalize(src[, dst[, alpha[, beta[, norm_type[, dtype[, mask]]]]]]) → dst

Parameters

Explanation

The functions normalize scale and shift the input array elements so that \(\|\text{dst}\|_{L_p} = \text{alpha}\), where \(p\) = \(\infty\), 1, or 2, when using norm_type NORM_INF, NORM_L1, or NORM_L2. This is referred to as normalizing the norm.

When using norm_type NORM_MINMAX, this function works to satisfy both alpha = \(\min_I\) dst(I) and beta = \(\max_I\) dst(I). This is referred to as normalizing the range.

To modify an entire image using the norm of only a subarray, use the functions norm() and convertScaleAbs().


References

Created with OpenCV 4.4.0