Skip to content

Instantly share code, notes, and snippets.

Last active Feb 3, 2020
What would you like to do?

Simple image morphing - α-blending of two images using with a cross-dissolve from one image matrix to another.

This project is like the one on page 32 of your new book, "Hands-On Image Processing with Python".

The following code block shows how to start from one face image and end up with another image by using a linear combination of the two image numpy ndarrays.


  1. Shoot two pictures (see below)
  2. Bring them into Colab
  3. Encode each image as a Numpy Array
  4. cross dissolve and capture 7 images showing the dissolve in various states of completeness.
  5. Extra credit! Make an animated GIF of your morph

White balance, set exposure time, and put your camera somewhere that it won't move. Shoot two faces doing your best to align the features of each face (think Passport Photo).

You may want to read a little history on cross-dissolves. Hint: it's harder to do this optically!

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment