Popular posts

Total Tayangan Laman

Dejavu.corp. Diberdayakan oleh Blogger.

SMS GRATIS

Adsense Indonesia
On Senin, 14 November 2011

Deteksi Tepi
Gambar yang diseleksi:
fishnew3
Seleksi objek biasanya selanjutnya dilakukan langkah deteksi tepi dalam proses pengolahan citra, di MATLAB proses pendeteksian tepi dilakukan dengan perintah
/fungsi edge. Ada beberapa metode yang dapat dilakukan pada deteksi tepi menggunakana MATLAB yaitu metode sobel, prewitt, roberts, laplacian of Gaussian.
Yang penting diperhatikan pada deteksi tepi bahwa hanya dapat dilakukan menggunakan citra grayscale atau citra 2-D.
Contoh hasil penggunaan metode deteksi tepi:
11
Listing program
clear all;
l=imread(’fish.jpg’);
l1=rgb2gray(l);
l2=fft(double(l1));
l2_1=fft(double(l));
figure(1)
clf(subplot(3,2,1),imshow(l));
title(’Original image’);
hold on;
subplot(3,2,2),imshow(l1);
title(’Gray scale image ‘);
% creat filter matrix(3×3 window)
h=fspecial(’prewitt’);
l_pre=uint8(round(filter2(h,l1)));
l_pre_1=fft(double(l_pre));
subplot(3,2,3),imshow(l_pre)
title(’Prewitt filtered image’);
% creat filter matrix(3×3 window)
h=fspecial(’sobel’);
l_sobel=uint8(round(filter2(h,l1)));
l_sobel_1=fft(double(l_sobel));
subplot(3,2,4),imshow(l_sobel)
title(’Sobel filtered image’);
h=fspecial(’log’,5);
l_log=uint8(round(filter2(h,l1)));
l_log_1=fft(double(l_log));
subplot(3,2,5),imshow(l_log)
title(’5×5 Laplacian of Guassian Filtered Image’);
h=fspecial(’log’,3);
l_log3=uint8(round(filter2(h,l1)));
l_log3_1=fft(double(l_log3));
subplot(3,2,6),imshow(l_log3)
title(’3×3 Laplacian of Guassian Filtered Image’);
%suitable images are TIFF images ,png,jpgonly bmp is not suitable.
figure(2)
subplot(3,2,1),imshow(l2);
subplot(3,2,2),imshow(l2);
subplot(3,2,3),imshow(l_pre_1);
subplot(3,2,4),imshow(l_sobel_1);
subplot(3,2,5),imshow(l_log_1);
subplot(3,2,6),imshow(l_log3_1);
*sumber mathwork

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Search Box

dfggfgf