title: OpenCV detect if image file is colour prior to loading
body: <p>I know you can use imread to get an image into a numpy array.</p>
  
  <pre><code>cv2.imread(path,0) 
  </code></pre>
  
  <p>Loads a greyscale image and...</p>
  
  <pre><code>cv2.imread(path,1)
  </code></pre>
  
  <p>Loads a colour one.</p>
  
  <p>I can call the second one on a greyscale image and it returns a shape (y,x,3) hence it is still in the format of a colour image even though it has none.</p>
  
  <p>Is there a function in opencv to detect what colour format the file is in so I can call the right imread function.</p>