20 lines
498 B
C#
20 lines
498 B
C#
using ImageMagick;
|
|
using Ocr.Tesseract.Extensions;
|
|
|
|
namespace Ocr.Tesseract.Screenshots.Threshold;
|
|
|
|
public class ThresholdAdaptiveProcessor : SingleImageProcessor
|
|
{
|
|
private readonly int _width;
|
|
private readonly int _height;
|
|
|
|
public ThresholdAdaptiveProcessor(int width, int height)
|
|
{
|
|
_width = width;
|
|
_height = height;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override MagickImage Process(MagickImage image) => image
|
|
.ThresholdAdaptive(_width, _height);
|
|
} |