Class ImageProcessing
Namespace: Aspose.OCR
Assembly: Aspose.OCR.dll (25.2.0)
Helper class for Aspose OCR library. Allows to preprocess and save images.
public static class ImageProcessing
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
Render(OcrInput)
Use image processing to improve the accuracy of OCR. Create a list of filters that will be applied to the input image in the order you specify. example to create filters: 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() }; You don’t need all of them. Set only what you need.
public static OcrInput Render(OcrInput images)
Parameters
images
OcrInput
OcrInput object containing different images Aspose.OCR.OcrInput.
Returns
OcrInput object containing result processed images in stream field.Aspose.OCR.OcrInput.
Save(OcrInput, string)
Use image processing to improve the accuracy of OCR. Create a list of filters that will be applied to the input image in the order you specify. Example to create filters: 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() }; You don’t need all of them. Set only what you need.
public static OcrInput Save(OcrInput images, string folderPath)
Parameters
images
OcrInput
OcrInput object containing different images Aspose.OCR.OcrInput.
folderPath
string
Path without image names for saving processed images.
Returns
OcrInput object containing result processed images Aspose.OCR.OcrInput.