using ImageMagick;
using Lookup.Memory;
using Ocr.Tesseract.Models;
using Process.Interface;
namespace Common;
///
/// Scanner class, scanning s for s
/// via optical character recognition. Optimized for digital Screenshots.
///
public class ScreenshotScanner
{
///
/// The screenshot processor
///
protected IProcessor Processor { get; }
///
/// Data storage
///
public Lookup.Interface.ILookup Lookup { get; } =
new MemoryLookup();
///
/// Constructor
///
public ScreenshotScanner(IProcessor processor)
{
Processor = processor;
}
///
/// Process the provided and add the results to
/// the
///
/// The s to process
public void Process(IEnumerable images)
{
foreach (var kv in Processor.Process(images))
{
Lookup.Add(kv.Word, kv.Image);
}
}
}