This repository has been archived on 2024-06-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
thesis-src/Ocr/Ocr.Tesseract/ImageProcessor.cs
2023-08-10 09:04:36 +02:00

38 lines
975 B
C#

using ImageMagick;
using Ocr.Tesseract.Interface;
using Process.Abstract;
using System.Collections.Generic;
using System.Linq;
namespace Ocr.Tesseract;
/// <summary>
/// Applies various transformation the the input images
/// </summary>
public abstract class ImageProcessor : Processor<MagickImage, MagickImage>
{
/// <summary>
/// Image processing configuration
/// </summary>
public IImageProcessorConfiguration Configuration { get; set; }
/// <inheritdoc/>
protected ImageProcessor(IImageProcessorConfiguration configuration)
{
Configuration = configuration;
}
/// <inheritdoc cref="Process(IEnumerable{MagickImage})" />
public abstract IEnumerable<MagickImage> Process(MagickImage value);
#region Overrides of Processor<MagickImage,IMagickImageValueProcessorSettings>
/// <inheritdoc />
public override IEnumerable<MagickImage> Process(IEnumerable<MagickImage> inputs)
{
return inputs.SelectMany(Process);
}
#endregion
}