title: OpenCV & Python: Cover a colored mask over a image
body: <p>I want to cover a image with a transparent solid color overlay in the shape of a black-white mask</p>
  
  <p>Currently I'm using the following java code to implement this. </p>
  
  <pre><code>redImg = new Mat(image.size(), image.type(), new Scalar(255, 0, 0));
  redImg.copyTo(image, mask);
  </code></pre>
  
  <p>I'm not familiar with the python api.</p>
  
  <p>So I want to know if there any alternative api in python.
  Is there any better implementation?</p>
  
  <p>image:</p>
  
  <p><a href="https://i.stack.imgur.com/72iEF.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/72iEF.jpg" alt="src img"></a></p>
  
  <p>mask:</p>
  
  <p><a href="https://i.stack.imgur.com/dd1l4.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/dd1l4.jpg" alt="mask"></a></p>
  
  <p>what i want:</p>
  
  <p><a href="https://i.stack.imgur.com/YP2d1.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/YP2d1.jpg" alt="what i want"></a></p>