Вы находитесь на странице: 1из 10

Unit II Image Enhancement Histogram

It is the graph between h(rk) Vs rk h(rk) =nk where rk is the kth intensity value and n k is the number of pixels in the image with intensity rk

Normalized histogram is given by p(rk) = nk/MN Vs. rk probability of occurrence of intensity level rk in an image.

Histogram equalization

Let r denote intensities of an image, assume r is in the range [0,L-1], r=0 represent black r= L-1 represent white.

We consider transformation s = T(r)

0 r L-1

that produce an output intensity level s for every pixel in the input image having intensity r.we assume that a)T(r) is a monotonically increasing function in the interval in the interval 0 r L-1 and b) 0 T(r) L-1 for 0 r L-1 for inverse r = T-1(s) 0 s L-1 condition is

a) T(r) is a strictly monotonically increasing function in the interval in the interval 0 r L-1 and b) 0 T(r) L-1 for 0 r L-1

a) denoting output intensity values will never be less than corresponding input values.

b) guarantees range of output is same as input. a) guarantees mapping from s back to r will be one to one. Let p(r) and p(s) denote the PDFs of r and s then

p(s) = 1/L-1 function.

0 s L-1 uniform probability density

Histogram Specification The method used to generate a processed image that has a specified histogram is called histogram matching or histogram Specification .

Noise Distributions Gaussian Noise Both spatial and frequency domains these models are used. The PDF of Gaussian variable z is given by e - (z-z)
2

p (z) = 1/2s s 2-variance of z

/ 2s 2

z- is the mean standard deviation

Exponential Noise The PDF of exponential noise is given by p(z) = ae az Where a > 0 .The mean and variance of this density function are

z = 1/a s 2 = 1/ a 2

Spatial averaging Consider an arbitrary location in an image (100,150).Assuming that the origin of the neighborhood is at its centre the result g(100,150) at that location is computed as sum of f(100,150) and its 8 neighbors divided by 9. The origin of the neighborhood is moved to next location .

Typically the process starts at the top left of the input image and proceeds pixel by pixel in a horizontal scan one row at a time.

The procedure just described is called spatial averaging.

Directional Smoothing Smoothing filters are used for blurring and for noise reduction. Blurring is used in preprocessing tasks such as removal of small details of from an image prior to object extraction and bridging of small gaps in lines or curves.

Median filter Replaces the value of a pixel by the median of the intensity levels in the neighborhood of that pixel. Geometric mean Each stored pixel is given by the product of the pixels in the subimage window raised to the power 1/mn. Harmonic mean Given by the expression

f(x,y) = mn / 1/g(s,t) (s,t) Sxy It works for salt noise fails for pepper noise.

Contraharmonic mean filters


Q+1

g(s,t)

(s,t) Sx f(x,y) = ------------------Q

g(s,t)

(s,t) Sx Q is called the order of the filter

Homomorphic filtering

f(x,y)

ln

DFT

H(u,v)

DFT -1

exp

g(x,y)

An image appearance can be improved by simultaneous intensity range compression and contrast enhancement.

Here f(x,y) is the product of the reflectance and illumination components

Color image enhancement

The neighborhood processing of color image is done by smoothing and sharpening. Smoothing or Average is given by

c(x,y) =

1/K

c (s,t) (s,t) Sxy

Sxy denote the set of coordinates defining a neighborhood centered at (x,y)in an RGB color image.

Sharpening

Laplacian of full color image by computing the laplacian of each component image separately.

Вам также может понравиться