title: How to change numpy array into grayscale opencv image
body: <p>How can I change numpy array into grayscale opencv image in python?
  After some processing I got an array with following atributes: max value is: 0.99999999988,
  min value is 8.269656407e-08 and type is: <code>&lt;type 'numpy.ndarray'&gt;</code>. I can show it as an image using <code>cv2.imshow()</code> function, but I can't pass it into <code>cv2.AdaptiveTreshold()</code> function because it has wrong type:</p>
  
  <pre><code>error: (-215) src.type() == CV_8UC1 in function cv::adaptiveThreshold
  </code></pre>
  
  <p>How can I convert this np.array to correct format? </p>