Selasa, 17 November 2009

Program Histogram Menggunakan Matlab

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, dan Canny. Yang penting diperhatikan pada deteksi tepi bahwa hanya dapat dilakukan menggunakan citra grayscale atau citra 2-D.

Contoh penggunaan metode deteksi tepi :
>> I=im2bw(imread('x_ray2.JPG'));
>> bw1=edge(I,'sobel');
>> bw2=edge(I,'canny');
>> bw3=edge(I,'prewitt');
>> bw4=edge(I,'log');
>> bw5=edge(I,'robert');
>> imshow(I),title('awal)
??? imshow(I),title('awal)
|
Error: Missing variable or function.

>> imshow(I),title('awal')
Warning: Image is too big to fit on screen; displaying at 56% scale.
> In truesize>Resize1 at 308
In truesize at 44
In imshow at 161
>> figure,imshow(bw1),title('sobel)
??? figure,imshow(bw1),title('sobel)
|
Error: Missing variable or function.

>> figure,imshow(bw1),title('sobel')
Warning: Image is too big to fit on screen; displaying at 56% scale.
> In truesize>Resize1 at 308
In truesize at 44
In imshow at 161
>> figure,imshow(bw2),title('canny')
Warning: Image is too big to fit on screen; displaying at 56% scale.
> In truesize>Resize1 at 308
In truesize at 44
In imshow at 161
>> figure,imshow(bw3),title('prewitt')
Warning: Image is too big to fit on screen; displaying at 56% scale.
> In truesize>Resize1 at 308
In truesize at 44
In imshow at 161
>> figure,imshow(bw4),title('log')
Warning: Image is too big to fit on screen; displaying at 56% scale.
> In truesize>Resize1 at 308
In truesize at 44
In imshow at 161
>> figure,imshow(bw5),title('robert')
Warning: Image is too big to fit on screen; displaying at 56% scale.
> In truesize>Resize1 at 308
In truesize at 44
In imshow at 161
>>



Gambar awal



Gambar metode Sobel



Gambar metode Canny



Gambar metode Prewitt



Gambar metode Log



Gambar metode Robert

Tidak ada komentar:

Posting Komentar

Thank's to visit my blog's