MP3: Image Filtering

In this lab, you'll filter an image using weighted-average filters and edge-detection filters.

In order to make sure everything works, you might want to go to the command line, and run

pip install -r requirements.txt

This will install the modules that are used on the autograder, including numpy, h5py, and the gradescope utilities.


Part 0: Load the data, and show the image

Part 1: Create a rectangular filter, and show it in a plot

Part 2: Use h_rect to smooth the rows of the image

Part 3: Use h_rect to smooth the columns of the image

Step 4: create a backward-difference filter, and show it in a plot

Step 5: create a Gaussian smoothing filter, and show it in a plot

Step 6: create a difference-of-Gaussians filter, and show it in a plot

Step 7: Use DoG filter to compute Gx and Gy, then normalize

Step 8: Gradient magnitude

Extra Credit

For extra credit, you can create an image pyramid.

In an image pyramid, each image is a smoothed and downsampled version of the previous image.