title: How to visualize a 16-bit grayscale image with cv2.imshow()?
body: <p>I have a set of grayscale drone images in <code>tiff</code> format having 16-bit resolution where a person can be seen moving. How can I visualize these images in OpenCV as a normal image, so that I can see the information within the image in OpenCV? Currently, when I try to read and show the image, I see a black image.</p>
  
  <pre class="lang-py prettyprint-override"><code>import argparse
  import cv2
  
  ap = argparse.ArgumentParser()
  ap.add_argument("-i", "--image", required = True, help = "Path to the image")
  args = vars(ap.parse_args())
  
  image = cv2.imread(args["image"],IMREAD_ANYCOLOR | IMREAD_ANYDEPTH)
  
  cv2.imshow("image", image)
  cv2.waitKey(0)
  </code></pre>
  
  <p>I have tried the above code, but it still displays a complete black image. However, when I convert the image to a <code>png</code> and then use the above code, then it works fine which I do not want to do due to loss of information.</p>
  
  <p>Here is the link to sample image. All images contain different information.</p>
  
  <p><a href="https://filebin.net/n3oidsqn70eq8a9x/gelmer_gas_0_Raw_316_4245_2942_1455208775.tif?t=c2m8vnsn" rel="nofollow noreferrer">https://filebin.net/n3oidsqn70eq8a9x/gelmer_gas_0_Raw_316_4245_2942_1455208775.tif?t=c2m8vnsn</a></p>
  
  <p>The image should be like the below. This was opened with another software just for visual purpose</p>
  
  <p><a href="https://i.stack.imgur.com/slQyc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/slQyc.png" alt="enter image description here"></a></p>