CS 143 / Project 1 / Image Filtering and Hybrid Images

A hybrid image of me.

This project is about hybriding picutres. Take a look at the picutre right to this text, if you look close(just like you do now), you will see a girl waving her arms in the air. But if you look from a distance, you will see a girl with her arms put down.

Algorithm

First we should obtain the low frequency part of hybrid image by filtering a image with gaussian filter. Then we would obtain the high frequency part of it by filtering another image with laplacian filter. But we can also achieve the almost same effect by subtracting the low frequency part from the image.

  1. low_frequency = filter(image1, guassianfilter);
  2. high_frequency = image2 - filter(image2, guassianfilter);
  3. hybrid_image = low_frequency + high_frequency;

Pad the picture

I reflected the image across edge when filtering edges, so the edges looked more natural aftering filtering.


%padding
withboundary = padarray(image,[radius1 radius2],'symmetric');

Results in a table

I set the sigma value for guassian filter as 7 here.

I set the sigma value for guassian filter as 3 here.

I set the sigma value for guassian filter as 4 here.

I set the sigma value for guassian filter as 4 here.

I set the sigma value for guassian filter as 6 here.

I set the sigma value for guassian filter as 7 here.

To achieve the best visual effect, during the process of hybriding images, I used different size of filters.