title: OpenCV Convert Bitmap to Mat
body: <p>I'm working with c# and OpenCV. I have a Bitmap that I want to write as a frame of video using the VideoWriter provided by OpenCV.  I've done this in Python so know it will work.  I just need the conversion step from Bitmap to Mat.</p>
  
  <p>My (partial) code looks roughly like this...</p>
  
  <pre><code>VideoWriter video = new VideoWriter(filename, fps, frameSize, false);
  Bitmap image = SomethingReturningABitmap();
  // NEED CONVERT FROM Bitmap to Mat
  Mat frame = new Mat();
  video.Write(frame);
  </code></pre>