Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karanraj06/image-morphing
Delaunay Triangulation Image Morphing
https://github.com/karanraj06/image-morphing
digital-image-processing image-morphing python
Last synced: 8 days ago
JSON representation
Delaunay Triangulation Image Morphing
- Host: GitHub
- URL: https://github.com/karanraj06/image-morphing
- Owner: Karanraj06
- Created: 2023-03-28T17:39:53.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T08:21:11.000Z (10 months ago)
- Last Synced: 2024-04-19T09:31:31.990Z (10 months ago)
- Topics: digital-image-processing, image-morphing, python
- Language: Jupyter Notebook
- Homepage:
- Size: 71 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image-Morphing
## File Structure
```
.
├── .gitignore
├── LICENSE
├── README.md
├── images
│ ├── image1.jpg
│ └── image2.jpg
├── input.txt
├── main.ipynb
├── requirements.txt
└── shape_predictor_68_face_landmarks.dat
```## Usage
- Install the required python packages using
```
pip3 install -r requirements.txt
```- Run the code with
```
python3 main.py
```- The output gifs are saved as `output1.gif` and `output2.gif`
## Summary
This python program takes two images and produces a gif by gradually transforming one image into another. To create the morphed image, we use Delaunay triangulation to divide the image into small triangles. To create each frame of the gif, we compute the morphed triangle for all triangles in the image using a specific alpha value. In other words, we transform each small triangle in the image by a certain amount specified by the alpha value, and then use these transformed triangles to create the next frame of the gif.
The implementation details are explained within the code. The output of Part A is saved as `output1.gif`, while the output of Part B is saved as `output2.gif`.