title: How to work with 16 bit grayscale in OpenCV?
body: <p>I can't find the answers to the these questions:</p>
  
  <ol>
  <li><p>Can I use OpenCV to display 16-bit grayscale pictures? I tried <code>imshow()</code> but nothing appeared on the windows created by OpenCV.</p></li>
  <li><p>How can I convert a 16-bit grayscale picture to a B5G6R5 picture? What parameter should I create <code>cv::Mat</code> with in order to store this structure? I tried <code>cv::cvtColor(m_cvTmp, tmp, CV_GRAY2BGR565)</code> but this function kept crashing. The <a href="http://opencv.willowgarage.com/documentation/cpp/miscellaneous_image_transformations.html" rel="noreferrer">documentation on miscellaneous image transformations</a> does not tell the answer.</p></li>
  </ol>
  
  <p>PS: the image I want to process is already in the memory.</p>