3/18/2015

Image Normalization

The greyscale image below is the luminance plane extracted from a color photo. The photo clearly shows poor contrast and the full dynamic range is unused; that is, there are no black pixels in the image and an excessive amount of white saturated pixels, as shown in the extracted histogram.

Low Contrast Image
Histogram

Normalization

The purpose of image normalization is often either (1) to make features of the image more familiar to human senses—perhaps more appealing; or (2) in Machine Vision applications to increase contrast for improved feature extraction or image segmentation. Linear Normalization will “stretch” the intensity range of an image and follows this formula:

IN = (I – Min) * ((MaxN – MinN) / (Max – Min)) + MinN ,

where IN is the normalized pixel, I is the intensity of the original pixel, Min and Max are the minimum and maximum pixel intensity in the image to be “stretched” to the new intensity, and MinN and MaxN are the new minimum and maximum pixel range for the normalized image. In the Cognex Insight platform, this is similar to the image filter called “stretch filter”. The lower and upper histogram intensities are stretched to be lower and higher in intensity to increase contrast. For example, in the image above, stretching the range 50 to 255 to the new range 0 to 255 gives the following result in the region of interest shown:
                
It is also possible to perform a non-linear normalization. In this case, the image Gamma, Brightness, and Contrast can all be adjusted producing a nonlinear transformation (curve shown below).

Equalization

One type of contrast enhancing filter technique is called Equalization. For the low contrast image above, equalization evenly distributes the pixels intensities across the full dynamic range of the image:
Histogram after Equalization
Low Contrast Image Histogram


Equalized Image
A disadvantage of image equalization is that it can also enhance noise in the image and produce image artifacts that otherwise would not be present. The absence or presence of the object of interest in the image can therefore dramatically affect the outcome of equalization. This is because the absence of the object may cause the equalization to perform only on a low contrast background, thus greatly enhancing noise in that background. When using image equalization it is often necessary to monitor contrast and/or object presence/absence.

Machine Vision Applications of Normalization/Equalization Techniques:

1. Increase the contrast of black print on a dark bottle cap for OCV (Optical Character Verification):


2. For detecting flaws in homogeneity of substances (low contrast) by increasing contrast:
Left: Original Image, Right: Equalized Image

In the image above, if the material of interest were absent and only the background was displayed, the image equalization would greatly enhance the background noise and could produce undesirable image artifacts as shown. In this case, monitoring the presence or absence of the material may be necessary so that the background noise is not detected as part of the material itself.

Left: Background of image. Right: Equalized image of bckground enhances noise

No comments:

Post a Comment