This project examines how frequency manipulation can be used to enhance and merge images in innovative ways. Techniques like boosting high frequencies make images appear sharper by emphasizing fine details, while basic filtering methods help identify edges by detecting changes in pixel values. We also explore creating hybrid images by combining detailed, high-frequency elements from one image with the smoother, low-frequency areas of another. Finally, Gaussian and Laplacian stacks are utilized to blend images across multiple frequency layers, enabling seamless and natural-looking transitions.
We use finite difference operators to detect edges by convolving the image with D_x
and
D_y
. The results are shown below:
By binarizing the gradient magnitude, we suppress noise and highlight real edges, as shown below:
Observations: The threshold value is crucial in balancing noise reduction and edge visibility. A value of 0.09 was used
The DoG filter combines Gaussian smoothing with finite difference operators, resulting in less noise compared to the previous approach.
Observations: The Gaussian filter smooths noise while retaining significant edges.
Observations: When sharpening the Taj Mahal and other images, the process effectively enhances fine details and restores clarity. However, sharpening a previously sharp image that was blurred shows how the technique recovers some sharpness but may not fully match the original, demonstrating the limitations and effects of noise amplification. It does not look much like the original, however you can see some sharpening specifically in the edges of objects.
Hybrid images blend high frequencies from one image with low frequencies from another, creating a visually dynamic result that changes with distance.
Hybrid images blend high frequencies from one image with low frequencies from another, creating a visually dynamic result that changes with distance.
Hybrid images blend high frequencies from one image with low frequencies from another, creating a visually dynamic result that changes with distance.
Observations: Alignment and filter cutoffs significantly affect the hybrid perception.
Gaussian and Laplacian stacks help prepare images for blending by handling different frequency bands separately.
Observations: These stacks allow for smooth transitions in image blending.
Blending with Gaussian and Laplacian stacks creates a smooth transition between images, such as the iconic apple-orange blend. This is the one I definitely spent the longest on. In order to create the masks, I created a drawing tool with cv2 where you can draw over one of the images after spending a very long time creating masks that didn't align.
Ok I spent a long time trying to find an image of a goat and snake that would line up properly, this is the closest I got...
Observations: Blending works best with well-aligned images and proper mask transitions.
Conclusion: Overall, this project was a mix of quick wins and a few time-consuming challenges. I started with edge detection using finite difference operators, then used Gaussian filters to smooth the results and reduce noise. Parts like sharpening images and creating hybrid images in Part 2 were interesting and mostly straightforward, but I hit a roadblock in Part 2.2 with VS Code debugging issues, which took way longer than expected to sort out. Part 2.4 was another tough spot; building the Gaussian and Laplacian stacks from scratch and tweaking the multiresolution blending took much more effort than I anticipated. While these parts dragged on, the other sections went more smoothly, and in the end, seeing the final results made all the debugging and extra work feel worthwhile...maybe.