Tugas Mata Kuliah Pengolahan Citra
Image Processing menggunakan MATLAB 7.6
Image Processing menggunakan MATLAB 7.6
Teknik Sobel Methods
>> A = imread('d:\tugas grafik\30.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');
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6drW7FOjA3DBvBtywHOrDywlR-ig_GeMGkvwj3pBewyxBH4aMMay0f43XDup8MPoJOWo6z3I3q60-aa4xQPQogFUdDytiM48TJTzbClsOL92yp0p4moLMyg-39okGwAHeHVTqUIImQgE/s320/sobel.jpg)
Teknik Canny Methods
>> figure, imshow(BW2), title('Canny Methods');![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFZl9pbjyiwbWrT4PBLtli2Og6V6PFbtrLbdE8YnreKg_di6Qvaok-VocrqNYv8AQERXXIzARYmZawqDEHVz9zo7YtcbdWxLFgcuba53LuJL6VLBquy28U6oH0RhoZewu9i_QJQaNb37s/s320/canny.jpg)
Teknik Prewitt Methods
>> figure, imshow(BW3), title('Prewitt Methods');
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSeIGMfmvt1sUH6q_f93BEXhy5VFwUvPXvf28WkoJxNmDB97S8XNpSpKPGNMWsPqlKa0y3UZjzeIeNjEcTpU_sHHBzHvzOhnP5whxQJLj8ShghTi2uCkHcyGAGMsKd4Na9Pmv4CHBgbyw/s320/prewitt.jpg)
Teknik Roberts Methods
>> figure, imshow(BW4), title('Roberts Methods');
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsN2KSWN4d2y8wQkGPbSeMM46uXPM7ijvzWfexTIHSNtxMiPFUMp6rUktbjmIT2tPNsNeFTG3N00rJeexTTZyH0l70ZCBC1HJfDNZSLv7bglD8lzKupd2xmkmw3THIG1KUwj424Cwaet4/s320/roberts.jpg)
Original Picture
>> i = imread('d:\tugas grafik\bay.jpg');
>> imshow(i), title('Original Picture');
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdvu9W7EA21nAhO3QyHqqlaInQsFg_WKefhisuboEcLoPGpHMX4K2qNViyXtleUYfjDRYZITR_h-uSgEOIySQUAW1zRwMJsw79ETQnf4dO2xYpsDrcasmjItXF8I6LpJ3n9lp_-sNvqzQ/s320/origin.jpg)
Blurred Picture
>> PSF = fspecial('motion',55,90);
>> Blurred = imfilter(i,PSF,'circ','conv');
>> figure; imshow(Blurred); title('Blurred Picture');
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho2raw7qF118G9B3kwqLTottcUsP9pweofgih96NtKY37Lbw_NvvIq7ZBqmya4E6aG2YW9Hm7j-jF-qqtMQu3SQKcN99pN5-_qEWMWylzSXGYuqbfq9QdNyAzZXyf8UYxQ0uiewSjo8pI/s400/blured.jpg)
Blurred an Noisy Image with Gaussian Methods
>> PSF = fspecial('gaussian', 20, 20);
>> Blurred = imfilter(i, PSF, 'symmetric', 'conv');
>> V = .002;
>> BlurredNoisy = imnoise(Blurred, 'gaussian', 0,V);
>> figure;imshow(BlurredNoisy); title('Blurred and Noisy Image');
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsDqUT0DYCEm0lOTD0viQbrNSdVX3TFrpYLSQzLZBfkMNHFDDkeIDJKfLLJNYK8OVS-vJaUoicIpRj1U3h6b0bh0x5u_r9dqx55j86o-HH2Z8K1CU0EX9JGaZfvkvDu0XtHnunqW9o_nE/s400/blured+and+noise.jpg)