20 lines
414 B
C#
20 lines
414 B
C#
using ImageMagick;
|
|
|
|
namespace Ocr.Tesseract.Screenshots.Threshold;
|
|
|
|
public class AutoThresholdProcessor : SingleImageProcessor
|
|
{
|
|
private readonly AutoThresholdMethod _method;
|
|
|
|
public AutoThresholdProcessor(AutoThresholdMethod method)
|
|
{
|
|
_method = method;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override MagickImage Process(MagickImage image)
|
|
{
|
|
image.AutoThreshold(_method);
|
|
return image;
|
|
}
|
|
} |