title: How to use `cv2.imshow` correctly for the float image returned by `cv2.distanceTransform`?
body: <p>Something weird is going on with cv2.imshow. I was writing a piece of code and wondering why one of my operations wasn't working (as diagnosed by observing cv2.imshow). In exasperation I ended up writing the very same image to a file wherein it looks fine. Why is cv2.imshow showing a binary image (first image below) while cv2.imwrite writing the grayscale image as intended (second image)? I've never had problems with displaying grayscale images before!</p>
  
  <pre><code>cv2.imshow('Latest', image)
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  
  distTransform = cv2.distanceTransform(src=image,distanceType=cv2.DIST_L2,maskSize=5)
  cv2.imwrite('distanceTransform.png', distTransform)
  
  cv2.imshow('Latest', distTransform)
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>This is the image as it's displayed by cv2.imshow:
  <a href="https://i.stack.imgur.com/23h9A.png" rel="noreferrer"><img src="https://i.stack.imgur.com/23h9A.png" alt="distanceTransform.png as displayed by cv2.imshow (also the same as the input image)"></a></p>
  
  <p>This is the image as it's saved by imwrite:
  <a href="https://i.stack.imgur.com/rx8KW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rx8KW.png" alt="distanceTransform.png as written by imwrite"></a></p>