Kamis, 22 April 2010

Pengolahan Citra












Script :
>> i = imread('d:\x.jpg' );

>> gray = rgb2gray(i);

>> 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:\ps.jpg' );

>> imshow(i), title('Original Picture');



Blurred Picture :



>> PSF = fspecial('motion' ,13,45);

>> Blurred = imfilter(i,PSF, 'circ','conv' );

>> figure; imshow(Blurred) ; title('Blurred Picture');



Blurred an Noisy Image with Gaussian Methods :



>> PSF = fspecial('gaussian' , 10, 10);

>> Blurred = imfilter(i, PSF, 'symmetric', 'conv');

>> V = .002;

>> BlurredNoisy = imnoise(Blurred, 'gaussian', 0,V);

>> figure;imshow( BlurredNoisy) ; title('Blurred and Noisy Image');

Tidak ada komentar:

Posting Komentar