I need to merge two images (one is jpg and other one is png) based on its coordinate values. I have obtained coordinate value of both images and resized based on the size. I found a relevant answer here ,but it deals with only one pair of coordinates. Paste an image to another image at two given co-ordinates with altered opacity using PIL or OpenCV in Python
I checked the other link How can I paste an image to another image by comparing its coordinate values using PIL or opencv in Python? but still image is getting distorted. Pillow based merge will be better because my second image is png and pillow deals with the transparency of png files better. Can anyone suggest a better answer which deals with multiple coordinate value comparison in each images and merge?
The points will be like this,
"keypoints":[ {
"score":0.91145658
"part":"leftshoulder"
"position":{"x":233.165434,"y":326.7643555}
},
{
"score":0.91145658
"part":"right shoulder"
"position":{"x":233.165434,"y":326.7643555}
} ]
First image left shoulder point should merge with second image left shoulder point. First image right shoulder point should merge with second image right shoulder point. It will be go like this according to the points. That is the expected outcome