How to improve OCR results with scaling


The best input images for OCR have a resolution of around 300 DPI. Beyond that a higher DPI value does typically not improve the result further (it could even make it worse).

The problem: Most input images have a lower resolution. A screenshot is normally only 96 DPI and even a HiDPI screenshot is rarely more than 140 DPI. Scans are often only done in 75 DPI or 100 DPI to save drive space and improve performance and upload time.

The solution: All low DPI images and scans benefit from the built-in automatic image scaling of the OCR API. To activate it, check the "Auto-enlarge content" box on the front page. In the API call you can achieve the same by setting scale=true. Because most images benefit from auto-scaling, the parameter is checked by default on the online ocr page.

Important: For images and scans that are already "naturally" 200 DPI or 300 DPI, autoscaling is not needed and provides no benefit, and can even make the detection worse in some cases. So for images at are already high-resolution use scale=false in the api call.

Auto-Scaling Examples

The screenshot below shows the OCR result of a low-quality low-DPI book scan with and without scaling.

low-quality book scan OCR
scale=false

low-quality book scan OCR Text Result
scale=true

Below is another example, this time an excerpt of a 100 DPI magazine page scan.

low-quality PDF scan OCR
scale=false

low-quality PDF scan OCR Text Result
scale=true

Auto-Scaling with the Free PDF OCR API

scale = true enables the scaling in the API. For more information see the scale parameter section of the OCR API documentation.

View OCR API Performance
Our OCR Browser Extension
Open-Source RPA Software
Selenium IDE
Need to automate browser tasks like web testing or form filling? Check out our sister product Ui.Vision - a free and open-source RPA browser extension with over 100,000 users that leverages our computer vision and OCR.Space technology to power automation workflows.

Do you have an OCR API question? Please email us or visit the OCR API Forum - we love to answer OCR questions.