Project 1: Image Filtering and Hybrid Images

Part 1. Image Filtering

For this part of the project, I used the basic filtering function as a base for my computations. However, since this suppose to be able to handle both colored and gray scaled images, decided to approach it as if there are three separarte 2d images that I am overlaying on top of one another.

For padding I decided to reflect of the edges by half the length of the filter and concatenate those matrices in the logical places.I made a total of four separate paddings:

  1. padding top
  2. padding bottom
  3. padding left
  4. padding right

For filters with dimensions of one, I simply did not add paddings to the sides of the image that corresponds to that particular filter. For example, if the filter is 1 x 25, there will not be a filter on the left and right sides of the padded image. These are the results of the different filters:

The top row from left to right is original, identity, high pass, and sobel. The bottom row is blur, large blur, and laplacian. It seems like the guassian blur is having an issue with the padding. I can't figure out why.

Part 2. Hybrid Images

Here is the hybrid images with the variance.

cutoff = 7

cutoff = 2

cutoff = 1.5

cutoff = 2.5

cutoff = 1.5