Last edited on 1999-03-15 11:12:43 by stolfi

The local normalization filter

The basic idea

A local normalization filter (LNF) is an image processing algorithm that rescales each pixel value p according to a linear scale determined by the distribution of values of the neighboring pixels. The scaling depends on two real parameters a and b in [0 _ 1]. It maps the a and b fractiles ya, yb of the distribution to specified intensities za and b, respectively.

Thus, for example, if we specify
a = 0.05 za = 0.20
b 0.95 zb = 0.80
then a pixel that is greater than 5% of its neighbors becomes 0.20, and a pixel that is greater than 95% of its neighbors becomes 0.80. Other pixel values are linearly interpolated, as follows
[ymin _ y0.05] --> [0.00 _ 0.20]
[y0.05 _ y0.95] --> [0.20 _ 0.80]
[y0.95 _ ymax] --> [0.80 _ 1.00]
where [ymin .. ymax] is the input pixel range, usually [0..255].

The LNF is therefore the standard constrast normalization algorithm, except that the fractiles ya, yb are computed separately for each pixel, from a histogram of the pixel values inside the window.

Note that the local computation of the fractiles allows the LNF to reject most of the intensity variations with scale greater than the window size, while shifting and amplifying those with smaller scales to roughly fill the specified range [za _ zb]. Therefore, one can say that the LNF is a non-linear "high-pass" filter.

The LNF is useful in restoring the contrast of images that have been overexposed, underexposed, or badly corrected; especially images that have been degraded by a reproduction process whose parameters vary from place to place.

The weighted local normalization filter

The basic LNF described above has one drawback: an isolated bright or dark spot surrounded by a contrasting background will produce an "echo" whose shape is that of the window.

We can avoid such defects by using a weighted local normalization filter (WLNF): a variant of the basic LNF, in which the neighbors are weighted according to distance, and the fractile computation takes such weights into account. More precisely, the t fractile of a pixel is redefined as the the value yt such that the sum of the weights of the pixels in the neighborhood which are darker than yt is t times the sum of all weights in that neighborhood.

A suitable weight function is the 2-D Gaussian distribution

w[x,y] = exp(-(x^2+y^2)/r^2)

The characteristic radius r defines the effective size of the neighborhood.

Examples