Project 1: Image Filtering and Hybrid Images

Marilyn Einstein Weirdness!!

I created hybrid images in this project. Hybrid Images are created by using two images. The speciality of hybrid images is that it looks different based on the viewing distance. So if you look at the hybrid from different distances it will appear as different objects based on the underlying images. This is done by adding the low pass filtered version of one image with the high pass filtered version of the other image. Also, to show the difference in perception of the hybrid image, we downsample it for the pictures provided to see the difference.

IMAGES USED

I was provided with a set of 10 images (5 pairs). The ones which paired with each other are the

  1. Marilyn and Einstein
  2. Plane and Bird
  3. Dog and Cat
  4. Fish and Submarine
  5. Motorcycle and Bicycle
Column 1 represents the low pass image, Column 2 represents the high pass image, Column 3 represents the hybrid image obtained ny adding these two and Column 4 shows the hybrid image at various scales for observing the difference in perception

RESULTS

Low_Pass High_Pass Hybrid_Image Downsampling_For_Perception

HOW IT WORKS

I implemented the my_imfilter code by following these steps.

  1. Converted input image to double precision
  2. Initialized output to a double dimensional matrix(size same as input image) filled with 0s
  3. Compute the size of the filter
  4. Pad the input image on all 4 edges based on filter size
  5. Filter based on color components
  6. Combine and store at the location (x, y) x and y range for all pixels