PPT Image Analysis

33
Image Analysis Using Wavelet Transformation By : Nidhi Gopal B.Tech (ECE)- M.Tech (VLSI) Presenting ON :-

Transcript of PPT Image Analysis

Page 1: PPT Image Analysis

Image Analysis Using

Wavelet Transformation

By : Nidhi Gopal

B.Tech (ECE)- M.Tech (VLSI)

Presenting ON :-

Page 2: PPT Image Analysis

Digital image processing : a Brief Overview

Image processing involves a set of computational techniques for analyzing, enhancing, compressing, and reconstructing images.

This is a wide field of processing images in a digital form.

Terminologies used generally:•Image segmentation : Extracting information for set of segments/pixels.•Image enhancement and restoration : Reconstruction from degraded image.• Image sharpening and smoothening : Edge and corner detection.• Grey scale Transformation : Deals with contrast transformation, or, setting up the grey level values i.e. RGB values.

Page 3: PPT Image Analysis

Fig: Displaying the word “BASIC” in the form of pixels.

Image : A set of Pixels

Page 4: PPT Image Analysis

For defense (Army, Navy & Air force) purposes, Image compression is of basic necessity, as-

1.Security : It does not allow the other party, to copy, or to steal information from the opposite one, through secure data transmission.

2.Small target detection.3.Tracking missiles, Vehicle navigation.4.Automatic Target Recognition.. etc

Page 5: PPT Image Analysis

