


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Problem 1. Noisy Images and Filtering.
2 4 6 8 10 12 14 16 18 20
2 4 6 8 10 12 14 16 18 20
2 4 6 8 10 12 14 16 18 20
2 4 6 8 10 12 14 16 18 (^202 4 6 8 10 12 14 16 18 )
2 4 6 8 10 12 14 16 18 (^202 4 6 8 10 12 14 16 18 )
2 4 6 8 10 12 14 16 18 20
2 4 6 8 10 12 14 16 18 20
2 4 6 8 10 12 14 16 18 (^202 4 6 8 10 12 14 16 18 )
2 4 6 8 10 12 14 16 18 (^202 4 6 8 10 12 14 16 18 )
2 4 6 8 10 12 14 16 18 20
In the figure above, all the images are 20×20 discrete-space, continuous-valued, grayscale images. Each pixel can have values from 0 (black) to 3 (white). The image in the top row depicts a light square on a dark background. Within the square, the image has a constant value of 2; within the background, it has a constant value of 1. (Warning: if you print this out, the image may look somewhat grainy and non-constant on your printout because of imperfections of printing and copying devices.) Each of the six images in the second and third rows was obtained by modifying the square image in the top row. The objective of this problem is to determine what operations resulted in the six images.
(a) One of the images in the second row was obtained from the square image in the top row by adding white zero-mean noise with marginal density which is uniform between -1 and 1. One of the images in the second row was obtained from the square image in the top row by adding white zero-mean Gaussian noise with standard deviation 0.2. One of the images in the second row was obtained by corrupting the square image in the top row with “occlusive” noise: each pixel value stayed the same with probability 0.9, was replaced by 0 with probability 0.05, and was replaced by 3 with probability 0.05. Indicate
which image in the second row corresponds to each type of noise noise (uniform, Gaussian, occlusive), and fully explain your answers.
(b) The three images in the third row were obtained by applying a median filter with a 3 × 3 window to the three images in the second row. Indicate which image in the third row corresponds to each image in the second row, and fully explain your answers.
Problem 2. Noise removal via Perona-Malik filtering and wavelet thresholding. In Matlab, implement the iterative non-linear filter (the Perona-Malik filter) considered in class:
g(i+1)(m, n) = g(i)(m, n) +
F [g(i)(m + 1, n) − g(i)(m, n)] + F [g(i)(m − 1 , n) − g(i)(m, n)] +
for 1 ≤ m ≤ M, 1 ≤ n ≤ N, 0 ≤ i ≤ I − 1 ,
where M and N are the dimensions of the image, I is the total number of iterations, and F (v) is the following nonlinear function which depends on the positive real parameter K:
F (v) = v 1 +
( (^) v K
) 2 ,^ for any real number^ v.
Use the following syntax:
function g = PM(f,alpha,I,K)
Here, f = g(0)^ is the input image to be filtered; alpha is the filter parameter α; I is the total number of iterations; K is the filter parameter K; and g = g(I)^ is the output image, which is the result of I iterations of the filter.
To calculate g(i+1)(m, n) around the border of the image, assume that g(i)(m, n) is symmetrically reflected. In other words, assume that
g(i)(0, n) = g(i)(1, n) g(i)(m, 0) = g(i)(m, 1) g(i)(M + 1, n) = g(i)(M, n) (2) g(i)(m, N + 1) = g(i)(m, N )
Hints. Avoid “for” loops. Your program should have only one “for” loop: to iterate Eq. (1) over i = 0, 1 ,... I − 1. All other computations should be done on entire images. For example, to calculate F [g(i)(m + 1, n) − g(i)(m, n)], you can use
delta_g = [g(2:M,:); g(M,:)] - g; F_of_delta_g = delta_g./(1+(delta_g/K).^2);
(a) Test your program on a noisy binary image, created with the following script:
(To find out more about wavelets, how to choose a wavelet, how to set the threshold, etc, take ECE 648!)
Problem 3. Tomography. The tomographic projection gθ(t) of a 2-D object f (x 1 , x 2 ) at the angle θ and location t is obtained by
(a) Let f (x 1 , x 2 ) =
1 if x^21 + x^22 ≤ 1 , 0 otherwise. Find the tomographic projection g 0 (t) of f (x 1 , x 2 ) at the angle θ = 0. Either a formula or a fully labeled plot of g 0 (t) as a function of t is acceptable as the answer. (Hint. Since f (x 1 , x 2 ) is a very simple function, the answer can be obtained without explicitly writing down any integrals, by drawing the set of points where f (x 1 , x 2 ) 6 = 0 and relating the line integrals that you need to compute to the lengths of certain segments in your drawing.)
(b) Let f ′(x 1 , x 2 ) =
2 if 0 ≤ x 1 ≤ 1 and 0 ≤ x 2 ≤ 1 , 0 otherwise. Find the tomographic projection g′ π/ 4 (t) of f ′(x 1 , x 2 ) at the angle θ = π/4.