Listing Program:
clear all
I=imread('C:\MATLAB6p5\work\Maki.jpg','jpg');
figure(1),imshow(I);
%[N,M]=size(I);
%for i=1:N-1
% for j=1:M-1
% Gx(i,j)=I(i,j)-I(i,j+1);
% Gy(i,j)=I(i,j)-I(i+1,j);
%G(i,j)=abs(Gx(i,j))+ abs(Gy(i,j));
%end
%end
%figure(8),imshow(G);
Gx=[1 -1
0 0];
Gy=[1 0
0 -1];
G1=conv2(I,Gx);
G2=conv2(I,Gy);
figure(8),imshow(G1);
figure(9),imshow(G2);
G=abs(G1)+abs(G2);
figure(10),imshow(uint8(G));
Pic Asli:
Output:
1 comment:
Horikita Maki Kawaii banget deh...Akakaka..
Post a Comment