100% Guaranteed Results


COM3536 Solved
$ 20.99
Category:

Description

5/5 – (1 vote)

Signals and Systems
Matlab Project

Choose one of the four 512 x 512 gray scale images provided on ekampus (houses, clown, couple, bridge). The images are provided as 512 x 512 bmp (bitmap) files. Use the command: A=imread(‘nameofimage.bmp’); to read the image file ‘nameofimage.bmp’ and convert it to a matrix A whose values range from 0 to 255. Use the command: J=mat2gray(A, [0 255]); to take the matrix A and convert it to a matrix J whose values are between 0 and 1. The value 0 represents black and the value 1 represents white and intermediate values are gray scale values.
Let n and m be the independent variables (integer indices) indexing the pixels (matrix elements) along the vertical and horizontal dimensions of the image, respectively.
1) Implement a one-dimensional M -point averaging filter to this image for M = 11, M = 31, M = 61, such that each pixel value is replaced by the equal-weighted average of its (M – 1)/2 neighbors to its left, (M – 1)/2 neighbors to its right, and the pixel value itself. For instance, for M = 3, it would be like:
1
y[n, m] = (x[n, m − 1] + x[n, m] + x[n, m + 1]) 3
Notice that the averaging is one-dimensional (1D), that is, along only one of the dimensions (horizontal dimension). Assume that values lying outside of the image are zero while averaging.
Display the averaged images and the magnitude of the frequency response function H(ejωˆ) of the filter for M = 11, M = 31, M = 61 for −𝜋≤𝜔̂≤𝜋.
Display the averaged images as 2D gray scale images, not as 2D or 3D graphs/plots of values. To display an image provided as a matrix Y, use the command: imshow(Y)
Although a 2D system is involved, the index n has no role so you can treat the system effectively as a 1D system while finding the frequency response function; that is, as if:
1
y[m] = (x[m − 1] + x[m] + x[m + 1]) 3

The frequency variable ωˆ is a continuous variable. While calculating H(ejωˆ) you will have to choose suitable samples of ωˆ. Choose these samples close enough so that the graph of H(ejωˆ) versus ωˆ looks smooth.
Be sure to label your plots and the axes appropriately and completely so we can understand what different frequencies mean with respect to the images. To do this you will have to learn the MATLAB commands that allow labeling the axes etc.
Comment on:
(i) How can you describe the visual effect created by the filter?
(ii) What happens to the details in the image? How is this affected by changing the value of M ?
1
(iii) Compare the visual effect in the dimension n versus the dimension m (vertical versus horizontal)?
(iv) Recall that a signal can be written as the weighted sum of cosine/sines of different frequencies. Referring to the magnitude of the frequency response, describe the effect of the filter in terms of what happens to the different frequency components in the image.
How is this affected by changing the value of M?
(v) Comment on what happens close to the edges of the image? How is this affected by changing the value of M?

2) Using the same image that you chose for part 1) as an input, implement a first differencer along the horizontal dimension as follows:

y[n, m] = x[n, m] − x[n, m − 1]
Assume that values lying outside of the image are again zero while calculating the output.
Display the output image as a 2D gray scale image.
Derive the magnitude of the frequency response of the filter and plot it in a manner similar to that in part 1).
Be sure to label your plots and the axes appropriately and completely so we can understand what the different frequencies mean with respect to the images.
Comment on:
(i) How can you describe the visual effect created by the filter?
(ii) Compare this to what you would theoretically expect it to be.
(ii) Compare the visual effect in the dimension n versus the dimension m (vertical versus horizontal)?
(iv) Referring to the magnitude of the frequency response, describe the effect of the filter in terms of what happens to different frequencies in the image.

2

Reviews

There are no reviews yet.

Be the first to review “COM3536 Solved”

Your email address will not be published. Required fields are marked *

Related products