title: Find image type in python openCV
body: <p>I recently had some issues finding the type of a template image i'm using for pattern matching purposes. I use the python version of OpenCV, and the image returned by <code>imread</code> does not seem to have a "type" property like in the C++ OpenCV implementation. </p>
  
  <p>I would like to access the type of the template to create a "dst" <code>Mat</code> having the same size and type of the template.</p>
  
  <p>Here is the code : </p>
  
  <pre><code>template = cv2.imread('path-to-file', 1)
  height, width = template.shape[:-1]
  dst = cv2.cv.CreateMat(width,height, template.type) 
  ---&gt;'Error :numpy.ndarray' object has no attribute 'type'
  </code></pre>
  
  <p>Do you have any thoughts about this issue ?</p>
  
  <p>Thanks a lot for your answers.</p>