Pedestrian Detection in CSharp

From Emgu CV: OpenCV in .NET (C#, VB, C++ and more)
Jump to navigation Jump to search

System Requirement

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

Source code

using (HOGDescriptor hog = new HOGDescriptor())
   float[] desc = HOGDescriptor.GetDefaultPeopleDetector();
   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);


Pedestrian Detection