Project 1: Image Filtering and Hybrid Images

Image Filter

I implemented the algorithm simply with some helper functions. I calculate each output pixel value individually by multiplying the filter by the image centered on each pixel. I am doing a simple zero padding of the image.

Below are some examples of a an image filtered with different simple filters.


Identity

Gaussian Blur

Sobel Filter(Horizontal Gradients)

Laplacian Filter(High Pass)




Hybrid Images

I implemented the hybrid image algorithm simply by combining a low pass filtered image with a high pass filtered image. The low pass image is filtered using a guassian filter and the high pass uses a blurred guassian filtered image subtracted from the original image. I tuned seperate cutoff frequencies for each image to set the images are combined.

Below are some examples images which were merged.

Hybrid Cat and Dog


Origional Dog

Origional Cat

Low-Pass Filtered Dog

High-Pass Filtered Cat

Hybrid Image Scaled

Hybrid Tunnel and Cave


Original

Original

Low-Pass Filtered

High-Pass Filtered

Hybrid Image Scaled

Hybrid Lion and Cat


Original

Original

Low-Pass Filtered

High-Pass Filtered

Hybrid Image Scaled

Hybrid Einstein and Marilyn


Original

Original

Low-Pass Filtered

High-Pass Filtered

Hybrid Image Scaled

Hybrid Clinton and Trump


Original

Original

Low-Pass Filtered

High-Pass Filtered

Hybrid Image Scaled