DIP Chapter 2-Part1- Histogram Manipulation

8
1/21/2009 1 Chapter 2 : Enhancement Part 1 : Modification of Contrast by Histogram manipulation Dr. Hojeij youssef Digital image processing 1 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 : Dr. Hojeij youssef 2

description

DIP Chapter 2-Part1- Histogram Manipulation

Transcript of DIP Chapter 2-Part1- Histogram Manipulation

Page 1: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

1

Chapter 2 : Enhancement

Part 1 : Modification of Contrast by Histogram manipulation

Dr. Hojeij youssef

Digital image processing

1

HistogramHistogram 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 :

Dr. Hojeij youssef2

Page 2: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

2

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

Contrast modification with histogram

Dr. Hojeij youssef3

Contrast modification with histogram

Dr. Hojeij youssef

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

Page 3: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

3

Contrast modification with histogram

Dr. Hojeij youssef

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

Contrast modification with histogram

Dr. Hojeij youssef

IV. Intensity level slicing

Segmentation of certain level of image

With background :

Without background :

6

Page 4: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

4

Contrast modification with histogram

Dr. Hojeij youssef

V. Bit extractionThis transformation is useful in determining the number of visually significant bitsin 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

Contrast modification with histogram

Dr. Hojeij youssef

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

Page 5: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

5

Contrast modification with histogram

Dr. Hojeij youssef

VII. Histogram equalizationA standard heuristic method for choosing the contrast enhancing non-linearity is tomake 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

Contrast modification with histogram

Dr. Hojeij youssef

Example :

10

Page 6: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

6

Contrast modification with histogram

Dr. Hojeij youssef

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

11

Examples

Dr. Hojeij youssef12

Page 7: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

7

Examples

Dr. Hojeij youssef13

Examples

Dr. Hojeij youssef14

Page 8: DIP Chapter 2-Part1- Histogram Manipulation

1/21/2009

8

Examples

Dr. Hojeij youssef15

Examples

Dr. Hojeij youssef16