using DlibDotNet; using View_by_Distance.FaceRecognitionDotNet.Models; using View_by_Distance.Shared.Models; namespace View_by_Distance.FaceRecognitionDotNet.Extensions; /// /// An abstract base class that provides functionality to detect face locations from image. /// public abstract class FaceDetector : DisposableObject { #region Methods internal IEnumerable Detect(Image image, int numberOfTimesToUpsample) => RawDetect(image.Matrix, numberOfTimesToUpsample); /// /// Returns an enumerable collection of face location correspond to all faces in specified image. /// /// The matrix contains a face. /// The number of times to up-sample the image when finding faces. /// An enumerable collection of face location correspond to all faces. protected abstract IEnumerable RawDetect(MatrixBase matrix, int numberOfTimesToUpsample); #endregion }