This repository contains a simple GUI for automating an image morph given an input and output image.
An example input and output image has been provided under directory input.
This section lists third-party libraries and external system requirements needed to build and run the code.
- ImageMagick
Ubuntu
sudo apt-get update
sudo apt-get install imagemagick
MacOS
brew install imagemagick
- Linux/ MacOS Operating System
Windows (Work In Progress)- Quartz - For MacOS only
- Git
Ubuntu
sudo apt-get update
sudo apt-get install git
MacOS
brew install git
This section provides instruction on how to setup and build the code.
- Download the repository to your local workstation.
git clone git@github.com:zhzdeng/Image-Morphing.git
- Jump into the file directory you cloned it to.
cd Image-Morphing
- Compile the code.
make
Copy generated binaries to either usr/bin or usr/local/bin for general use.
sudo make install
morphing -s source image
-d destination image
[-o] output directory. Default = root directory.
[-n] the number of transitional images
Once the [Build] has been executed, run the command below.
./morphing -s input/1.jpg -d input/2.jpg
- You should a GUI window pop up.
- With the GUI window opened, you can annotate it like so.
Select a point on the first image and then select its corresponding poitn in the second image.
This is entirely up to your discretion.
- Upon finished selecting enough points, Close the window. Intermediate
.jpgframes are generated in your output directory. - You can follow the next section to convert those frames into a
.mp4video.
Run the command below to complete step 4 of [Usage].
ffmpeg -r 12 -i ./%d.jpg -vcodec mpeg4 ./video.mp4
You should be able to get the final resulting video.mp4 like so.

