Hybrid Images

This post is about hybrid images with Python. I will be following the approach described in the SIGGRAPH 2006 paper.

Approach #

The technique described in the paper takes a pair of images, and takes the high frequency of 1st image and the low frequency of the 2nd image.

The low pass filter is taken using the Gaussian filter.

low_pass = gaussian_filter(image_1)

The high pass filter is taken by taking the original image minus the Gaussian filter of the image.

high_pass = image_2 - gaussian_filter(image_2)

The images are then blended together using an average between them.

final_image = (high_pass + low_pass) / 2

The Gaussian filter uses a kernel size that is determined by the sigma. Sigma is calculated through the formula f_c = 1 / (2 * pi * sigma) which is formula for the cut off frequency for the Gaussian filter. This lets me experiment with different cycles/image for each image.

Results #

Boyhood #

The following images are from the movie Boyhood by Richard Linklater. The film was shot over 12 years and used the same actors throughout the process. The hybrid images below are created from separate points in time of the main character’s life.

Original Image to be high passed
boy-grass-young.png

Original Image to be low passed
boy-grass-old.png

High Pass Original FFT
high_pass_fft_original.jpg

High Pass FFT
high_pass_fft.jpg

High Pass Image
high_pass_image.jpg

Low Pass Original FFT
low_pass_fft_original.jpg

Low Pass FFT
low_pass_ftt.jpg

Low Pass Image
low_pass_image.jpg

Combined Image
final.jpg

Image Pyramid
final.jpg
final-pyr-2.jpg
final-pyr-3.jpg
final-pyr-4.jpg
final-pyr-5.jpg
final-pyr-6.jpg
final-pyr-7.jpg

Time #

Original Image to be high passed
4l.png

Original Image to be low passed
4s.png

High Pass Original FFT
high_pass_fft_original.jpg

High Pass FFT
high_pass_fft.jpg

High Pass Image
high_pass_image.jpg

Low Pass Original FFT
low_pass_fft_original.jpg

Low Pass FFT
low_pass_ftt.jpg

Low Pass Image
low_pass_image.jpg

Combined Image
final.jpg

Image Pyramid
final.jpg
final-pyr-2.jpg
final-pyr-3.jpg
final-pyr-4.jpg
final-pyr-5.jpg
final-pyr-6.jpg
final-pyr-7.jpg

Failed Attempts #

ghost.png
cat-crop.jpg

Screen Shot 2018-02-18 at 5.14.31 PM.png
Screen Shot 2018-02-18 at 5.23.37 PM.png

spring.jpg

fall-aligned.png

High Pass Original FFT
high_pass_fft_original.jpg

High Pass Image FFT
high_pass_image.jpg

High Pass Image
high_pass_fft.jpg

Low Pass FFT Original Image
low_pass_fft_original.jpg

Low Pass FFT
low_pass_ftt.jpg

Low Pass Image
low_pass_image.jpg

Combined Image
final.jpg

Image Pyramid
final.jpg

final-pyr-2.jpg

final-pyr-3.jpg

final-pyr-4.jpg

final-pyr-5.jpg

final-pyr-6.jpg

final-pyr-7.jpg

 
7
Kudos
 
7
Kudos

Now read this

How I view hash tables

I wrote this for Hannah hopefully this helps! [0] [1] [2] [3] [4]->[Abkhazia| Sukhumi] -> [Albania| Tirana] [5] [6] [7] [8] Abkhazia Afghanistan Albania Abkhazia A + b + k + h + a + z + i + a 1 + 2 + 11 + 8 + 1 + 26 + 9 + 1 = 59... Continue →