title: Cut out or remove the pixels from an image that run into the black pixels of a mask
body: <p>I'm trying to cut out two images with OpenCV using Python.</p>
  
  <p>The idea is to use an image like this one:</p>
  
  <p><a href="https://i.stack.imgur.com/kAMJX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kAMJX.png" alt="enter image description here"></a></p>
  
  <p>As a mask. Note: this is only an example.</p>
  
  <p>So if I subtract this mask to another image, I will get an image with the original pixels only in the same location as the white rectangle in the mask. So, the idea is to remove the pixels from the first image that run into the same location that the black ones in the mask.</p>
  
  <p>How can I do it?</p>
  
  <p>Maybe I can do an <strong>AND</strong> operation between the two images (the mask will have only 0 (for black) and 1 (for white pixels).</p>