i am running face detection in emgucv. I used this code but it is not working... i mean that it doesnot detect ant face and returns ZERO faces. its getting me crazy because i tried every thing.
my system is X64 and Win7. "i thought there must be a bug in emgu code".
please for the sake of god some on help me!
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
HaarCascade haar = new HaarCascade("haarcascade_frontalface_alt_tree.xml");
Image<Bgr, Byte> image = new Image<Bgr, byte>("lena.jpg");
Image<Gray, Byte> gray = image.Convert<Gray, Byte>();
var faces = gray.DetectHaarCascade(haar,1.4, 4,HAAR_DETECTION_TYPE.DO_CANNY_PRUNING,new Size(30,30))[0];
foreach (var face in faces)
image.Draw(face, new Bgr(255, 0, 0), 3);
MessageBox.Show(faces.Length.ToString());
pictureBox1.Image = image.ToBitmap();
}
}
}
help,help,...