public async Task RunAll() { var filePath = "data/TLCShot.png"; var result = await multiOcrRunner.RunAllOcrEnginesOnImage(filePath, Language.English); Assert.IsNotNull(result); }
public async Task <IActionResult> GetAllOcrResultAsync(IFormFile file) { var results = await AspNetFileProcessorWrapper.ProcessFilesAsync( filePath => multiOcrRunner.RunAllOcrEnginesOnImage(filePath), file); return(Ok(results[0])); }
public async Task RunAllOcrs() { StandardOcrSettings standardOcrSettings = GetStandardOcrSettings(); MultiOcrRunner genericOcrRunner = await new StandardMultiOcrRunnerFactory(standardOcrSettings) .GetMultiOcrRunner(); Dictionary <string, GenericOcrResponse> results = await genericOcrRunner.RunAllOcrEnginesOnImage(@"data/abc.JPG"); Assert.IsNotNull(results); }
public async Task RunOcrsWithCache() { StandardOcrSettings standardOcrSettings = GetStandardOcrSettings(); var fullPath = Path.GetFullPath(@"..\Data\Cache\"); MultiOcrRunner multiOcrRunner = await new StandardMultiOcrRunnerFactory(standardOcrSettings, fullPath) .GetMultiOcrRunner(); Dictionary <string, GenericOcrResponse> results = await multiOcrRunner.RunAllOcrEnginesOnImage(@"data/abc.JPG"); Assert.IsNotNull(results); }