There were two main parts to this assignment: writing the filtering function and creating hybrid images with the filter.
The filtering algorithm was pretty straightforward. I chose to pad the image with zeros. For each pixel in the image, I multiplied the filter element-wise by the surrounding elements of the pixel to get the output. To handle color images, I treated each color chanel separately. Though I considered using im2col, ultimately I found that having to reshape the data afterwards was too time-intensive for images of this size.
![]() ![]() ![]() ![]() ![]() |
To create hybrid images, I created the low pass image by blurring image1. For the high pass image, I subtracted the blurred image2 from the original image. Then I added both images together to get the hybrid image.