title: Display opencv's mat (CV_8UC1) in picturebox
body: <p>I apologize for dullness of my question but I have spent about 3 days searching for an answer and still no results. 
  I need to display images in PictureBox (Visual Studio 2012) as they are feeded to me from cameras. 
  I am using OpenCV cv::mat to store the incoming data, pixelformat is CV_8UC1 (grayscale).</p>
  
  <p>I am using this </p>
  
  <pre><code>cams-&gt;list[i]-&gt;output_Img.convertTo(temp, CV_16UC1);
  </code></pre>
  
  <p>to convert(I hope) my 8bit one channel format to 16bit</p>
  
  <p>and this</p>
  
  <pre><code>Bitmap ^srcBmp;
  srcBmp = gcnew Bitmap(temp.size().width
  ,temp.size().height
  ,temp.step
  ,System::Drawing::Imaging::PixelFormat::Format16bppGrayScale
  ,(System::IntPtr)temp.data);
  </code></pre>
  
  <p>to get a bitmap which can be displayed in picturebox.</p>
  
  <p>But the picturebox keeps failing to display the image (white box with red x over it).
  I had marginal success when I used PixelFormat::Format8bppIndexed,
  this displayed the image but not in a grayscalse (colors were present), and I was unable to sucessfully modify the color palette. 
  Could somebody help me please?</p>
  
  <p>This is my first time posting here I apologize if the question is posted incorrectly</p>