basic ideas of image transforms are derived from those showed earlier

40
Basic ideas Basic ideas of of Image Transforms Image Transforms are derived from are derived from those showed those showed earlier earlier

Upload: aleesha-alyson-walters

Post on 05-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Basic ideas of Image Transforms are derived from those showed earlier

Basic ideasBasic ideas of Image of Image Transforms are Transforms are

derived from those derived from those showed earliershowed earlier

Page 2: Basic ideas of Image Transforms are derived from those showed earlier

Image TransformsImage Transforms• Fast Fourier

– 2-D Discrete Fourier Transform

• Fast Cosine– 2-D Discrete Cosine Transform

• Radon Transform• Slant• Walsh, Hadamard, Paley, Karczmarz• Haar• Chrestenson• Reed-Muller

Page 3: Basic ideas of Image Transforms are derived from those showed earlier

Methods for Digital Image ProcessingMethods for Digital Image Processing

G ray-level Histogram

Spatial

DFT DCT

Spectral

Digital Im age Characteristics

Point Processing M asking Filtering

Enhancem ent

Degradation M odels Inverse Filtering W iener Filtering

Restoration

Pre-Processing

Inform ation Theory

LZW (gif)

Lossless

T ransform -based (jpeg)

Lossy

Com pression

Edge Detection

Segm entation

Shape Descriptors T exture M orphology

Description

Digital Im age Processing

Page 4: Basic ideas of Image Transforms are derived from those showed earlier

Spatial FrequencySpatial Frequencyoror

Fourier TransformFourier Transform

Jean Baptiste Joseph FourierFourier face in Fourier Transform Domain

Page 5: Basic ideas of Image Transforms are derived from those showed earlier

Examples of Examples of Fourier 2D Fourier 2D

Image Image TransformTransform

Page 6: Basic ideas of Image Transforms are derived from those showed earlier

Fourier 2D Image Fourier 2D Image TransformTransform

Page 7: Basic ideas of Image Transforms are derived from those showed earlier

Another formula for Two-Dimensional Another formula for Two-Dimensional FourierFourier

A cos(x2i/N) B cos(y2j/M)fx = u = i/N, fy = v =j/M

Image is function of x and y

Now we need two cosinusoids for each point, one for x and one for y

Lines in the figure correspond to real value 1

Now we have waves in two directions and they have frequencies and amplitudes

Page 8: Basic ideas of Image Transforms are derived from those showed earlier

Fourier Transform of a Fourier Transform of a spotspot

Original image Fourier Transform

Page 9: Basic ideas of Image Transforms are derived from those showed earlier

Transform Results

image

spectrum

transform

Page 10: Basic ideas of Image Transforms are derived from those showed earlier

Two Dimensional Fast Fourier in Two Dimensional Fast Fourier in MatlabMatlab

Page 11: Basic ideas of Image Transforms are derived from those showed earlier

Filtering in Filtering in Frequency Frequency

DomainDomain

… will be covered in a separate lecture on spectral approaches…..

Page 12: Basic ideas of Image Transforms are derived from those showed earlier

•H(u,v) for various values of u and v

•These are standard trivial functions to compose the image from

Page 13: Basic ideas of Image Transforms are derived from those showed earlier
Page 14: Basic ideas of Image Transforms are derived from those showed earlier

< < image

..and its spectrum

Page 15: Basic ideas of Image Transforms are derived from those showed earlier

Image and its spectrum

Page 16: Basic ideas of Image Transforms are derived from those showed earlier

Image and its spectrum

Page 17: Basic ideas of Image Transforms are derived from those showed earlier

Image and its spectrum

Page 18: Basic ideas of Image Transforms are derived from those showed earlier

Let g(u,v) be the kernelLet h(u,v) be the imageG(k,l) = DFT[g(u,v)]H(k,l) = DFT[h(u,v)]

Then DFT 1 G H g h

where means multiplicationand means convolution.

This means that an image can be filtered in the Spatial Domain or the Frequency Domain.

Convolution TheoremConvolution Theorem

This is a very important result

Page 19: Basic ideas of Image Transforms are derived from those showed earlier

Let g(u,v) be the kernelLet h(u,v) be the imageG(k,l) = DFT[g(u,v)]H(k,l) = DFT[h(u,v)]

Then

DFT 1 G H g h

where means multiplicationand means convolution.

Convolution TheoremConvolution Theorem

Instead of doing convolution in spatial domain we can do multiplication

In frequency domain

Convolution in spatial domain

Multiplication in spectral domain

Page 20: Basic ideas of Image Transforms are derived from those showed earlier

v

u

Image

Spectrum Noise and its spectrum

Noise filtering

Page 21: Basic ideas of Image Transforms are derived from those showed earlier

Image

v

u

Spectrum

Page 22: Basic ideas of Image Transforms are derived from those showed earlier

Image x(u,v)

v

u

Spectrum log(X(k,l))

l

k

Page 23: Basic ideas of Image Transforms are derived from those showed earlier

