title: ValueError: need more than 2 values to unpack - When reading GRAYSCALE
body: <p>I am reading an image from a string like this. I know the image is in GrayScale. </p>
  
  <pre><code>nparr = np.fromstring(image_string, np.uint8)
  roi = cv2.imdecode(nparr,cv2.IMREAD_GRAYSCALE)
  </code></pre>
  
  <p>But I am getting an error when I get the <code>shape</code> of the image</p>
  
  <pre><code>h,w,d = roi.shape #gives error 
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>    h, w, d = roi.shape
  ValueError: need more than 2 values to unpack
  </code></pre>
  
  <p>If I change <code>cv2.IMREAD_GRAYSCALE</code> to <code>cv2.IMREAD_COLOR</code> then I don't get the error but I believe doing this changes my image slightly because I get different results when I do further processing on it. </p>