title: How can I overlay two images of people of different sizes and aspect ratios if I have body part coordinates?
body: <p>I have two images of people(one person each picture), and I want to overlap them as best I can so that they are roughly the same size in the frame and their hips or shoulders overlap.</p>
  <p>For example say each image has a person mostly straight, except one is sitting and the other is standing, and one is to the left of the frame, and the other in the middle. <strong>How can I recreate the images so they are both lined up at the shoulders and sized similarly?</strong></p>
  <p>Lets say the dimensions are:
  pic1 is <code>430x250</code>
  pic2 is <code>230x320</code></p>
  <p>and I have the coordinates for both of their bodyparts stored as a dictionary like this:</p>
  <pre><code>&quot;keypoints&quot;: [ // keypoints for the first picture...
              {
                  &quot;part&quot;: &quot;nose&quot;,
                  &quot;x&quot;: 235, // x coordinate in the pic
                  &quot;y&quot;: 150 // y coordinate in the pic
                  
              },
              {
                  &quot;part&quot;: &quot;leftEye&quot;,
                  &quot;x&quot;: 239,
                  &quot;y&quot;: 148
              },
  </code></pre>
  <p>... and so on for all the major bodyparts, for BOTH images</p>
  <p>So given that the the person in each image can stand in a different way, and the images are not the same sizes how can I best overlap the two images in most cases so that they both look like they are overlapping?</p>