1. CS-467 Image processing and Computer Vision
Course Project 2
The purpose of this project is to compare the efficiency of spatial domain linear filters
1. Design the following Matlab functions:
a) A function for calculation of the root mean square error (RMSE, standard deviation) and peak
signal-to-noise ratio (PSNR) between two images.
b) A function, which adds Gaussian additive noise to an image. This function shall accept a clean
image and a coefficient determining the noise standard deviation as parameters.
c) A function, which performs spatial domain linear filtering of an image with s 3x3 local
neighborhood window accepting a filter kernel (3x3 matrix) as a parameter. Use the
mirrorImage.m function (it is located in the classdata folder) for taking care of border effect or
design your own function for taking care of it (the latter gives you 25% extra credit).
2. Design a Matlab script, which utilizes the following (use the functions, which you designed) for the
image:
a) Measures mean and standard deviation of an image;
b) Adds Gaussian noise to an image;
c) Applies linear filtering with a given kernel to a noisy image;
d) Measures standard deviation and PSNR between the noisy image and the clean image and
between the filtered image and the clean image.
3. Choose an image ( , )f x y
4. Generate Gaussian noise ( , )x yη with the standard deviations 0.2σ and 0.4σ where σ is the
standard deviation of the initial image
5. Create two noisy images by adding the noisy fields to the image according to
( ) ( ) ( ), , ,g x y f x y x y mη= + −
6. Filter your noisy images using two linear filters determined by the following kernels (masks)
1 1 1
1
1 1 1
9
1 1 1
and
1 2 1
1
2 4 2
16
1 2 1
7. Compare the results of filtering in terms of RMSE/PSNR and determine which filter and with which
parameters shows better results for your image.
8. Save all your images and create a table with the summary of your results
(Linear Convolution Kernel 1, Linear Convolution Kernel 2, Optimal Linear Filter 3x3, Optimal Linear
Filter 5x5, RMSE, PSNR)
9. Repeat steps 3-5 for another image.
10. Prepare a brief report and justify your conclusion about the quality of filtering.
2. 10. Put your image files and the report in the subfolder Project 2 (create it) located in the designated
folder (named by your last name) in the folder
sfs01classesCS 467 001
((The folder sfs01classes is mapped from all the lab computers, so you may easily find it through File
Explorer (Computer) in Windows 7. A shortcut to this folder (Classes) is also available on the desktop
of the lab computers.