Skip to content

Instantly share code, notes, and snippets.

@douglasgoodwin
Last active February 3, 2020 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglasgoodwin/f676d75f4b47b501e21f89aa7620afce to your computer and use it in GitHub Desktop.
Save douglasgoodwin/f676d75f4b47b501e21f89aa7620afce to your computer and use it in GitHub Desktop.

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.

PROCESS:

  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!

https://pixelvalleystudio.com/pmf-articles//the-cross-dissolve-its-history-process-in-film-and-lots-of-interesting-facts

Display the source blob
Display the rendered blob
Raw
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