title: Capturing an image with Emgu - black image
body: <p>I'm a newbie in emgu cv and for a major project I'm trying to capture an image from a webcam and show it in an image box, but it's showing a black image. </p>
  
  <p>What is wrong with the following code?</p>
  
  <pre><code>using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using Emgu.CV;
  using Emgu.CV.Structure;
  using Emgu.CV.UI;
  using Emgu.Util;
  
  namespace WindowsFormsApplication7
  {
      public partial class Form1 : Form
      {
          private Capture capture;
  
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              if (capture == null)
                 capture = new Capture();
              Image&lt;Bgr,Byte&gt; img=capture.QueryFrame();
              imageBox1.Image = img;                 
          }
      }
  }
  </code></pre>