Fun with Filters and Frequencies
Statement
This assignment is about how to use filters and how to use frequencies to analyze data and perform cool operations.
Fun with Filters
In this part we build intuitions about convolutions and filters.
Finite Difference Operators
We generate a sequence of images using the finite difference kernels.
Some results are displayed below:
finite difference using \( D_x \) kernel
finite difference using \( D_y \) kernel
Using the above class of difference operators we can define the
gradient as \( \nabla I = \sqrt{ (\frac{\partial I}{\partial x})^2 + (\frac{\partial I}{\partial y})^2}\)
Gradient of image
Thresholded gradient of image, using threshold as t=0.1
Fun with Frequencies
Sharpening images are a common operation in image processing. In this case we use a single operation to combine high-pass filtering and image addition into a single operation. For example, consider sharpening of the Taj Mahal. (hover over the image to see the original image)
Similarly, we can blur the original image, and sharpen it again using the unsharpen filter, which gives us the following result (again, hover to see the original image):
Notably, while sharpened a bit, the resharpened image misses high frequency details from the original image.
Hybrid images
Frequency analysis provides a natural way to combine multiple images to generate a single hybrid image. In particular,
by filtering images to have frequencies in different ranges, and combining them, we can generate a hybrid image.
Aligning the images
Hybrid Image after combining the aligned images (i) spatial domain (ii) frequency domain
Original images in frequency domain (i) derek (ii) nutmeg
Images post filtering (i) derek with low-pass filter (ii) nutmeg with high-pass filter
Additiona Notes
This was a great assignment, I really enjoyed getting a better sense of interplay between frequencies and filters. Implementing an algorithm to blend images from scratch was a lot of fun!