public static AffdexAdapter CreateSingleton(FaceDetectorMode mode) { if (affdex == null) { affdex = new AffdexAdapter(mode); } return(affdex); }
public static AffdexAdapter CreateSingleton(FaceDetectorMode mode) { if (affdex == null) { affdex = new AffdexAdapter(mode); } affdex.OnFailure = null; affdex.OnSuccess = null; return(affdex); }
public PhotoHandler() { detecters = new IDetectAdapter[] { AffdexAdapter.CreateSingleton(FaceDetectorMode.LARGE_FACES), new MSAdapter() }; for (int i = 0; i < detecters.Length; i++) { detecters[i].OnSuccess += Det_OnSuccess; } for (int i = 0; i < detecters.Length - 1; i++) { int next = i + 1; detecters[i].OnFailure += (s, e) => detecters[next].Process(imageToProcess); } detecters.Last().OnFailure += Det_OnFailure; }