05 histogram processing DIP

Post on 16-Jan-2015

1.052 views 2 download

Tags:

description

Digital image Processing

Transcript of 05 histogram processing DIP

Histogram Processing : 1

HistogramsHistograms

Histogram

Discrete function h(rk) showing the number of occurrences nk for the kth gray level rk

Normalized Histogram

Gives estimate of probability of occurrence of gray level rk (probability distribution function)

( )k kh r n

1

0

( ) / , ( ) 1L

k k kp r n n p r

Histogram Processing : 2

Histograms: ExampleHistograms: Example

Histogram Processing : 3

Histogram EqualizationHistogram Equalization

High-contrast images are often desirable from a visual perspective

High-contrast images have histograms where the components cover a wide dynamic range

Distribution of pixels are close to a uniform distribution

Intuitively, low-contrast images can be enhanced by transforming its pixel distribution into a uniform distribution to achieve high contrast

Histogram Processing : 4

Histogram EqualizationHistogram Equalization

Let p(r) and p(s) denote the probability density functions of r and s

For s=T(r), p(s) can be expressed as,

Since we want to transform the input image such that the pixel distribution is uniform,

( ) ( )dr

p s p rds

( ) 1 , 0 1p s s

Histogram Processing : 5

Histogram EqualizationHistogram Equalization

What transformation will give you a uniform distribution for s?

Cumulative distribution function (CDF)

Why?

0( ) ( )

rs T r p w dw

0( )

( )

rd p w dwds

p rdr dr

1( ) ( ) 1

( )p s p r

p r

Histogram Processing : 6

Histogram EqualizationHistogram Equalization

Histogram Processing : 7

Histogram EqualizationHistogram Equalization

For discrete case,

1

0

( ) / , ( ) 1L

k k kk

p r n n p r

( ) ( )k

k k jj o

s T r p r

Histogram Processing : 8

Histogram Equalization: ExampleHistogram Equalization: Example

Histogram Processing : 9

Local Histogram EqualizationLocal Histogram Equalization

Global approach good for overall contrast enhancement

However, there may be cases where it is necessary to enhance details over small areas in image

Solution: perform histogram equalization over a small neighborhood

Histogram Processing : 10

Local Histogram Equalization:Local Histogram Equalization:ExampleExample

Histogram Processing : 11

Enhancement Using Arithmetic/Logic Enhancement Using Arithmetic/Logic OperationsOperations

Performed on a pixel-by-pixel basis between two or more images

( , ) ( , ) ( , )g x y f x y h x y

Histogram Processing : 12

Enhancement Using AND Operation: ExampleEnhancement Using AND Operation: Example

Histogram Processing : 13

Enhancement Using OR Operation: ExampleEnhancement Using OR Operation: Example

Histogram Processing : 14

Enhancement Using Subtraction Operation: Enhancement Using Subtraction Operation: ExampleExample

Histogram Processing : 15

Enhancement Using Subtraction Operation: Enhancement Using Subtraction Operation: ExampleExample

Histogram Processing : 16

Noise reduction by Image AveragingNoise reduction by Image Averaging