Kamis, 22 April 2010

Image Processing Menggunakan MATLAB 7.6..

>> A = imread('d:\tugas grafik\40.jpg');
>> gray = rgb2gray(A);
>> BW1 = edge(gray,'sobel');
>> BW2 = edge(gray,'canny');
>> BW3 = edge(gray,'prewitt');
>> BW4 = edge(gray,'roberts');

>> imshow(BW1),title('Sobel Methods');


>> figure, imshow(BW2), title('Canny Methods');


>> figure, imshow(BW3), title('Prewitt Methods');



>> figure, imshow(BW4), title('Roberts Methods');




Original Picture

>> i = imread('d:\tugas grafik\rino.jpg');
>> imshow(i), title('Original Picture');



Blurred Picture

>> PSF = fspecial('motion',45,80);
>> Blurred = imfilter(i,PSF,'circ','conv');
>> figure; imshow(Blurred); title('Blurred Picture');



Blurred an Noisy Image with Gaussian Methods

>> PSF = fspecial('gaussian', 25, 25);
>> Blurred = imfilter(i, PSF, 'symmetric', 'conv');
>> V = .002;
>> BlurredNoisy = imnoise(Blurred, 'gaussian', 0,V);
>> figure;imshow(BlurredNoisy); title('Blurred and Noisy Image');