title: Face Detection on a video file
body: <p>I want to detect face from an input video file using "haar cascade". I have converted the video into frames using this code. Please tell me how to detect face from these frames and mark it in a rectangular border. </p>
  
  <pre><code> private void button1_Click(object sender, EventArgs e)
      {
          OpenFileDialog openFileDialog1 = new OpenFileDialog();
          if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
          {
  
                  memde = new MediaDetClass();
                  System.IO.Directory.CreateDirectory("temp");
                  memde.Filename = openFileDialog1.FileName;
                  int len = (int)memde.StreamLength;
                  counter = 0;
                  Image img;
                  memde.Filename = openFileDialog1.FileName;
                  memde.CurrentStream = 0;
                  float percent = 0.002f;
                  Image&lt;Gray, byte&gt; gray;
                  for (float i = 0.0f; i &lt; len; i = i + (float)(percent * len))
                  {
                      counter++;
                      string fbitname = storagepath + counter.ToString();
                      memde.WriteBitmapBits(i, 850, 480, fbitname + ".bmp");
  
                      }
                  }
          }
      }
  </code></pre>