image enhancement and restoration. pixel operations

40
IMAGE ENHANCEMENT AND RESTORATION

Upload: brent-wheeler

Post on 17-Dec-2015

233 views

Category:

Documents


3 download

TRANSCRIPT

IMAGE ENHANCEMENT AND RESTORATION

Pixel operations

Pixel point operations

O(x,y) = M [ I(x,y) ]

Pixel operations• Linear

• negative• contrast enhancement (histogram sliding and stretching)

• Nonlinear• photometric correction• histogram equalization

Pseudocolor images

Group discussion• Why to use pseudocolor mapping?

Colorcorrection

Histogram equalization

Before (1)

After(2)

•Histogram Equalization is a form of Image Enhancement particularly useful when images suffer from poor contrast.

•The histograms of such images would have relatively narrow curves around a certain range of pixel values and not at the others.

•For instance, the contrast of the image in Figure 1 is poor because there are no pixels in the bright areas.

•After Histogram Equalization, it can be observed from the histogram in Figure 2 that with a better utilization of the entire range of pixel values [0-255], the quality of the image is significantly enhanced.

Histogram Equalisation:

Disadvantage of Applying Histogram Equalisation:

• As the name Histogram Equalization implies, this is a technique for obtaining a uniform histogram.

• The gray levels of the image subjected to histogram equalization always reach both extremities, 0 (black) and 255 (white).

• In other words, the process increases the dynamic range of the gray levels, consequently producing an increase in image contrast.

• This is not always suitable, as in this case, where increased visual graniness and "patchiness" are apparent in the output image.

Pixel point operationsmultiple image

O(x,y)=I1(x,y) # I 2(x,y)

• where # is arithmetic and logic operation as +, -, /, *, AND, OR, Exclusive-OR

1 Image Combining

2 Image Composition

1 Image Combining• Subtraction images

O(x,y) = I1(x,y) - I 2(x,y)

Image combining• infrared component image (1) show live vegetation as

bright object and dead vegetation as dark one• red component image (2) shows just the opposite• other objects mix perception, if just one spectrum is

used

Spectral rationing:O(x,y) = I1(x,y) / I 2(x,y)

Image combining• Temporal noise reduction

O(x,y) = (I1(x,y) + I 2(x,y)) / 2

O(x,y) = (I1(x,y) + I2(x,y) + …+ I n(x,y))/n

Eliminates noise

Equal to increasing the opening time of camera

Pixel group processing with convolution

• coefficient matrix 3*3 , 5*5 … (mask,kernel)a b c

d e f

g h I

O(x,y) = a*I(x-1,y-1)+b*I(x,y-1)+c*I(x+1,y-1)

+ d*I(x-1,y)+e*I(x,y)+f*I(x+1,y)

+ g*I(x-1,y+1)+h*I(x,y+1)+i*I(x+1,y+1)

More about convolution matrix:• http://docs.gimp.org/en/plug-in-convmatrix.html

Edge enhancement• Shift & difference, Prewitt gradient, Laplace• Sobel, Kirsch, Robinsson• Named according to the inventors of the specific

convolution, the mask varies.

Prewitt

Laplace

1 1 1

1 -2 -1

1 -1 -1

•directional edge enhancement

NorthWest:

-1 -1 -1

-1 8 -1

-1 -1 -1

Line segment enhancement• Line segment enhancement

clean up the edges after the edge enhancement operation

Example for horizontal line:-1 -1 -1

2 2 2

-1 -1 -1

Sobel edge enhancement• Horizontal and vertical mask

1 filter with horizontal mask

2 filter copy with vertical mask

3 add together

-1 0 1 -1 -2 -1

-2 0 2 0 0 0

-1 0 1 1 2 1

Vertical mask

Horizontal mask Result

Original

Median filter

Comparison between blurring and median filtering

Median filtering

Median filtering

Softening 3*3

Salt&Pepper -noise

Group discussion• What is the effect of enlargening the median filter window

to 5*5, 7*7 etc. ?

• How do you think the Dust and scratches –operation is done in Photoshop?