lecture eight matlab for spatial filtering and intro to dfts figures from gonzalez and woods,...

Post on 04-Jan-2016

218 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lecture Eight

Matlab for spatial filtering and intro to DFTsFigures from Gonzalez and Woods, Digital Image Processing, Copyright 2002, Gonzalez,

Woods, and Eddins, Digital Image Processing with MATLAB, Copyright, 2004, and

Jahne, Digital Image Processing, 4th Edition, Copyright, 1997

Imadjust

g=imadjust(f,[low_in,high_in],[low_out,high_out],gamma)

Includes various contract transformations.

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Logarithmic and Constrast Transformations

g=c*log(1+double(f))

gs=im2uint8(mat2gray(g)); % to range [0,1] and to gray scale

Contrast transformation

g=1./(1+(m./(double(f)+eps)).^E)

Use of eps prevents overflow if f has any zero values

m is turning point

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Stem and plot

Find out syntax from typing help stem and help plot in MATLAB.

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Histeq command

g=histeq(f,hspec)

hspec is a specified histogram.

If you do

g=histeq(f,256) you get histogram equalization.

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chosen Histgram

small one large, one peaks,Gaussian edconcentrat Two

05.0 ,75.0 ,15.0 ,07.0a ,1a

chosen Values

)2/)(exp(2

)2/)(exp(2

)(

212121

222

2

2211

1

1

kza

za

zp

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Spatial Filters

g=imfilter(f,w,mode,bndry,size)

Mode= ‘corr’ correlation—standard

‘conv’ convolution, w rotated

180 degrees

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Chapter 3Intensity Transformations

and Spatial Filtering

Fourier Transforms

Based on notion Fourier introduced to Heat transfer that any periodic function can be written as a possibly infinite sum of sines and cosines. Important in

• Differential equations• Probability and statistics (characteristic functions, proof

of central limit theorem)• Almost any area of engineering you can name.

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Chapter 4Image Enhancement in the

Frequency Domain

Fourier Spectrum and Phase

Two images

• Mix up phase and amplitude

Two pictures from another text

Mix up amplitude and phase

Amplitude from 1, phase from 2, amplitude from 2, phase from one.

top related