Image preprocessing

The accuracy and reliability of text recognition is highly dependent on the quality of the original image. Aspose.OCR for JavaScript via C++ offers a large number of fully automated and manual image processing filters that enhance an image before it is sent to the OCR engine.

Each preprocessing filter increases the image processing time. The approximate amount of additional time required for pre-processing (as a percentage of the minimum image processing pipeline) is listed in the Performance Impact column.

Filter Action Performance impact Usage scenarios
Skew correction Automatically straighten images aligned at a slight angle to the horizontal. 12% Skewed images
Rotation Manually rotate severely skewed images. 7.5% Significantly rotated images
Noise removal Automatically remove dirt, spots, scratches, glare, unwanted gradients, and other noise from photos and scans. 175% extra time
38% more memory (1)
Photos
Old books
Newspapers
Postcards
Documents with stains and dirt
Contrast correction Automatically adjust the image contrast. 7.5% Photos
Old papers
Text on a background
Binarization Convert images to black and white automatically or manually adjust the criteria that determines whether a pixel is considered black or white. 0.9% (2) Used for text areas detection and most automatic image adjustments.

Applying multiple preprocessing filters

Multiple preprocessing filters can be applied to the same image to further improve the recognition quality. Note that each filter requires additional time and resources on the computer running the application. Do not add extra filters if you are satisfied with the recognition accuracy.

var settings = Module.WasmAsposeOCRRecognitionSettings();

Approximate increase of processing time: 0%