You are on page 1of 8

1/21/2009

Digital image processing

Chapter 2 :
Enhancement Part 1 : Modification of Contrast by Histogram
manipulation

1 Dr. Hojeij youssef

Histogram
Histogram definition :
Gray levels distribution Frequency of occurrence of the various gray levels in the image.

Modeling techniques :
Modify an image so that its histogram has the desired shape. Useful in stretching the low-contrast levels of images with narrow histograms. Histogram modeling has been found to be a powerful technique for image enhancement.

Contrast definition : 2 definitions


Standard deviation of changes in grayscale :

Variation between min and max grayscale :


2 Dr. Hojeij youssef

1/21/2009

Contrast modification with histogram


Several possible methods :
I. Contrast Stretching for Low Contrast images :
Stretch the over-concentrated gray-levels in histogram via a non-linear mapping
Piece-wise linear stretching function Assign slopes of the stretching region to be greater than 1

3 Dr. Hojeij youssef

Contrast modification with histogram


II. Clipping & Thresholding
Clipping
- Special case of contrast stretching with - Useful for noise reduction when interested signal

Thresholding
- Special case of clipping with a=b=T - Useful for binarization of scanned binary images

4 Dr. Hojeij youssef

1/21/2009

Contrast modification with histogram


III. Grayscale reversal (Negative of image)
A negative image can be obtained by reverse scaling of the gray levels according to the transformation :

Useful in the display in the medical images and producing negative prints of images

5 Dr. Hojeij youssef

Contrast modification with histogram


IV. Intensity level slicing
Segmentation of certain level of image
With background :

Without background :

6 Dr. Hojeij youssef

1/21/2009

Contrast modification with histogram


V. Bit extraction This transformation is useful in determining the number of visually significant bits in an image.
Suppose each image pixel is uniformly quantized to B bits. It is desired to extract the most significant bit an display it. Pixel value can be written as :

- Then we want the output to be :

- It easy to show that :

- Where :
7 Dr. Hojeij youssef

Contrast modification with histogram


VI. Range compression
Sometimes the dynamic of the image data can be very large. The dynamic range can be compressed via the logarithmic transformation

This transformation enhances the small magnitude pixels compared to those pixels with large magnitudes :

8 Dr. Hojeij youssef

1/21/2009

Contrast modification with histogram


VII. Histogram equalization A standard heuristic method for choosing the contrast enhancing non-linearity is to make the histogram of the intensities uniform :
Stretch apart intensity values that are too close together. Represent all intensities equally often. Spend more of the dynamic range on intensities that occur more often.

9 Dr. Hojeij youssef

Contrast modification with histogram


Example :

10 Dr. Hojeij youssef

1/21/2009

Contrast modification with histogram


VIII. Histogram specification Histogram specification is a technique that transforms the histogram of one image into the histogram of another image. This transformation can be easily accomplished by recognizing that if instead of using an equally spaced ideal histogram (as in histogram equalization), one is specified explicitly. In this way it is possible to impose an arbitrary histogram on any image, subject to the constraint that single bins may not be split

11 Dr. Hojeij youssef

Examples

12 Dr. Hojeij youssef

1/21/2009

Examples

13 Dr. Hojeij youssef

Examples

14 Dr. Hojeij youssef

1/21/2009

Examples

15 Dr. Hojeij youssef

Examples

16 Dr. Hojeij youssef

You might also like