AsposeOcr.PreprocessImage

PreprocessImage(string, PreprocessingFilter)

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

public MemoryStream PreprocessImage(string fullPath, PreprocessingFilter filters)
范围类型描述
fullPathString图片的完整路径。
filtersPreprocessingFilter图像优化过滤器PreprocessingFilter.

返回值

使用修改后的图像流式传输,以便您可以保存或识别它。

也可以看看


PreprocessImage(MemoryStream, PreprocessingFilter)

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

public MemoryStream PreprocessImage(MemoryStream stream, PreprocessingFilter filters)
范围类型描述
streamMemoryStream包含图像的内存流。
filtersPreprocessingFilter图像优化过滤器PreprocessingFilter.

返回值

使用修改后的图像流式传输,以便您可以保存或识别它。

也可以看看