Homework #5: 2D Convolution

Chris Smemoe , Computer Science 450


Table of Contents

1. Square * Square

2. Square * 2D Gaussian

3. Sobel * Square

4. Square * Noisy Image

5. 2D Gaussian * Noise Function

6. Message

 


The source code used for this project is here (Convolution of 2 images) and here (Sobel operation on an image).

1. Square * Square

Convolve the Square (file: "White_Box") with itself and display the result. (2 pts.) (Include a copy of the display in your write-up.)

Square

Square

Convolution of Square and Square

Explain in your write-up why you get this result. (1 pt.)

The result is due to the convolution operation on the two images. Since the squares are the same image and size, their convolution creates a gradient with the brightest spot in the center of the squares.

If we consider one of these boxes the "signal" and the other the "filter," what kind of filtering is going on? (2 pts.)

This is a blur filter, but since the squares are the same size, it is difficult to tell what the original shape is from the final convolution.

Return to the Table of Contents

 

2. Square * 2D Gaussian

Convolve Square with the 2-D Gaussian (file: "2D_Gaussian") and display the result. (2 pts.) (Include a copy of the display in your write-up.)

Square

2D Gaussian

Convolution of Square and 2D Gaussian

Explain in your write-up why you get this result. (1 pt.)

I got this result since the Gaussian image acted as a filter on the square, causing a blurring effect on the square.

If we consider "Square" the signal and "2D_Gaussian" the filter, what kind of filtering is going on? (2 pts.)

Gaussian Blurring.

How does the effect of this filter compare with what is happening in A.3 (above)? (2 pts.)

Instead of blurring a square with an equally-sized square, the gaussian creates a filter that effectively blurs the square, giving you a combination of a square and a gaussian instead of two squares.

Return to the Table of Contents

 

3. Sobel * Square

Convolve the Sobel kernels (X and Y) with the Square (file: "White_Box") and display the result. (2 pts.) (Include a copy of the display in your write-up.)

Convolution of X-direction Sobel Kernel and the square

Convolution of Y-direction Sobel Kernel and the square

Convolution of both directions of the Sobel Kernel and the square

Explain in your write-up why you get this result. (1 pt.)

The Sobel kernel is the same as the derivative operator. Wherever there is a change in color along the direction the operator is used, a different color shows up in the resulting image.

If we consider "Square" the signal and "Sobel" the filter, what kind of filtering is going on? (2 pts.)

The Sobel filter is useful for detecting gradients (edges) in an image. In this case, it detected the edge of the square.

Return to the Table of Contents

 

4. Square * Noisy Image

Convolve Square with a noisy image (file: "2D_Noise") and display the result. (2 pts.) (Include a copy of the display in your write-up.)

Noisy Image

Square

Convolution of Noisy Image and Square

Return to the Table of Contents

 

5. 2D Gaussian * Noise Function

Convolve "2D_Gaussian" with the noisy image (file: "2D_Noise") and display the result. (2 pts.) (Include a copy of the display in your write-up.)

Noisy Image

2D Gaussian

Convolution of Noisy Image and 2D Gaussian

Compare and contrast the result from D.1 with that from E.1. Which has the greatest effect on "2D_Noise"? Why? (2 pts.)

In this example, the square filter had the greatest effect on the Noisy image since it was a larger filter and blurred the noise to a larger extent than the small Gaussian filter.

Return to the Table of Contents

 

6. Message

The image "Message" (file: "Message") has a hidden message. Decipher the message with any combination of the "filters" used in the convolutions above (or any filter of your own design) and include the message in your write-up.

Message before any filtering or thresholding

Message after applying a small gaussian filter and thresholding

Return to the Table of Contents

Times it took for each of parts A-E to run:

Part A - 67 sec

Part B - 66 sec

Part C - 1 sec

Part D - 5 min 30 sec

Part E - 5 min 40 sec


smemoe@byu.edu
Date last modified: 10/20/1999