Answer the question
In order to leave comments, you need to log in
When starting OpenCV, it writes an Emgu.CV.Util.CvException error. How to fix??
I downloaded the XML file from Github OpenCV , but it still writes an error when starting
Emgu.CV.Util.CvException: "OpenCV: C:\User\...\haarcascade_frontalface_alt.xml(1): Valid XML should start with '<?xml ...?>'"
using Emgu.CV;
using Emgu.Util;
using Emgu.CV.Structure;
HaarCascade faceCascade = new HaarCascade("haarcascade_frontalface_alt.xml");
Image<Bgr, Byte> image = _capture.QueryFrame();
Image<Gray,double> IntegralImage = image.Convert<Gray, double>(); //Интегральное изображение, строим средствами OpenCV
var Face = IntegralImage.DetectHaarCascade(faceCascade)[0];
foreach (var face in Face)
{
image.Draw(face.rect, new Bgr(255, 255, 255), 10);
}
VideoWindow.Image = image;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question