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
Follow OCR API on X/Twitter
Free Open-Source RPA Software
Copyfish OCR Browser Extension
Selenium IDE
Try UI.Vision RPA, our OCR-powered Robotic Process Automation (RPA) software. It is available as free browser extension as RPA Chrome and RPA Firefox (OSI-certified Open-Source) plus computer-vision extension modules. UI.Vision RPA is fun to use - and its OCR screen scraping features are powered by the OCR.space OCR API.

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