CS 143 / Project 1 / Image Filtering and Hybrid Images

[Project description]

Angelina Jolie or Brad Pitt?

  1. Introduction
  2. Algorithms
  3. Results

Introduction

Human eyes are very sensitive to high frequency features. For example, we can recognize different faces even through every face has similar "structure". It is the high frequency feature that help us perceive the subtle difference. This project is an implementation of a simplified version of the SIGGRAPH 2006 paper by Oliva, Torralba and Schyns. The idea is to take high frequency component from one image and low frequency component from another image and mix them together. For the original size composed image, the high frequency component will be dominant. However, as we down sample the image, which can be achieved by blurring and then reducing the size of the image or simply moving it far away, the high frequency component should disappear and the low frequency component plays a more important role. We can easily see this transition with the hybrid image. The following part will contain a description of the algorithms used in this project. After that, some results are shown to demonstrate the effect.


Algorithms

Low Pass Filter: The low pass filter used in this project is a 2D Gaussian filter. Applying a filter to an image is to convolute the image and the 2D filter. More specifically, every pixel of the output image is calculated by the weighted sum of its neighbors. Gaussian filter is symmetry around the center. By convolution of a Gaussian filter, the high frequency peaks and valley values cancelled out and only low frequency remains. The effect is blurring an image.

High Pass Filter: The high pass filter used in this project is a 2D Laplacian filter whose convolution with an image is computed as the difference between the original image and the output of the same image convoluted with a Gaussian filter. The remaining high frequency component is like edges.

Finally the hybrid image is obtained by pixel-wise summation of the high frequency component of the first image and low frequency component of the second image.


Results

Angelina Jolie and Brad Pitt
+ =

The hybrid images looks like Angelina, however, as down-sampling the image (blur and down-sample is the correct way), it looks more and more like Brad.

Bicycle and Motorcycle
+ =


Einstein and Marilyn
+ =


Bird and Plane
+ =


Submarine and Fish
+ =


Cat and Dog
+ =