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.

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 Twitter
UI Vision Free RPA Software
Copyfish OCR Browser Extension
Selenium IDE for Chrome
Try UI.Vision, our OCR-powered Robotic Process Automation (RPA) software. It is available as free browser extension for Chrome and Firefox (OSI-certified Open-Source) plus computer-vision extension modules. UI.Vision is fun to use - and its Cloud Vision OCR 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.