37
Introduction Fundamentals Image Enhancement Techniques Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES Jisa David & Seena Symon M.Tech. Signal Processing Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEME

Spatial Operations

Embed Size (px)

Citation preview

Page 1: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Speech and Image Processing LabIMAGE ENHANCEMENT TECHNIQUES

Jisa David & Seena SymonM.Tech. Signal Processing

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 2: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

INTRODUCTION

DIGITAL IMAGE & IMAGE PROCESSING

Image:2D function f(x,y) where x and y are spatial coordinatesand f is the intensity.Digital image :Representation of a 2D image as a finite set ofdigital values( pixels).Digital Image Processing:Processing a digital image by meansof a digital computer.

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 3: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

FUNDAMENTALS

STEPS IN IMAGE PROCESSING1 Image Aquisition2 Image Enhancement3 Image Restoration4 Morphological processing5 Segmentation6 Representation and Description7 Recognition

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 4: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

IMAGE ENHANCEMENT TECHNIQUES

IMAGE ENHANCEMENTProcessing of an image so that the result is more suitable than orignalimage for Specific Application.

Done in Two domain

1 Spatial Domian2 Frequency Domain

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 5: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL DOMAIN

Gray Level TransformationImage NegativesLog TransformationsPower-Law transformationPiecewise Linear Transformation

Contrast StretchingGray Level SlicingBit Plane Slicing

Spatial FilteringNeighborhood AveragingMedian Filtering

Histogram processing

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 6: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL DOMAIN

GRAY LEVEL TRANSFORMATION

Operated on individual pixels intensity values: s = T(r). r:original intensity, s: new intensity

Data independent pixel-based enhancement method.

Approaches1 Image negatives

2 Log transform

3 Power law transform

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 7: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

GRAY LEVEL TRANSFORMATION

IMAGE NEGATIVEFunction reverses the order from black to white so that theintensity of the output image decreases as the intensity of theinput increases.s= T(r) = L-1-rUsed mainly in medical images and to produce slides of the screen

Figure: (a)Original mammogram ,(b)Negative image

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 8: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

GRAY LEVEL TRANSFORMATION

LOG GRAY LEVEL TRANSFORM

s = T(r) = c log(1+r)expand dark value to enhance details of darkarea.Example:Fourier 2D Transform.

Figure: (a)Fourier Spectrum ,(b)Transformed image with c=1

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 9: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

GRAY LEVEL TRANSFORMATION

POWER LAW GRAY-LEVEL TRANSFORM

s = T(r) = crγ

Gamma correction: To compensate the built-in power lawcompression due to display characteristics. CRT intensity tovoltage response is a power function with γ=1.8-2.5.

Figure: (A)Original Image, (B)Response of monitor to A (C)GammaCorrected Image,(D)Response of monitor to C

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 10: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

GRAY LEVEL TRANSFORMATION

Figure: a) log transformation b)power-law transformation

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 11: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

GRAY LEVEL TRANSFORMATION

PIECE-WISE LINEAR GRAY-LEVEL TRANSFORM

Allow more control on the complexity of T(r)Examples

Contrast stretching

Gray-level slicing

Bit-plane slicing

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 12: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

PIECE-WISE LINEAR GRAY-LEVEL TRANSFORM

CONTRAST STRETCHINGTo increase the dynamic range of the gray levels in the imagebeing processed.The locations of (r1,s1) and (r2,s2) control the shape of thetransformation function.

If r1= s1 and r2= s2 the transformation is a linear function andproduces no changes.If r1=r2, s1=0 and s2=L-1, the transformation becomes athresholding function that creates a binary image.

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 13: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

PIECE-WISE LINEAR GRAY-LEVEL TRANSFORM

CONTRAST STRETCHING

Figure: (A)Transformation function,(B) A low Contrast Image,(C)Result ofContrast Stretching,(D)Result of Thresholding

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 14: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

PIECE-WISE LINEAR GRAY-LEVEL TRANSFORM

GRAY LEVEL SLICING1 To highlight a specific range of gray levels in an image (e.g. to

enhance certain features).2 The second approach is to brighten the desired range of gray

levels but preserve the background and gray-level tonalities in theimage

Figure: (a)Transformation function of (1),(b)Transformation function of (2)

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 15: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

PIECE-WISE LINEAR GRAY-LEVEL TRANSFORM

Figure: a) original image b)Transformed image

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 16: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

PIECE-WISE LINEAR GRAY-LEVEL TRANSFORM

BIT PLANE SLICINGTo highlight the contribution made to the total image appearanceby specific bits.

i.e. Assuming that each pixel is represented by 8 bits, the imageis composed of 8 1-bit planes.Plane 0 contains the least significant bit and plane 7 contains themost significant bit.

Application in image compression

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 17: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

PIECE-WISE LINEAR GRAY-LEVEL TRANSFORM

BIT PLANE SLICING

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 18: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

Use of spatial masks for image processing (spatial filters)Linear and nonlinear filtersLow-pass filters eliminate or attenuate high frequencycomponents in the frequency domain (sharp image details), andresult in image blurring.The basic approach is to sum products between the maskcoefficients and the intensities of the pixels under the mask at aspecific location in the image.

