Пример #1
0
        /// <summary>
        /// Detects and tracks faces on ImageObject object.
        /// </summary>
        /// <param name="Image">[In]Pointer to Bitmap object.</param>
        /// <returns>Method returns list with tracking data or empty list when no faces found.</returns>
        public List <TRACK_ITEM> ProcessFrame(ImageObject IO)
        {
            List <TRACK_ITEM> Faces = new List <TRACK_ITEM>();

            FaceTracker_DetectFaces(IntObjPtr, IO.InnerPtr);
            int size = FaceTracker_GetDetectedCount(IntObjPtr);

            for (int i = 0; i < size; i++)
            {
                TRACK_ITEM temp = new TRACK_ITEM();
                FaceTracker_GetDetectedItem(IntObjPtr, i, ref temp);
                Faces.Add(temp);
            }
            FaceTracker_DetectReset(IntObjPtr);
            return(Faces);
        }
Пример #2
0
 private static extern FACE_DETECTION_RESULT FaceTracker_GetDetectedItem(IntPtr Tracker, int TrackInd, ref TRACK_ITEM rect);