
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: DIGITAL IMAGE PROCESSING; Subject: Electrical & Computer Engineer; University: Oregon State University; Term: Unknown 1989;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

The ability to simulate the effect of noise in images is central to understanding image restoration. Write a MATLAB code for corrupting an input image with additive noise. Use the image that is available on the class website as input. Your report should include:
M-file with a well commented code;
Figure 1: input image corrupted with Gaussian noise with mean 64, and variance 400;
Figure 2: input image corrupted with salt-and-pepper noise, so that on average 8% of the image contains the noise;
Figure 3: input image corrupted with exponential noise with mean (^1) a , where a = 0. 1. To this end, use the theoretical result that if a random variable, η, has the uniform distribution, η ∼ U(0, 1), then ν = − (^1) a ln(1−η) has the exponential distribution with mean (^1) a , i.e., ν ∼ a exp(−aν), ν ≥ 0.
(Hint: Use ’imnoise’, ’randn’, ’rand’)
Write a MATLAB code for filtering the noise-corrupted images from Problem 1. Your report should include:
M-file with a well commented code;
Figures 4, 5, 6: the result of filtering Figures 1, 2, 3 with the median spatial filter with size Sxy = 7 × 7 ;
Figure 7, 8, 9: the result of filtering Figures 1, 2, 3 with the adaptive filter defined by equation (5.3-12) in the textbook, with size Sxy = 7 × 7 ; You cannot assume that you know the mean and variance of noise in the images.
(Hint: Use ’medfilt2’. To design the adaptive filter (5.3-12), you first need to estimate the arithmetic mean mL and variance σ L^2 of the region Sxy on which the filter is applied. Then, you need to guess the variance of noise in the images. Read carefully the textbook instructions on page 331.)