Here we are trying to apply morphing on two images, in particular, we want to map the changes from the source image to the destination image. On applying this we can see how pixel values are converting from source image to destination image. To get better results triangulation is used to do the region-wise mapping.
- Python 3.7
- Open-CV
- Numpy
- Open terminal (CTRL+ALT+T)
- Install Python by the command “sudo apt-get install python”
- Run the command“python -m pip install requirements.txt”
- Change the path in the code for your input images.
- Run the command on the terminal - “python file_name.py”
- You will be prompt with image1
- Use mouse to mark 3 control points and press ‘q’
- You will be prompt with image2
- Use mouse to mark 3 control points and press ‘q’
- Now you can see 2 triangulated images
- Press q
- Now You can see intermediate triangles getting morphed
- The final Image along with two triangulated image will be shown as output.
- Images will be saved automatically in the working directory.
Check the following video to see what the program does! Watch the video here
Source Image
Destination Image
Source Triangulated Image
Destination Triangulated Image
Final Morphed Image