Aspose.OCR for Python via Java API docs
Loading...
Searching...
No Matches
ImageProcessing Class Reference

Helper class for Aspose OCR library. More...

Static Public Member Functions

 save (images, folderPath)
 Use image processing to improve the accuracy of OCR.
 

Detailed Description

Helper class for Aspose OCR library.

Allows to preprocess and save images.

Member Function Documentation

◆ save()

save (   images,
  folderPath 
)
static

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.

filters = new PreprocessingFilter();
filters.add(PreprocessingFilter.auto_dewarping());
filters.add(PreprocessingFilter.invert());
filters.add(PreprocessingFilter.threshold(150));
filters.add(PreprocessingFilter.binarize());
filters.add(PreprocessingFilter.rotate(180));
filters.add(PreprocessingFilter.scale(6));
filters.add(PreprocessingFilter.dilate());
images = OcrInput(InputType.PDF, filters);

You don't need all of them. Set only what you need.

Parameters
imagesOcrInput object containing different images OcrInput.
folderPathPath without image names for saving processed images.
Returns
: OcrInput object containing result processed images OcrInput.