예제 #1
0
 /// <summary>
 /// Release the unmanaged memory associated with this EigenFaceRecognizer
 /// </summary>
 protected override void DisposeObject()
 {
     if (_sharedPtr == IntPtr.Zero)
     {
         FaceInvoke.cveEigenFaceRecognizerRelease(ref _sharedPtr);
     }
     base.DisposeObject();
 }
예제 #2
0
 /// <summary>
 /// Create an EigenFaceRecognizer
 /// </summary>
 /// <param name="numComponents">The number of components</param>
 /// <param name="threshold">The distance threshold</param>
 public EigenFaceRecognizer(int numComponents = 0, double threshold = double.MaxValue)
 {
     _ptr = FaceInvoke.cveEigenFaceRecognizerCreate(numComponents, threshold, ref _faceRecognizerPtr, ref _basicFaceRecognizerPtr, ref _sharedPtr);
 }