ImageProcessing

Inheritance: java.lang.Object

public class ImageProcessing

Helper class for Aspose OCR library. Allows to preprocess and save images.

Constructors

ConstructorDescription
ImageProcessing()

Methods

MethodDescription
Save(OcrInput images, String folderPath)Use image processing to improve the accuracy of OCR.
Render(OcrInput images)Use image processing to improve the accuracy of OCR.

ImageProcessing()

public ImageProcessing()

Save(OcrInput images, String folderPath)

public static OcrInput Save(OcrInput images, String folderPath)

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(); filters.add(PreprocessingFilter.AutoDewarping()); filters.add(PreprocessingFilter.Invert()); filters.add(PreprocessingFilter.Threshold(150)); filters.add(PreprocessingFilter.Binarize()); filters.add(PreprocessingFilter.Rotate(180)); filters.add(PreprocessingFilter.Scale(6f)); filters.add(PreprocessingFilter.Dilate()); You don’t need all of them. Set only what you need.

Parameters:

ParameterTypeDescription
imagesOcrInputOcrInput object containing different images @see #OcrInput.
folderPathjava.lang.StringPath without image names for saving processed images.

Returns: OcrInput - OcrInput object containing result processed images @see #OcrInput.

Render(OcrInput images)

public static OcrInput Render(OcrInput images)

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(); filters.add(PreprocessingFilter.AutoDewarping()); filters.add(PreprocessingFilter.Invert()); filters.add(PreprocessingFilter.Threshold(150)); filters.add(PreprocessingFilter.Binarize()); filters.add(PreprocessingFilter.Rotate(180)); filters.add(PreprocessingFilter.Scale(6f)); filters.add(PreprocessingFilter.Dilate()); You don’t need all of them. Set only what you need.

Parameters:

ParameterTypeDescription
imagesOcrInputOcrInput object containing different images @see #OcrInput.

Returns: OcrInput - OcrInput object containing result processed images @see #OcrInput in Image field.