Beispiel #1
0
        private void SaveFaceLandmarkData(PXCMFaceData.Face face)
        {
            FacialLandmarks flm = new FacialLandmarks();

            flm.updateData(face);
#if DEBUG
            //Console.WriteLine(flm.ToString());
#endif
            // dbhelper.saveEntity(flm);
            Console.WriteLine(flm.ToString());
        }
Beispiel #2
0
        /// <summary>
        /// 获取实时面部特征数据
        /// </summary>
        /// <returns></returns>
        public FacialLandmarks GetFaceLandmarks()
        {
            int nFace = faceData.QueryNumberOfDetectedFaces();

            if (nFace == 0)
            {
#if DEBUG
                //Console.WriteLine("No face in current frame");
#endif
                return(null);
            }
            this.face = this.faceData.QueryFaceByIndex(0);

            FacialLandmarks flm = new FacialLandmarks();
            flm.updateData(face);
            // string s = flm.ToString();
            //string[] ss = s.Split(' ');
            // Console.WriteLine(ss.Length.ToString());
            return(flm);
        }