About Fourier Analysis

)sin()cos(2

1)(

110 x

T

nbx

T

naaxf

mm

mm

An infinite series of sine and cosine functions. It is an explanation for the periodic series. Used in various fields like, optics, electrical engineering, quantum mechanics, image processing etc. Fourier transform, obtained by Fourier series, though, has many disadvantages.. …….

Page 6: PPT Image Analysis

Fourier Transform

Localized in frequency(gives

information according to frequencies only)

Analysis of periodic signals is

possible

Not efficient for Continuous & moving signals

Sinusoids of infinite energy

Wavelet Transform

Localized in time and frequency

both

Analysis of non-periodic signals are also possible

Efficient for continuous &

moving signals

Waves of finite energy

Page 7: PPT Image Analysis

Another Approach : STFT (Short Term Fourier Transform) or Windowing

Time/Frequency localization depends on window size.

Once particular window size is chosen, it will be the same for all frequencies.

Many signals require a more flexible approach - vary the window size to determine more accurately either time or frequency.

Page 8: PPT Image Analysis

Comparison of the three: time-frequency graph

FOURIER TRANSFOR

M

WAVELET TRANSFORM

STFT

Page 9: PPT Image Analysis

Overcomes the preset resolution problem of the STFT by using a variable length window:▫Use narrower windows at high frequencies

for better time resolution.▫Use wider windows at low frequencies for

better frequency resolution.

Resolution Analysis :

Wide windows do not provide good localization at high frequencies.

Page 10: PPT Image Analysis

Solution :

Use narrower windows at high frequencies.

Page 11: PPT Image Analysis

Narrow windows do not provide good localization at low frequencies.

Page 12: PPT Image Analysis

Use wider windows at low frequencies.

Solution:

Page 13: PPT Image Analysis

Introduction to wavelet analysis

What are Wavelets? Wavelets are

functions that “wave” above and below the x-axis, have

(1) varying frequency, (2) limited duration,

and (3) an average value

of zero.

This is in contrast to sinusoids, used by FT, which have infinite energy.

Sinusoid Wave

Page 14: PPT Image Analysis

Example - Haar Wavelets (cont’d)

Start by averaging the pixels together (pairwise) to get a new lower resolution image:

To recover the original four pixels from the two averaged pixels, store some detail coefficients.

Page 15: PPT Image Analysis

Example - Haar Wavelets (cont’d)

Repeating this process on the averages gives the full decomposition:

Page 16: PPT Image Analysis

Example - Haar Wavelets (cont’d)

The Harr decomposition of the original four-pixel image is:

We can reconstruct the original image to a resolution by adding or subtracting the detail coefficients from the lower-resolution versions.

2 1 -1

Page 17: PPT Image Analysis

Wavelet expansion

•Efficient wavelet decompositions involves a pair of waveforms (mother wavelets):

•The two shapes are translated and scaled to produce wavelets (wavelet basis) at different locations and on different scales.

φ(t) ψ(t)

φ(t-k) ψ(2jt-k)

encode lowresolution info

encode details orhigh resolution info

Page 18: PPT Image Analysis

Wavelet expansion (cont’d) f(t) is written as a linear combination of

φ(t-k) and ψ(2jt-k) :

Note: in Fourier analysis, there are only two possible values of k ( i.e., 0 and π/2); the values j correspond to different scales (i.e., frequencies).

( ) ( ) (2 )jk jk

k k j

f t c t k d t k

scaling function wavelet function

Page 19: PPT Image Analysis

Wavelet families

Figure : Wavelet families (a) Haar (b) Daubechies (c) Coiflet1 (d) Symlet2 (e) Meyer (f) Morlet (g) Mexican Hat.

Page 20: PPT Image Analysis

1D Haar Wavelets

•Haar scaling and wavelet functions:

computes average computes details

φ(t) ψ(t)

Page 21: PPT Image Analysis

Haar wavelet transform & its functions

•Mother scaling function:

• Father Scaling Function :

Page 22: PPT Image Analysis

Example - Haar basis (revisited)

Page 23: PPT Image Analysis

[9 7 3 5]

low-pass,down-sampling

high-pass, down-sampling

(9+7)/2 (3+5)/2 (9-7)/2 (3-5)/2

Page 24: PPT Image Analysis

Filter banks (analysis)

Page 25: PPT Image Analysis

[9 7 3 5]

high-pass, down-sampling

low-pass,down-sampling

(8+4)/2 (8-4)/2

V1 basis functions

Page 26: PPT Image Analysis

Convention for illustrating 1D Haar wavelet decompositionx x x x x x … x x

detail

average

re-arrange:

re-arrange:

Page 27: PPT Image Analysis

MATLAB Codes for wavelet analysis• clear all;• %close all;• clc;• x=imread('test.jpg');• imshow(x)• • [xar,xhr,xvr,xdr] = dwt2(x(:,:,1),'haar');• [xag,xhg,xvg,xdg] = dwt2(x(:,:,2),'haar');• [xab,xhb,xvb,xdb] = dwt2(x(:,:,3),'haar');• • xa(:,:,1)=xar; xa(:,:,2)= xag; xa(:,:,3)=xab ;• xh(:,:,1)=xhr; xh(:,:,2)= xhg; xh(:,:,3)=xhb ;• xv(:,:,1)=xvr; xv(:,:,2)= xvg; xv(:,:,3)=xvb ;• xd(:,:,1)=xdr; xd(:,:,2)= xdg; xd(:,:,3)=xdb ;• • x1 = [xa*0.003 log10(xv)*0.3 ;log10(xh)*0.3 log10(xd)*0.3];• figure();• imshow(x1)•

Page 28: PPT Image Analysis

• [xaar,xhhr,xvvr,xddr] = dwt2(xa(:,:,1),'haar');• [xaag,xhhg,xvvg,xddg] = dwt2(xa(:,:,2),'haar');• [xaab,xhhb,xvvb,xddb] = dwt2(xa(:,:,3),'haar');• • xaa(:,:,1)=xaar; xaa(:,:,2)= xaag; xaa(:,:,3)=xaab ;• xhh(:,:,1)=xhhr; xhh(:,:,2)= xhhg; xhh(:,:,3)=xhhb ;• xvv(:,:,1)=xvvr; xvv(:,:,2)= xvvg; xvv(:,:,3)=xvvb ;• xdd(:,:,1)=xddr; xdd(:,:,2)= xddg; xdd(:,:,3)=xddb ;• • • x11 = [xaa*0.001 log10(xvv)*0.3 ;log10(xhh)*0.3

log10(xdd)*0.3];• figure();• imshow(x11)• • [r,c,s] =size(xv);• figure();• imshow( [x11(1:r,1:c,:) xv*0.05 ; xh*0.05 xd*0.05])•  •  

Page 29: PPT Image Analysis

Output :

ORIGINAL IMAGE IN .JPG

Page 30: PPT Image Analysis

LEVEL ONE DECOMPOSITION

Page 31: PPT Image Analysis

LEVEL TWO DECOMPOSITION

Page 32: PPT Image Analysis

• The algorithm used in programming was transferred into an FPGA chip, and then to the computers. Further, the scaling and translating coefficients (instead of whole image) were sent to the receiving end, then, by inverse wavelet transformation, the original image was reconstructed. Consequently, this helped in feature extraction and de-noising of image.

CONCLUSION

Page 33: PPT Image Analysis

Any Queries ??