basic ideas of image transforms are derived from those showed earlier
TRANSCRIPT
Basic ideasBasic ideas of Image of Image Transforms are Transforms are
derived from those derived from those showed earliershowed 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
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
Spatial FrequencySpatial Frequencyoror
Fourier TransformFourier Transform
Jean Baptiste Joseph FourierFourier face in Fourier Transform Domain
Examples of Examples of Fourier 2D Fourier 2D
Image Image TransformTransform
Fourier 2D Image Fourier 2D Image TransformTransform
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
Fourier Transform of a Fourier Transform of a spotspot
Original image Fourier Transform
Transform Results
image
spectrum
transform
Two Dimensional Fast Fourier in Two Dimensional Fast Fourier in MatlabMatlab
Filtering in Filtering in Frequency Frequency
DomainDomain
… will be covered in a separate lecture on spectral approaches…..
•H(u,v) for various values of u and v
•These are standard trivial functions to compose the image from
< < image
..and its spectrum
Image and its spectrum
Image and its spectrum
Image and its spectrum
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
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
v
u
Image
Spectrum Noise and its spectrum
Noise filtering
Image
v
u
Spectrum
Image x(u,v)
v
u
Spectrum log(X(k,l))
l
k
Spectrum log(X(k,l))
k
lv
u
Image x(u,v)
Image of cow with noise
white noise white noise spectrum
kernel spectrum (low pass filter)
red noise red noise spectrum
Filtering is done in spectral domain. Can be very complicated
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
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
““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?
““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
•ThinninThinningg
•GrowinGrowingg
thinning growing
Pixellate ExamplesPixellate Examples
Original image
Noise added
After pixellate
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.
Noise RemovalNoise Removal
Image with Noise Transform been removed
Transforms for Noise RemovalTransforms for Noise Removal
Image reconstructed as the noise has been removed
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!!
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
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
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!!
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
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
Image CompressionImage CompressionPlease visit the website
http://www.cs.sfu.ca/CourseCentral/365/li/material/notes/Chap4/Chap4.html