Unsharp Masking(USM) filtering to sharpen edge in Images using Image Processing Techniques

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
I=imread('lenna.JPG');

if length(size(I)) == 3
I=rgb2gray(I);
end

[row,col]=size(I);
J=zeros(row+4,col+4);
J(3:row+2,3:col+2) = I;

% I*H
K=edge(J,'canny');

% M = I - (I*H)
M = [];
for i=1:row+4
for j=1:col+4
M(i,j)= J(i,j) - K(i,j);
end
end

% I' = I + alpha*M
N = [];
for i=1:row+4
for j=1:col+4
N(i,j)= J(i,j) + (0.7)*M(i,j);
end
end

J=uint8(J);
N=uint8(N);

subplot(1,2,1);imshow(J);
subplot(1,2,2);imshow(N);


facebook,youtube,download,movies,google,streaming

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s