Correlation and Convolution in the Spatial Domain

ECE 5256 Project 3
Correlation and Convolution in the Spatial Domain
1 Correlation and convolution
Consider two images. One image should be relatively large, like 512 x 512 pixels that contains
all zeros with several sparsely populated points with magnitude 255. The other image should be
small, something like, 15 x 15 pixels and contains an asymmetric object like, with the
object white and the background black.

Perform both the correlation, and convolution of the two images separately and correctly label
each result. Make the resulting image the same size as the larger input image.
2 Matched filtering (correlation)
Create or download an image that contains several lines of text, f(xy). Don’t make the text too
small, and make the text lighter than the background. Extract one character from the text
image and create a small image from it c(x,y). Perform the correlation between the two images
with the result r(x,y) the same size as the larger image.
(a) Indicate the position(s) of the maxima in r(x,y). Are the in the positions of the characters
in the text image?
(b) Determine the ratio of the correlation peak corresponding to a letter and the next
highest peak that is not a letter in r(x,y).
(c) Normalize the correlation result by dividing r(x,y) by the sum of all pixel values used in
the correlation operation. The easiest way to do this is to filter (convolution) the original
image with a window of all 1’s, that is the same size as c(x,y), a(x,y) = f(x,y) * ones(x,y).
Then form the ratio: f(x,y)/a(x,y).
(d) What is the new ratio of the correlation peak corresponding to a letter and the next
highest peak in r(x,y)?
3 Spatial filtering
(a) Add noise to an image whose maximum intensity is close to 255 on a scale of 0-255
using 20*randn (standard deviation of 20, mean of 0).
(b) Use a Sobel edge detector to display the edges in the noisy image.
(c) Low-pass filter the noisy image, then detect edges as in part(b).
(d) Is there a difference between the two results.
Turn in:
1 Project title, course number, date due
2 Brief description of what you have done
Part 1 Labeled correlation and convolution images.
Part 2 Correlation result (unnormalized, values of peaks and ratios asked for).
Part 3 Image, noisy image, edge detection results of filtered and unfiltered image.
3 Explanation and/or discussion of results.
4 Appendix: program listing

Click here to order similar paper @Udessaywriters.com.100% Original.Written from scratch by professional writers.

You May Also Like

About the Author: admin