Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Piecewise-Linear Transformation Functions

The principal advantage of piecewise linear functions over the other types of
functions is that the form of piecewise functions can be arbitrarily complex. The
principal disadvantage of piecewise functions is that their specification requires
considerably more user input.

Contrast stretching

1. Low-contrast images can result from poor illumination, lack of dynamic range
in the imaging sensor, or even the wrong setting of a lens aperture during image
acquisition. Contrast stretching is a process that expands the range of intensity
levels in an image so that it spans the full intensity range of the recording medium
or display device.

2. Fig. shows a typical


transformation used for
contrast stretching. The
locations of points
(r1 , s1 ) and (r2 , s2 )
control the shape of the
transformation function.

3. If r1 = s1 and r2 = s2,
the transformation is a
linear function that
produces no changes in
intensity levels. If r1 = r2 , s1 = 0 and s2 = L-1, the transformation becomes a
thresholding function that creates a binary image.

4. Intermediate values of (r1 , s1 ) and (r2 , s2 ) produce various degrees of spread


in the intensity levels of the output image, thus affecting its contrast.

5. In general, r1 ≤ r2 and s1 ≤ s2 is assumed so that the function is single valued


and monotonically increasing. This condition preserves the order of intensity
levels, thus preventing the creation of intensity artifacts in the processed image.
Intensity-level slicing

1. Highlighting a specific range of intensities in an image often


desired.Applications include enhancing features such as masses of water in
satellite imagery and enhancing flaws in X-ray images.

2. The process, often called intensity-level slicing, can be implemented in several


ways, but most are variations of two basic themes. One approach is to display in
one value (say, white) all the values in the range of interest and in another (say,
black) all other intensities.

3. This transformation, shown in Fig. (a), highlights intensity range [A, B] and
reduces all other intensities to a lower level producing a binary image.

4. The second approach, based on the transformation in Fig. (b), brightens (or
darkens) the range of intensities [A, B] but leaves all other intensity levels in the
image unchanged.
Bit-plane slicing

1. Instead of highlighting intensity-level ranges, we could highlight the


contribution made to total image appearance by specific bits.

2. As Fig. illustrates, an 8-bit image may be considered as being composed of eight


1-bit planes, with plane 1 containing the lowest-order bit of all pixels in the image
and plane 8 all the highest-order bits.

3. In terms of intensity transformation functions, we can show that the binary


image for the 8th bit plane of an 8-bit image can be obtained by processing the
input image with a thresholding intensity transformation function that maps all
intensities between 0 and 127 to 0 and maps all levels between 128 and 255 to 1.

4. Decomposing an image into its bit planes is useful for analyzing the relative
importance of each bit in the image, a process that aids in determining the
adequacy of the number of bits used to quantize the image.

5. Also, this type of decomposition is useful for image compression, in which


fewer than all planes are used in reconstructing an image. The reconstruction is
done by multiplying the pixels of the nth plane by the constant 2n - 1 . This is
nothing more than converting the nth significant binary bit to decimal. Each plane
used is multiplied by the corresponding constant, and all planes used are added to
obtain the gray scale image.

You might also like