Kamis, 22 April 2010

Tugas Grafik dan Pengolahan Citra

Tampilan Gambar:

1. Sobel


2. Roberts


3. Prewitt



4. Original Picture



5. Canny


6. Blurr and Noisy


7. Blurr


Script:

>> i = imread('e:\plat.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('e:\lilis.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');