Class ImageProcessing

Class ImageProcessing

Namespace: Aspose.OCR
Assembly: Aspose.OCR.dll (25.1.0)

Aspose OCR 库的辅助类。允许对图像进行预处理并保存。

public static class ImageProcessing

继承

objectImageProcessing

继承成员

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

方法

Render(OcrInput)

使用图像处理来提高 OCR 的准确性。
创建一个将按您指定的顺序应用于输入图像的过滤器列表。
创建过滤器的示例:
PreprocessingFilter filters = new PreprocessingFilter
{
PreprocessingFilter.Invert(),
PreprocessingFilter.Threshold(150),
PreprocessingFilter.Binarize(),
PreprocessingFilter.Rotate(180),
PreprocessingFilter.Resize(3000,3000, Aspose.OCR.Filters.InterpolationFilterType.Box),
PreprocessingFilter.Scale(6f),
PreprocessingFilter.Dilate()
};
您不需要全部设置。只需设置您需要的即可。

public static OcrInput Render(OcrInput images)

参数

images OcrInput

包含不同图像的 OcrInput 对象 Aspose.OCR.OcrInput。

返回

OcrInput

包含处理后图像结果的 OcrInput 对象,位于流字段中。Aspose.OCR.OcrInput。

Save(OcrInput, string)

使用图像处理来提高 OCR 的准确性。
创建一个将按您指定的顺序应用于输入图像的过滤器列表。
创建过滤器的示例:
PreprocessingFilter filters = new PreprocessingFilter
{
PreprocessingFilter.Invert(),
PreprocessingFilter.Threshold(150),
PreprocessingFilter.Binarize(),
PreprocessingFilter.Rotate(180),
PreprocessingFilter.Resize(3000,3000, Aspose.OCR.Filters.InterpolationFilterType.Box),
PreprocessingFilter.Scale(6f),
PreprocessingFilter.Dilate()
};
您不需要全部设置。只需设置您需要的即可。

public static OcrInput Save(OcrInput images, string folderPath)

参数

images OcrInput

包含不同图像的 OcrInput 对象 Aspose.OCR.OcrInput。

folderPath string

不带图像名称的路径,用于保存处理后的图像。

返回

OcrInput

包含处理后图像结果的 OcrInput 对象 Aspose.OCR.OcrInput。

 中文