Example #1
0
        public void ReaddataByFrame(string path, int n)
        {
            if (path == null)
            {
                return;
            }
            int          i  = 1;
            StreamReader sr = new StreamReader(path, Encoding.Default);
            string       line;

            while (((line = sr.ReadLine()) != null))
            {
                if (i == n)
                {
                    break;
                }
                i++;
            }
            string[] strArray = line.Split('\t');
            SavaData(strArray);

            FeatureEuclidean firstfacedata = new FeatureEuclidean(_firstfacedata);
            FeatureEuclidean nowfacedata   = new FeatureEuclidean(_nowfacedata);

            CatureFeature(nowfacedata, n);
            CatureFeature(firstfacedata, nowfacedata);

            Recongnize rec = new Recongnize();//识别类

            rec.DeltaEulidean(firstfacedata, nowfacedata);

            _result = rec.GetResult;
        }
Example #2
0
        private void ReaddataAllFrame(string path, int n)
        {
            _resultList.Clear();

            if (path == null)
            {
                return;
            }
            int          i = 1, tag = 0;
            StreamReader sr = new StreamReader(path, Encoding.Default);
            string       line;

            while (((line = sr.ReadLine()) != null))
            {
                if (i == n)
                {
                    break;
                }

                string[] strArray = line.Split('\t');
                SavaData(strArray);

                FeatureEuclidean firstfacedata = new FeatureEuclidean(_firstfacedata);
                FeatureEuclidean nowfacedata   = new FeatureEuclidean(_nowfacedata);
                CatureFeature(nowfacedata, n);
                CatureFeature(firstfacedata, nowfacedata);

                Recongnize rec = new Recongnize();//识别类
                rec.DeltaEulidean(firstfacedata, nowfacedata);

                if (rec.GetResult != "Normal")
                {
                    //    tag = 1;
                    //if(tag==1)
                    _resultList.Add(rec.GetResult);
                }

                i++;
            }



            _result = ReturnAnsRate(_resultList);

            int di = 0;
        }