Modify ImageMagick script for mockups with polygonal distortion

Job ID: 39824995

Budget: €30 – €250 EUR

Project description
I have a script that uses ImageMagick to generate realistic clothing mockups.
The current script takes the following as input:
- Positioning coordinates
- Clothing image
- Design to be mocked
The design is inserted into the image and distorted to simulate a realistic effect with lighting and perspective.

Current problem
The script only supports 4 points (classic perspective transformation). This limits the positioning of the design to a quadrilateral. However, we need a greater number of points in order to achieve greater realism, as we have photos of models in dynamic positions and with folds in the clothing.

Objective of the work
I want to modify the script so that:
- It can accept a greater number of points (arbitrary polygon, not just a rectangle).
- The design is distorted and adapted to fill the polygon formed by the points.
- The image of the design remains within the polygon, adapting to its shape, and is not simply cropped.

Attached to the post you will find the current script.

Required skills
- Excellent knowledge of ImageMagick (in particular geometric transformations, warping, distortions).
- Ability to work with command line scripts (bash/sh).
Related categories: Shell Script Image Processing