Project 1: Image Filtering and Hybrid Images

Example of a hybrid image result from a bird and a plane.

The objective of the project Image Filtering and Hybrid Images is to extract low and high frequency components from images and combine different frequency components from different images in order to generate a hybrid image. The hygrid image will present different visual effects when viewed with different size and at different distance.

An example of the hybrid image is shown on the right. The image combines the high frequency component from an airplane and the low frequency component from a bird. When the image is viewed in a short distance, the high frequency stands out, leading the viewer to perceive an airplane. When viewed in distance, the low frequency will dominate, presenting a visual effect of a bird.

Methodology

The program implementation includes the frequency extraction function and a convolution filter. The filter used in this program is gaussian low pass and high pass filter. The generation of frequency components for images is shown below.


filter = fspecial('Gaussian', cutoff_frequency*4+1, cutoff_frequency);

% Low frequency component is extracted through a gaussian filter
low_frequencies = my_imfilter(image1, filter);

% High frequency component is generated by subtracting the blurred image from the original image
high_frequencies = image2 - my_imfilter(image2, filter);

The convolution process is solved with a brutal force manner with 5 for loops (2 for the image axises, 2 for the filter axises and 1 for the color channel).

Results Display

The above display presents the whole process of the hybrid image generation. Shown on the first row from left to right is, the original bird image, the original plane image, low frequency from bird, and high frequency from plane. The second row shows the hybrid image with different scales. Viewers tend to perceive the plane from the left image, but a bird on the right.

The second example is an interesting combination of the logos from Sony Ericsson and Clearwire. Several years ago Sony sued Clearwire over the similar logo. These logos are really good materials for this project. Low frequency component is taken from Clearwire with high one from Sony. While the left image looks alike the Sony logo, the right ones are more similar to Clearwire in visual effects.

The above example is the combination of a zebra and the leopard. The zebra is clear on the left while a leopard is the major vision on the right.

Another interesting experiment with the program is shown above. One of the image is a food called Steamed Eggs, while another is a high resulotion capture of one of the moons of he planet Jupitar. Though it does not present the best result, it is funny to combine these two images and see what actually happened.