} // Model path system public FaceRecognizer(byte[] image, RgbPixel penColor, ModelPathSystem pathSystem) // Get image from bytes array { PathSystem = pathSystem; Image = image.ToArray2D(PathSystem); Color = penColor; }
public FaceRecognizer(string imageName, RgbPixel penColor, ModelPathSystem pathSystem) // Get image from image file { PathSystem = pathSystem; Image = Dlib.LoadImage <RgbPixel>(Path.Combine(PathSystem.InputsPath, imageName)); Color = penColor; }
public void Dispose() { Image.Dispose(); PathSystem = null; GC.SuppressFinalize(this); }