R = W1Z1 + W2Z2 + ......... + W9Z9 (1)

(for 3x3 filter)

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 19: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

Figure: Mechanism of Spatial Filtering

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 20: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 21: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 22: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

NEIGHBORHOOD AVERAGINGReduce the noiseAveraging using M neighborhood PixelsAs M increases, the variability of the pixel values at each locationdecreases

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 23: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

NEIGHBORHOOD AVERAGING

Figure: (a)image, (b)Corrupted Image,(c)-(f) result of averaging with M=8,16,64,128

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 24: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

MEDIAN FILTERINGThe gray level of each pixel is replaced by the median of the graylevels in the neighborhood of that pixel (instead of by the averageas before).

Median filters are nonlinear.

Median filtering reduces noise without blurring edges and othersharp details.

Median filtering is particularly effective when the noise patternconsists of strong, spike-like components. (Salt-and-peppernoise.)

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 25: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

MEDIAN FILTERING

Figure: (a)Image correpted by Salt & Pepper Noise, (b)Noise reductionwith 3x3 averaging mask, (c)Noise reduction with 3x3 median filtering.

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 26: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

SPATIAL FILTERING

EDGE ENHANCEMENTdigital image processing filter that improves the apparentsharpness of an image or videoApplication in TV broad cast and DVD

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 27: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

HISTOGRAM PROCESSING

Data-dependent pixel-based image enhancement method.

The histogram of a digital image with gray levels from 0 to L-1 isa discrete function h(rk)=nk, where:

rk is the kth gray level

nk is the No: of pixels in the image with that gray level

n is the total number of pixels in the image

k = 0, 1, 2, , L-1

Normalized histogram: p(rk)=nk/n(an estimate of theprobability of occurrence of gray level rk)

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 28: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

HISTROGRAM PROCESSING

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 29: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FREQUENCY DOMAIN

FILTERING IN FREQUENCY DOMAIN

Compute Fourier transform of imageMultiply the result by a filter transfer function (or simply filter).Take the inverse transform to produce the enhanced image.

Figure: Basic Step for Filtering in the Frequency Domain

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 30: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FREQUENCY DOMAIN

ENHANCEMENT IN FREQUENCY DOMAIN

Types of enhancement that can be done:Lowpass filtering: Reduce the high-frequency content – blurringor smoothingHighpass filtering: increase the magnitude of high-frequencycomponents relative to low-frequency components – sharpening.

Figure: (a)Frequency response of Low pass fillter and (b)High pass filter

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 31: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FREQUENCY DOMAIN

BUTTERWORTH LOW PASS FILTERThis filter does not have a sharp discontinuity establishing a clearcutoff between passed and filtered frequencies

Transfer functiion

H(u, v) = 11+[D(u,v)/D0]2n

where D(u, v) = [(u−M/2)2 + (v −N/2)2]

where n -order of the filter,M-Number of rows,N -Number ofcolumns,D0-Cut off frequency

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 32: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FREQUENCY DOMAIN

Figure: a) original image b)Noisy image c)LPF imageJisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 33: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FREQUENCY DOMAIN

BUTTERWORTH HIGH PASS FILTEREdges and sharp transitions in grayvalues in an image contributesignificantly to high-frequency content of its Fourier transform.Image sharpening in the Frequency domain can be done byattenuating the low-frequency content of its Fourier transform.

Transfer functiion

H(u, v) = 11+[D0/D(u,v)]2n

where D(u, v) = [(u−M/2)2 + (v −N/2)2]

where n -order of the filter,M-Number of rows,N -Number ofcolumns,D0-Cut off frequency

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 34: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FREQUENCY DOMAIN

Figure: a)Original image b)HPF image

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 35: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FREQUENCY DOMAIN

BUTTERWORTH BAND PASS FILTERBand-boost filtering boosts certain midrange freqencies andpartially corrects for blurring, but does not boost the very high(most noise corrupted) frequencies.Obtained by cascading low pass and High pass filters.Transfer functiion

H(u, v) = 1(1+[D(u,v)/D1]2n)(1+[D0/D(u,v)]2n)

where D(u, v) = [(u−M/2)2 + (v −N/2)2]

where n -order of the filter,M-Number of rows,N -Number ofcolumns,D0- Lower Cut off frequency ,D1-Upper Cut offfrequency

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 36: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

FALSE COLORING

A false-color image is an image that depicts a subject in colorsthat differ from human perception of the same subject.A false-color image is derived from a greyscale image by mappingeach pixel value to a color according to a table or function.False-color images are frequently used for viewing satelliteimages, such as from weather satellites.

Figure: (a)Original Image, (b)False Color ImageJisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES

Page 37: Spatial Operations

IntroductionFundamentals

Image Enhancement Techniques

Spatial DomainFrequency Domain

REFERENCE

Rafael C. Gonzalez, richard E. Woods,Digital ImageProcessing,Pearson Education.Anil K. Jain, Fundamentals of Digital Image Processing,PrenticeHallRafael C. Gonzalez, richard E. Woods,Digital Image Processingusing MATLAB,Pearson Education.www.wikipedia.org

Jisa David & Seena Symon M.Tech. Signal Processing Speech and Image Processing Lab IMAGE ENHANCEMENT TECHNIQUES