title: how to read image from a picturebox in EMGU CV
body: <p>I'm trying to read an image from a picturebox to perform feature matching using EMGU. Below is the code I'm using which I got from the sample project.</p>
  
  <pre><code>        Bitmap img = new Bitmap(pictureBox1.Image);
          Image&lt;Bgr, byte&gt; imgInput = new Image&lt;Bgr, byte&gt;(img);
  
          using (Mat modelImage = CvInvoke.Imread("C:\\model.jpg", ImreadModes.Color)) //works
          using (Mat observedImage = CvInvoke.Imread(imgInput, ImreadModes.Color)) //doesn't work
          {
              Mat result = DrawMatches.Draw(modelImage, observedImage, out matchTime);
              ImageViewer.Show(result, String.Format("Matched in {0} milliseconds", matchTime));
  
          }
  </code></pre>
  
  <p>When I give a path to CvInvoke.ImRead, it works, but if I create a bitmap and use that bitmap as the image, it gives an error saying CvInvoke.ImRead has some invalid arguments.</p>
  
  <p>How do I read the image from picturebox? </p>