title: Numpy 8-bits images conversion to 16/32-bits images before cvtColor() in opencv
body: <p>I was doing some testing based on my understanding from reading the documentation but stumble upon this.</p>
  
  <p>Source: <a href="https://stackoverflow.com/questions/24444334/numpy-convert-8-bit-to-16-32-bit-image">NumPy convert 8-bit to 16/32-bit image</a>   </p>
  
  <pre><code> i = cv2.imread(imgNameIn, cv2.CV_LOAD_IMAGE_COLOR) # Need to be sure to have a 8-bit input
   img = np.array(i, dtype=np.uint16) # This line only change the type, not values
   img *= 256 # Now we get the good values in 16 bit format
  </code></pre>
  
  <p>But from what I read here
  <a href="http://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html" rel="nofollow noreferrer">http://docs.opencv.org/2.4/modules/imgproc/doc/miscellaneous_transformations.html</a> </p>
  
  <p>To scale down from 32bits to 8 bits one have to divide by 255 instead of 256 mentioned above which I got from the other post? This code below is what I am trying to play around with.</p>
  
  <p>Would appreciate if anyone able to check if I have done the scaling correctly.
  <strong>I am asking this question mainly to confirm whether the supposed casting value is 255 or 256?</strong></p>