Candice Cheng
Product Manager
Published July 15, 2026
Updated July 15, 2026
4 min
Scanbot Document Scanner SDK Adds Document Straightening for More OCR‑Friendly Capture
Candice Cheng
Product Manager

Summary: Scanbot SDK has introduced Document Straightening and Color Document Shadow Removal to address 3D distortions and uneven lighting to increase accuracy. By correcting page curvature and normalizing contrast, these features enhance OCR performance on real-world, imperfect scans for both new captures and existing image processing pipelines.

The perfect document is a myth. In the real world, documents are often captured quickly under less-than-ideal conditions: held by hand, photographed at an angle, or without a flat surface, especially in fast-paced workflows like logistics and field services. The result is warped texts and reduced contrast that may look acceptable to the human eye but significantly impact machine readability.
In our internal test dataset, raw captures without advanced processing allowed Tesseract and PaddleOCR to extract only 14% and 42% of content respectively.
Standard document processing helps, but only up to a point. Auto-cropping can detect and correct alignment and rotation issues, but when pages are curved, text remains warped and OCR performance suffers. Binarization removes shadows but often reduces detail and introduces noise, making charts and logos harder to interpret and even damaging machine-readable elements like barcodes. Color-preserving filters avoid this trade-off but typically struggle to handle poor contrast caused by shadows.
Learn about the latest OCR updates for the Apryse Server SDK
Part of the Summer 2026 Release, the new Document Straightening and Color Document Shadow Removal filter address both limitations more holistically.
What Document Straightening Does
Document Straightening corrects the types of distortions that standard processing steps cannot fully resolve. Where auto-crop and auto-rotation correct the document boundary, Document Straightening extends this by correcting the 3D distortions of the page so text lines that were curved or skewed come out as horizontal inputs OCR systems are designed to process.
The Color Document Shadow Removal Filter addresses the other half of the problem. Uneven lighting, cast shadows, and the dark gradient from a phone held over a page all reduce contrast in low-light regions. The new filter normalizes lighting across the page, lifting text out of shadow, so it reads cleanly while preserving colored elements.
The result is not just a visually improved scan, but one that is significantly more machine-readable.
Improvements in OCR Accuracy
To better understand the impact of each processing step, we evaluated OCR performance across multiple stages of the capture pipeline.
Comparing Document Enhancers
Applying standard auto-crop and auto-rotation provides a strong baseline improvement by aligning document boundaries:
Tesseract | PaddleOCR | |
|---|---|---|
Raw input | 14.27% | 42.01% |
Auto-Crop | 52.98% | 69.96% |
Improvement | +38.71% | +27.95% |
While this step significantly improves results, it does not address surface distortion or lighting inconsistencies.
Adding Document Straightening further improves OCR accuracy by correcting warped text caused by curvature:
| Tesseract | PaddleOCR |
|---|---|---|
Auto-Crop | 52.98% | 69.96% |
Auto-Crop + Straighten | 63.99% | 79.40% |
Improvement | +11.01% | +9.44% |
This highlights the importance of correcting document geometry, particularly for captures where curvature distorts text even after alignment.
Comparing Image Filters
To address lighting, we compared the traditional binarization approach with the new color-preserving shadow removal filter, both applied after applying Straighten:
Processing Stage | Tesseract | PaddleOCR |
|---|---|---|
Binarization | 71.94% | 74.58% |
Color Shadow Removal | 73.55% | 79.30% |
Improvement | +1.61% | +4.72% |
Binarization improves OCR in some cases by increasing contrast, but it also introduces noise and removes color information. This can negatively affect document features such as charts, layouts, and barcodes.
The Color Document Shadow Removal filter delivers higher or comparable OCR accuracy while preserving color and avoiding these tradeoffs. This makes it a more reliable option across a wider range of real-world documents.
End-to-end Improvement
Combining Document Straightening with Color Shadow Removal delivers a substantial improvement in OCR accuracy:
- Tesseract: 14.27% → 73.55% (+59.28%)
- PaddleOCR: 42.01% → 79.30% (+37.29%)
How It Fits Your Existing Flow
For teams already using the Ready-to-Use UI, Straightening is enabled by default as part of the auto-cropping flow, with no additional configuration required. The Color Document Shadow Removal filter is a new option that can be used in place of existing filter options.
For teams not yet using Scanbot’s document capture, there are two straightforward ways to take advantage of these improvements:
- Integrate the Ready-to-Use UI into your mobile capture or upload flows:
The Ready-to-Use UI provides a prebuilt capture experience with auto-cropping, Straighten, and shadow removal already included, allowing you to improve capture quality without building custom processing logic. - Process existing images before OCR:
If you are working with documents that have already been captured or uploaded into your system, Scanbot’s document scanner can be applied as a preprocessing step. Auto-cropping, Straighten, and image filters such as Color Shadow Removal can be applied to these existing pages without requiring users to recapture them. This approach is particularly useful in backend or server-side workflows, where documents are ingested from uploads, scans, emails or external systems. Using the Scanbot Linux SDK and its available wrappers for C, Java, Python, and Node.js, these enhancements can be applied at scale before OCR processing.
The output can be exported as JPG, or PNG, which are formats OCR engines are designed to work with. This makes it straightforward to pass the processed output directly into the OCR engine of your choice.
Why It Matters
Warped documents and shadows degrade scan quality and lower OCR accuracy. They introduce friction throughout the entire document processing pipeline leading to:
- Higher manual review rates
- More rescan prompts for users
- Longer processing times
- Poorer user experiences
Document Straightening and enhanced shadow removal stop bad input from entering the pipeline by turning messy real-world captures into clean, structured inputs, making downstream OCR more reliable and improving the overall user experience. Get your 7-day trial license for Scanbot SDK to see for yourself.


