Adnan Aman
In this project, we explore methods of algorithmic image filtering. We detect edges using derivatives and gradients, simulate high-pass and low-pass filtering, and blend images together using Laplacian stacks.
We take the x and y partial derivatives of an image by convolving it with finite difference operators. Here's the cameraman image and its convolutions:
Gradient magnitude computation is a process in image processing for edge detection. The process involves the following steps:
To reduce noise, we apply a Gaussian filter before the derivative convolution. Here are the results:
We use the Gaussian filter to sharpen images by enhancing high-frequency components. This technique involves subtracting a blurred version of the image from the original and then adding this high-frequency information back to the original image with varying intensities.
We start with a sharp image (Taj Mahal) and apply different levels of sharpening to observe the effects.
Next, we take a potentially blurry image of a San Francisco street and apply our sharpening technique.
Finally, we apply our sharpening technique to an image of a New York street.
1. Taj Mahal Image: As we increase the alpha value, we can see that the details in the image become more pronounced. The edges of the building and the textures in the sky become sharper. However, at higher alpha values (like 4), we start to see some artifacts and over-sharpening effects.
2. San Francisco and New York Street Images: For these images, we first applied a blur and then sharpened them. We can observe that:
In conclusion, while image sharpening can enhance details and make images appear clearer, it's most effective when applied to images that are already reasonably sharp. When applied to blurred images, it can improve clarity but may not fully restore the original detail. Additionally, over-sharpening (using too high alpha values) can introduce unwanted artifacts and make the image appear unnatural.
We create hybrid images that appear differently when viewed up close versus from afar. The process involves combining high-frequency components of one image with low-frequency components of another.
To better understand how hybrid images work, we can visualize the frequency content of each image using Fourier transforms:
To create the hybrid image, we apply a high-pass filter to the cat image and a low-pass filter to the dog image:
Let's explore more hybrid image examples using familiar faces!
These additional examples further illustrate how hybrid images combine high-frequency details from one image with low-frequency components from another. The result is an image that appears different depending on viewing distance or image size.
The hybrid image is created by combining these filtered images. When viewed up close, the high-frequency details of the cat are more visible. From a distance, the low-frequency components of the dog dominate the perception.
In this section, we demonstrate the Gaussian and Laplacian stacks for both an apple and an orange image. These stacks are crucial for the multiresolution blending process.
These Gaussian and Laplacian stacks form the basis for our multiresolution blending process, which we'll explore in the next section.
In this section, we demonstrate the multiresolution blending process using the apple and orange images. We'll show the masked Laplacian layers and the final blended result.
The final blended image, often humorously referred to as the "Oraple", demonstrates the power of multiresolution blending. By combining the Laplacian stacks of the apple and orange images using a carefully crafted mask, we achieve a seamless transition between the two fruits. This technique allows us to create convincing composite images that smoothly blend different elements together.
This example demonstrates the use of an irregular mask to blend the San Francisco skyline with a space scene.
The two drastically different textures and colors demonstrates the power of multiresolution blending.
This project has demonstrated how these processes can be used to enhance images, create intriguing visual effects, and seamlessly combine different visual elements.