Contrast correction

Contents
[ ]

Low contrast and blurring are the most typical distortions when text is photographed with a smartphone camera, especially in low light conditions. They make it difficult for the OCR algorithms to operate successfully, significantly reducing the recognition accuracy.

Aspose.OCR for JavaScript via C++ can automatically increase the contrast of images before proceeding to recognition.

To automatically increase the image contrast before recognition, set auto_contrast recognition setting to true.

var settings = Module.WasmAsposeOCRRecognitionSettings();
settings.auto_contrast = true;
Low-contrast image High-contrast image

Usage scenarios

Automatic contrast adjustment is recommended for the following images:

  • Photos, especially those taken in low light conditions without optical or digital image stabilization.
  • Old papers.
  • Text on a background.