Exemplo n.º 1
0
        private static void runFaceAPI(
            string _filePath,
            out FaceRectangle[] _rects,
            out FaceLandmarks[] _landmarks)
        {
            string  key          = "1cdb412565ae43879ea8133525e89040";
            FaceAPI faceAPI      = new FaceAPI(key);
            var     detectResult = faceAPI.detectFaces(_filePath);

            Task.WaitAll(detectResult);
            if (detectResult.Result)
            {
                _rects     = faceAPI.getFaceRectangles();
                _landmarks = faceAPI.getFaceLandmarks();
            }
            else
            {
                _rects     = new FaceRectangle[0];
                _landmarks = new FaceLandmarks[0];
            }
        }
Exemplo n.º 2
0
 private static void runFaceAPI(
     string _filePath, 
     out FaceRectangle[] _rects, 
     out FaceLandmarks[] _landmarks)
 {
     string key = "1cdb412565ae43879ea8133525e89040";
     FaceAPI faceAPI = new FaceAPI(key);
     var detectResult = faceAPI.detectFaces(_filePath);
     Task.WaitAll(detectResult);
     if (detectResult.Result)
     {
         _rects = faceAPI.getFaceRectangles();
         _landmarks = faceAPI.getFaceLandmarks();
     }
     else
     {
         _rects = new FaceRectangle[0];
         _landmarks = new FaceLandmarks[0];
     }
 }