Spectrum log(X(k,l))

k

lv

u

Image x(u,v)

Image of cow with noise

Page 24: Basic ideas of Image Transforms are derived from those showed earlier

white noise white noise spectrum

kernel spectrum (low pass filter)

red noise red noise spectrum

Page 25: Basic ideas of Image Transforms are derived from those showed earlier

Filtering is done in spectral domain. Can be very complicated

Page 26: Basic ideas of Image Transforms are derived from those showed earlier

Discrete Cosine Transform Discrete Cosine Transform (DCT)(DCT)

•Used in JPEG and Used in JPEG and MPEGMPEG

•Another Frequency Another Frequency Transform, with Transform, with Different Set of Basis Different Set of Basis FunctionsFunctions

Page 27: Basic ideas of Image Transforms are derived from those showed earlier

Discrete Cosine Discrete Cosine Transform in MatlabTransform in Matlab

absolute

Two-dimensional Discrete Cosine Transform

trucks

Two dimensional spectrum of tracks. Nearly all information in left top corner

Page 28: Basic ideas of Image Transforms are derived from those showed earlier

““Statistical” FiltersStatistical” Filters

•Median Filter also eliminates noise•preserves edges better than blurring

•Sorts values in a region and finds the median

•region size and shape

•how define the median for color values?

Page 29: Basic ideas of Image Transforms are derived from those showed earlier

““Statistical” Filters Statistical” Filters ContinuedContinued

•Minimum Filter Minimum Filter (Thinning)(Thinning)

•Maximum Filter Maximum Filter (Growing)(Growing)

•““Pixellate” FunctionsPixellate” FunctionsNow we can do this quickly in spectral domain

Page 30: Basic ideas of Image Transforms are derived from those showed earlier

•ThinninThinningg

•GrowinGrowingg

thinning growing

Page 31: Basic ideas of Image Transforms are derived from those showed earlier

Pixellate ExamplesPixellate Examples

Original image

Noise added

After pixellate

Page 32: Basic ideas of Image Transforms are derived from those showed earlier

DCT used in compression and DCT used in compression and recognitionrecognition

Fringe Pattern

DCT

DCT Coefficients

Zonal Mask

1 2

3

4

5

1 2 3 4 5

(1,1)(1,2)(2,1)(2,2)

.

.

.

FeatureVector

ArtificialNeuralNetwork

Can be used for face recognition, tell my story from Japan.

Page 33: Basic ideas of Image Transforms are derived from those showed earlier

Noise RemovalNoise Removal

Image with Noise Transform been removed

Transforms for Noise RemovalTransforms for Noise Removal

Image reconstructed as the noise has been removed

Page 34: Basic ideas of Image Transforms are derived from those showed earlier

Image Segmentation Recall: Image Segmentation Recall: Edge DetectionEdge Detection

f(x,y) Gradient Mask

fe(x,y)

-1 -2 -10 0 01 2 1

-1 0 1-2 0 2-1 0 1

Now we do this in spectral domain!!

Page 35: Basic ideas of Image Transforms are derived from those showed earlier

Image MomentsImage Moments2-D continuous function f(x,y), the moment of order (p+q) is:

....2 ,1 ,0,

),(

qp

dydxyxfyxm qppq

Central moment of order (p+q) is:

00

01

00

10 ;

where

),()()(

m

my

m

mx

dydxyxfyyxx qppq

Moments were found by convolutions

Page 36: Basic ideas of Image Transforms are derived from those showed earlier

Image Moments (contd.)Image Moments (contd.)

Normalized central moment of order (p+q) is:

,.....3 ,2,for

;12

where

;00

qp

qp

pqpq

A set of seven invariant moments can be derived from pq

Now we do this in spectral domain!!

convolutions are now done in spectral domain

Page 37: Basic ideas of Image Transforms are derived from those showed earlier

Image TexturesImage Textures

The USC-SIPI Image Databasehttp://sipi.usc.edu/

Grass Sand Brick wall

Now we do texture analysis like this in spectral domain!!

Page 38: Basic ideas of Image Transforms are derived from those showed earlier

ProblemsProblems• There is a lot of Fourier and Cosine Transform

software on the web, find one and apply it to remove some kind of noise from robot images from FAB building.

• Read about Walsh transform and think what kind of advantages it may have over Fourier

• Read about Haar and Reed-Muller transform and implement them. Experiment

Page 39: Basic ideas of Image Transforms are derived from those showed earlier

SourcesSources• Howard Schultz, Umass

• Herculano De Biasi• Shreekanth Mandayam• ECE Department, Rowan University• http://engineering.rowan.edu/~shreek/fall01/dip/

http://engineering.rowan.edu/~shreek/fall01/dip/lab4.html

Page 40: Basic ideas of Image Transforms are derived from those showed earlier

Image CompressionImage CompressionPlease visit the website

http://www.cs.sfu.ca/CourseCentral/365/li/material/notes/Chap4/Chap4.html