title: OpenCV Composting 2 images of differing size
body: <p>I need to alpha-blend 2 images that are not the same size.  I've managed to get them to composite by resizing to the same size, so I've got part of the logic:</p>
  <pre><code>import cv2 as cv
  
  def combine_two_color_images_composited(foreground_image, background_image):
  
      foreground = cv.resize(foreground_image, (400,400), interpolation=cv.INTER_CUBIC).copy()
      background = cv.resize(background_image, (400,400), interpolation=cv.INTER_CUBIC).copy()
      alpha =0.5
      # do composite of foreground onto the background
      cv.addWeighted(foreground, alpha, background, 1 - alpha, 0, background)
      
      cv.imshow('composited image', background)
      cv.waitKey(10000)
  </code></pre>
  <p>I'm wondering if I need to make a mask that is the same size as the larger image and then use that with my first image.  If so, I don't know how to do masking yet in OpenCV.... this is but a tiny portion of my project so it's not something I've been able to spend a ton of time researching to learn how masking works.</p>
  <p>I have searched all over but the code I'm finding does things like 'adds' the images together (side by side).</p>