the program does not recognize objects

asked 2014-03-31 10:36:53 -0500

John Smith gravatar image

updated 2018-09-03 13:56:33 -0500

My learning: cd C:\Downloads\opencv\build\x64\vc12\bin opencv_createsamples.exe -info good.dat -vec good.vec -w 50 -h 50 -num 195 opencv_traincascade.exe -data haarcascade -vec good.vec -bg negatives.dat -numStages 25 -minhitrate 0.7 -maxFalseAlarmRate 0.5 -numPos 195 -numNeg 448 -w 50 -h 50 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024 My program: using System; using System.Drawing; using Emgu.CV; using Emgu.CV.Structure;

namespace includer
{
    class Program
    {
        static void Main(string[] args)
        {
            ProcessFrame();
            System.Console.ReadKey();
        }

        internal static String faceFileName = "cascade.xml";


        private static void ProcessFrame()
        {
            Image<Bgr, Byte> frame = new Image<Bgr, Byte>("006.jpg");
            CascadeClassifier face = new CascadeClassifier(faceFileName);
            Image<Gray, Byte> gray = frame.Convert<Gray, Byte>();


                Rectangle[] facesDetected2 = face.DetectMultiScale(
                        gray,
                        1.1,
                        4,
                        new Size(60, 60),
                        new Size(150,150));

                foreach (Rectangle f in facesDetected2)
                {
                    frame.Draw(f, new Bgr(Color.Blue), 2);
                }

            frame.Save("result.jpg");

        }
    }
}

the problem is that the program is not in a recognizable object on any of the images from a set positives

My files: http://www.datafilehost.com/d/d7603af5

What am I doing wrong ?

edit retag flag offensive close merge delete