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.Screenshots/Threshold/ThresholdProcessor.cs
T
2023-11-14 14:52:19 +01:00

21 lines
442 B
C#

using ImageMagick;
namespace Ocr.Tesseract.Screenshots.Threshold;
public class ThresholdProcessor : SingleImageProcessor
{
private readonly Percentage _percentage;
public ThresholdProcessor(int percentage)
{
_percentage = new Percentage(percentage);
}
/// <inheritdoc />
protected override MagickImage Process(MagickImage image)
{
image.Threshold(_percentage);
return image;
}
}