Beispiel #1
0
 public BitmapRecognitionJob(IConfiguredTesseractEngineFactory engineFactory, IStoredImageFile imageFile, IEnumerable <IPreprocessor> preprocessors, IPixFactory pixFactory)
 {
     _engineFactory = engineFactory ?? throw new ArgumentNullException(nameof(engineFactory));
     _imageFile     = imageFile ?? throw new ArgumentNullException(nameof(imageFile));
     _preprocessors = preprocessors ?? throw new ArgumentNullException(nameof(preprocessors));
     _pixFactory    = pixFactory ?? throw new ArgumentNullException(nameof(pixFactory));
 }
Beispiel #2
0
 public PdfRecognitionJob(
     IConfiguredTesseractEngineFactory engineFactory,
     IStoredImageFile imageFile,
     IEnumerable <IPreprocessor> preprocessors,
     IPdfDocumentFactory pdfDocumentFactory,
     IPixFactory pixFactory,
     IImageFileStorage storage)
 {
     _engineFactory      = engineFactory ?? throw new ArgumentNullException(nameof(engineFactory));
     _pdfFile            = imageFile ?? throw new ArgumentNullException(nameof(imageFile));
     _preprocessors      = preprocessors ?? throw new ArgumentNullException(nameof(preprocessors));
     _pdfDocumentFactory = pdfDocumentFactory ?? throw new ArgumentNullException(nameof(pdfDocumentFactory));
     _pixFactory         = pixFactory ?? throw new ArgumentNullException(nameof(pixFactory));
     _storage            = storage ?? throw new ArgumentNullException(nameof(storage));
 }
 public IRecognitionJob Create(ImageFileTypes fileType, IStoredImageFile file, IConfiguredTesseractEngineFactory engineFactory, IEnumerable <IPreprocessor> preprocessors) =>
 fileType switch
 {