all,
I just tried the face detection example in latest version of Emgu CV, And my program works well, but i cannot have any faces from either image or the webcam live captures.
My OS is windows 8 Enterprise x64. And my IDE is VS2012.
BTW, I also tried HaarCascade and CascadeClassifier. Neither of them can get a result. The returned variable's value will always be {Emgu.CV.Structure.MCvAvgComp[0]}
cap = new Capture(0);
// adjust path to find your xml
//ccf = new CascadeClassifier("D:\\haarcascade_frontalface_alt_tree.xml");
haar = new HaarCascade("D:\\haarcascade_frontalface_alt_tree.xml");
Image inputImg = Image.FromFile(@"D:\1.jpg");
Image<Bgr, byte> imageFrame = new Image<Bgr, byte>(new Bitmap(inputImg));
if (imageFrame != null) {
Image<Gray, byte> grayFrame = imageFrame.Convert<Gray, byte>();
var faces = grayFrame.DetectHaarCascade(haar, 1.1, 10, HAAR_DETECTION_TYPE.DO_CANNY_PRUNING, new Size(20, 20))[0];
foreach (var face in faces) {
imageFrame.Draw(face.rect, new Bgr(Color.Green), 3);
}
}
pictureBox1.Image = imageFrame.ToBitmap();
Any thoughts or help? Thank you very much.
Solved thank you.