Dylan McCabe

Dylan McCabe

  • NA
  • 3
  • 556

Problem implementing Haar Cascade car

May 24 2018 1:17 PM
Hi everyone,
I've been trying to implement Haar Cascade car classifer lass in order to detection vehicles in a video. However I can't seem to find anything on this. I'm new to Haar Cascade and EmguCV. Any help would be much appreciated, thanks in advance. All I have been able to find so far is:
public class HaarCascade : ICloneable
{
String path = @"C:\Users\Dylan\car.xml";
HaarCascade cascade1 = HaarCascade.FromXml(path);
Image<Bgr, Byte> frame = new Image<Bgr, Byte>(bitmap);
Image<Gray, Byte> grayFrame = frame.Convert<Gray, Byte>();
var cars = haar.DetectMultiScale(grayFrame, 1.5, 20, new System.Drawing.Size(10, 10), new System.Drawing.Size(80, 80));
foreach (var car in cars);
frame.Draw((Rectangle)car, new Bgr(255.0, 0, 0), 2);
}