public void MergeFaces() { Debug.Log(FaceAPIManager.Instance); FaceAPIManager.Instance.OnDetect += OnDetectSource; sourceFace = null; warpToFace = null; FaceAPIManager.Instance.Detect(sourceImage); FaceAPIManager.Instance.Detect(warpToImage); }
private void OnDetectSource(object sender, FaceAPIEventArgs args) { if (args.OriginalImage == sourceImage) { sourceFace = args.FacesDetected[0]; } else { warpToFace = args.FacesDetected[0]; } // If we have both face dimensions, let's warp them! if (sourceFace != null && warpToFace != null) { WarpFaces(); } }