Normalize mean gray level🔗
Normalizes an image so that its local average is approximately constant everywhere. This is done by calculating the local average around each pixel and adjusting the pixel’s gray level so that it is relatively as far from the target mean as it was from the origin one.
The tool prevents overflows by cutting the gray levels at 255 in 8-bit images.
image: Input image. Color images will be normalized channel-wise.
windowSize: Size of the local window for average gray level calculation, in world coordinates.
targetMean: The target mean gray level.
image: Normalized image.