Pedestrian Detection in CSharp

From Emgu CV: OpenCV in .NET (C#, VB, C++ and more)
Revision as of 03:31, 24 November 2010 by Inuxejiq (talk | contribs)
Jump to: navigation, search


UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY


CLICK HERE


System Requirement

Component Requirement Detail
Emgu CV Version 2.0.1.0 Available from SVN only
Operation System Cross Platform


Source code

<source lang="csharp"> using (HOGDescriptor hog = new HOGDescriptor()) {

  float[] desc = HOGDescriptor.GetDefaultPeopleDetector();
  hog.SetSVMDetector(desc);
  Image<Bgr, Byte> image = new Image<Bgr, byte>("pedestrian.png");
  Rectangle[] rects = hog.DetectMultiScale(image);
  foreach (Rectangle rect in rects)
  {
     image.Draw(rect, new Bgr(Color.Red), 1);
  }
  ImageViewer.Show(image);

} </source>

Result

Pedestrian Detection