Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
\
|
+
=
N
vy
M
ux
j
M
u
N
v
e v u f y x F
t 2
1
0
1
0
* , ,
Where, x=0,1,2,3..(M-1)
y=0,1,2,3..(N-1)
The variables u and v represents transform or frequency variables and x and y
represents spatial coordinates.
( ) ( )
|
.
|
\
|
+
=
N
vy
M
ux
j
M
x
N
y
e y x f v u F
t 2
1
0
1
0
* , ,
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 20
PROGRAM:
clc
clear all
close all
a=zeros(30,30);
a(5:24,13:17)=1;
subplot(2,2,1),imshow(a)
title('original image')
b=fft2(a);
subplot(2,2,2),imshow(b)
title('Fourier transformed image')
c=ifft2(b);
subplot(2,2,3),imagesc(c)
title('inverse fourier transformed image')
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 21
RESULT:
CONCLUSION: Fourier transform on digital image is implemented by using
MATLAB.
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 22
HADAMARD TRANSFORM
AIM: To implement Hadamard Transform on digital image by using MATLAB.
THEORY:
Hadamard transform depends upon the hadamard matrix. The matrix,
which consists of square array of plus and minus ones rows and columns is said
to be hadamard matrix. The columns and rows in hadamard matrix are orthogonal
.
The hadamard matrix of size N is given by
Hadamard matrix divided by 2 is called the sequence of the row. It is possible to
construct a Hadamard matrix of order N=2
n
whose number of sign changes per row
increases from 0 to N-1.
Where, v= Transformed Image
U= inverse Transform
(
=
N N
N N
N
H H
H H
H
2
HvH u
HuH v
=
=
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 23
PROGRAM:
clc
clear all
close all
a=8;
n=2^a;
m=hadamard(n)
b=imread('cameraman.tif');
subplot(2,2,1),imshow(b)
title('original image')
c = double(b) + 1;
d=m*c*m;
subplot(2,2,2),imshow(d)
title('hadamard tranformed image')
x=m*d*m;
subplot(2,2,3),imagesc(x)
title('inverse hadamard transformed image')
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 24
RESULT:
CONCLUSION: Hadamard Transform on digital image is implemented by using
MATLAB.
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 25
ENHANCEMENT TECHNIQUE IN SPATIAL FREQUENCY DOMAIN
AIM: To implement enhancement technique in spatial frequency domain by using
MATLAB.
THEORY:
Gray level transformation is the transformation using which powerful
processing approaches can be formulated. Because enhancement at any point
depends only on the gray level at that point, techniques in this category are often
referred to a point processing techniques.
The main objective of image enhancement is to improve the quality of an
image event if no prior model of the degradation is available. This can be achieved
by increasing the dominance of some features or by decreasing the ambiguity
between different regions of the image.
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 26
PROGRAM:
clc
clear all
close all
a=imread('cameraman.tif');
h = fspecial('motion',50,0);
i = imfilter(a,h,'circular','conv');
w2=deconvwnr(i,h);
subplot(2,2,1),imshow(a)
title('Original image')
subplot(2,2,2),imshow(i)
title('Blurred image')
subplot(2,2,3),imshow(w2)
title('Deblurred image')
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 27
RESULT:
CONCLUSION: Enhancement technique in spatial frequency domain is
implemented by using MATLAB.
Exp No: Date:
Sri Mittapalli College of Engineering, Guntur Page 28
POINT, LINE AND EDGE DETECTION TECHNIQUES USING DERIVATIVE OPERATIONS
AIM: To implement point, line and edge detection techniques using derivative
operations by using MATLAB.
THEORY:
Consider an analog f(x) which represents a typical 1-D edge it is reasonable
to consider the value x0 as edge point. One way to determine x0 is to find f(x) or
f(x). The value of x0 can be found by looking at the max or min of f(x) or by
looking at the zero crossing of f(x) where f(x) changes its sign. The additional to
determining x0 (the edge point). F(x) can also be used in estimating the strength
and direction of the edge. If ( ) x f ' is large => f(x) is changing very rapidly and a
rapid change in intensity is indicated. If f(x) is positive => f(x) is increasing. If all
values of x such that ( ) x f ' is greater than a certain threshold are detected to be
edges, an edge will appear as a line rather than a point. To avoid this problem we
further require ( ) x f ' having a local maximum at the edge points. The informing
about direction of edge is contained in f(x) at x=xo (either positive or negative). The
choice of threshold depends on its application. It is possible to choose the threshold
adaptively.
The generalization of f(x) to 2-Dimensional function f(x,y) is the gradient
( ) y x f , V given by
( )
( ) ( )
y x
L
y
y x f
L
x
y x f
y x f
,
,
,
c
c
+
c
c
= V
Where,
x
L
and
y
L