title: How to create Mask matrix variable for OpenCV minMaxLoc function in Python?
body: <p>I am using OpenCV in Python.</p>
  
  <p>I am trying to create a <code>Mask</code> Matrix variable to be used in this function: <a href="http://docs.opencv.org/modules/core/doc/operations_on_arrays.html#cv2.minMaxLoc" rel="nofollow">cv.minMaxLoc</a>. The Matrix variable should have the same size like my template image, with type = <code>CV_8UC1</code>.</p>
  
  <p>My template image has a alpha channel which consists of only <code>0%</code> or <code>100%</code> transparency pixels. How can I extract the alpha channel data from my image and put it into the <code>Mask</code> Matrix with <code>0 = 100% transparency</code> and <code>1 = 0% transparency</code>?</p>