Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Image Processing Week III

Similar presentations


Presentation on theme: "Digital Image Processing Week III"— Presentation transcript:

1 Digital Image Processing Week III
Thurdsak LEAUHATONG

2 Histogram Matching Problem of Histogram Equalization Histogram equalization may not always produce desirable results, particularly if the given histogram is very narrow. It can produce false edges and regions. It can also increase image “graininess” and “patchiness.”

3 Histogram Matching Transfer to a pre-specified histogram
In this case, transformation that yields an output image with a pre-specified histogram may produce the preferable result. This technique is called histogram matching.

4 Histogram Matching Algorithm
Perform the histogram equalization of the input image. Let be the pre-specified PDF of the output image. Compute the CDF of HM is the inverse of G(s). T( ) G-1( ) r s t

5 Histogram Matching Example Intensity ( s ) # pixels 20 1 5 2 25 3 10 4
Histogram of Input Image Pre-specified Histogram Intensity ( s ) # pixels 20 1 5 2 25 3 10 4 15 6 7 Total 100 Intensity ( t ) # pixels 5 1 10 2 15 3 20 4 6 7 Total 100

6 Histogram Matching Example (cont.) 1. Histogram Equalization of both r
(nj) SPr s 20 0.2 1 5 0.25 2 25 0.5 3 10 0.6 4 15 0.75 0.8 6 0.9 7 1.0 t (nj) SPt v 5 0.05 1 10 0.15 2 15 0.3 3 20 0.5 4 0.7 0.85 6 0.95 7 1.0

7 Histogram Matching Example (cont.) r s 1 2 3 4 5 6 7 v t 1 2 4 3 5 6 7
Actual Output Histogram r s 1 2 3 4 5 6 7 v t 1 2 4 3 5 6 7 r t 1 2 3 4 5 6 7 t # Pixels 1 20 2 30 3 10 4 15 5 6 7

8 Histogram Matching Example (cont.) Desired histogram Transfer function
Actual histogram

9 Histogram Matching Example (cont.) Original image After histogram
equalization After histogram matching

10 Local Histogram Processing
Global vs Local Histogram Processing Global Histogram Processing The intensity of a pixel depends on the PDF of intensities of an entire image. Local Histogram Processing The intensity at a position (x,y) depends on the PDF of intensities in a small window whose center locates at (x,y).

11 Local Histogram Processing
Global and Local Statistics Global Mean and nth Moment Local Mean and nth moment Global Mean Local Mean Global nth Moment Local nth Moment

12 Local Histogram Processing
Global and Local Statistics Global Mean and nth Moment Local Mean and nth moment Global Mean measures the intensity’s average of the entire image. Global 2nd Moment or called Variance measures how the intensity of the entire spread about the mean. It is useful to measure the global contrast of the image. Local Mean measures the average of the local intensity. Local 2nd Moment or called Variance measures how the local intensity spread about the local mean. It is useful to measure the local contrast, edge, and texture of the image.

13 Local Histogram Processing
Local Statistics Examples Original image Mean 3x3 Mean 5x5

14 Local Histogram Processing
Local Statistics Examples Standard deviation 3x3 Standard deviation 5x5

15 Local Statistics Processing
Vision Feature Vision feature a piece of information which is relevant for solving the computational task related to a certain application. Intensity : Simple vision feature Dark Objects Dark Background For example Want to enhance the dark objects. How to separate the dark objects from the dark background.

16 Local Statistics Processing
Using intensity to detect the dark objects Assumption: The dark objects are the areas whose intensity is . Result: Cannot separate the dark objects from the dark area. Intensity is not a good feature to detect the dark objects.

17 Local Statistics Processing
Using local mean to detect the dark objects Assumption: The dark objects are the areas whose local mean is . Result: Cannot separate the dark objects from the dark area. Local mean is not a good feature to detect the dark objects.

18 Local Statistics Processing
Using local variance to detect the dark objects Assumption: The dark objects are the areas whose local variance is . Result: The local variance does not detect the dark backgrounds, but detects both of the bright and dark objects. Local variance is not a good feature to separate the bright objects from the dark objects.

19 Local Statistics Processing
Using the combination of the local mean and local variance. Assumption: The dark objects are the areas whose local mean and local variance are . Result: Can well detect the dark objects. window size 3x3 window size 5x5 window size 7x7

20 Local Statistics Processing
Using the local statistics to enhance the dark objects. Original Image window size 3x3


Download ppt "Digital Image Processing Week III"

Similar presentations


Ads by Google