The Parse LayerDocument parsing and OCR accuracy

Skew and Deskew Effects on OCR Accuracy in Scanned Documents

Tilted pages break OCR's line logic, and fixing them takes accurate angle detection.

Cover illustration for “Skew and Deskew Effects on OCR Accuracy in Scanned Documents”

Recognition suffers when tilted text breaks the geometric assumptions OCR relies on. Finding baselines, splitting characters, and locating word edges may all break down simultaneously. Consequently, correcting the tilt is essential before conventional recognition can work well on slanted pages, yet success depends on precise angle estimation, thoughtful preparation, and any flaws left after rotation.

Why OCR engines are built around an assumption that skewed documents break

Since scanned pages are just grids of pixels, their text consists solely of pixel clusters. An older OCR engine has to reconstruct the layout dividing rows, terms, and single glyphs before it can read any of those shapes. Such systems assume characters align horizontally, forcing the routines that find baselines, split rows, and isolate glyphs to rely on that same premise.

That assumption comes from how printed documents are normally made and how people read their text. It optimizes for the situation that arises most often. A level baseline lets the engine reliably sort pixels into groups, telling which ones share a line and which sit on separate ones. Tilt the page, though, and even content that has not changed acquires a pixel layout the baseline can no longer accommodate. So skew breaks the engine's working assumptions at a structural level.

How skew breaks baseline detection, character segmentation, and word boundaries in a cascade

If text is slanted instead of aligned with the engine’s expected horizontal axis, baseline detection can break down. Scanning by rows may pull pixels from neighboring lines into a single detected row, causing unrelated glyphs to be fused or proper glyphs to be split. A recognizer still has no basis to treat those fragments as whole symbols merely because a human can read the original page.

The flawed line structure is then passed down to character segmentation. Detected rows may cut words apart, while minor skew shrinks the spacing available for segmentation logic. Recognition must then cope with characters that have been turned. These failures do not operate in isolation. A mistake in finding a line alters what character segmentation receives, while recognition in turn gets different input when segmentation errs.

As the engine progresses down a page, material from a single column may bleed into its neighbor, as if those columns shift out of alignment. Even Correct words can end up separated from the ones beside them. A number read accurately on its own is not useful when the system ties it to an incorrect row or label. Such broad structural breakdowns, which skew may cause but other things can too, prove that flawless character recognition does not guarantee successful extraction.

Skew frequently accompanies other image defects like low DPI, background noise, and the curvature produced by bound-volume scanning. Each defect needs to be identified separately. A spine’s curvature makes text lines bow, whereas skew changes their angle against the image axes. Both may hinder line analysis, yet page rotation leaves curvature unrectified. Because skew disrupts the geometry on which later recognition stages depend, practitioners should address it first, as it is the easiest of these defects to correct.

What makes skew hard to detect reliably before correction can begin

The framework can be corrected only after the page’s tilt has been measured accurately. If detection chooses the wrong angle, rotating the page will not fix it. A bad estimate can make the page less aligned rather than straightening what was tilted, so the correction is only as reliable as the detection. The page’s contents determine the geometric cues available to the engine. An approach tuned for text-heavy pages may falter on forms or mixed layouts.

In Sensors, the 2022 study by Bao and colleagues reports that line detection and projection-profile techniques estimate text-document skew very accurately, yet correct skew less reliably in other image categories. Line detection infers the tilt by tracing linear strokes on the page. Projection profile analysis instead identifies the skew direction where the projection profile reaches its strongest peak. These methods are well matched to text layouts, yet their strong performance there does not make them universally reliable across page types.

Alternative families of methods each involve distinct compromises. Nearest-neighbor clustering tallies directional vectors into bins, performing better on charts and comics than on text. Fourier approaches remain unaffected by what the page holds, yet they demand heavy computation, particularly under noisy conditions. Methods based on axis-parallel bounding boxes enclose content blocks within tightest-fitting rectangles aligned to the axes, then derive the angle from that geometry. None of these traditional techniques works universally for every kind of document.

Text-optimized methods work well in the conditions they were built for, but methods that ignore content require more computation. An angle detector must stay accurate on the material it is processing.

What deskewing actually does to the image and why the order of preprocessing steps matters

An adaptive method from Bao et al. brings document type into the correction decision. The system first identifies whether the page holds textual, tabular, or mixed material, and next applies a geometric fix tailored to that label. So classification precedes picking the geometric method to use. That resolves the core flaw of relying on one technique, since what works well for a certain layout may break down elsewhere.

With the angle in hand, deskewing turns the image so the OCR engine sees the expected horizontal alignment. The layout is altered, but the text itself stays the same. The step works only if the symbols remain intact as the page layout is straightened. The symbol-bearing blocks must be brought into alignment while their internal character bitmaps stay undistorted. When rotation deforms the glyph outlines the recognizer relies on, straighter lines may reduce glyph accuracy.

Deskew needs to happen ahead of the black-and-white conversion. Converting the image to black and white strips away the faint gradient cues used to detect angles, so converting too early leaves less evidence for estimating rotation. Sequence affects how good the input is. Deskewing cannot be treated as a final stage whose placement within preprocessing is immaterial.

In testing, the adaptive algorithm scored 97.6% on one dataset, with PubLayNet performance far behind. That result reflects how accurate the algorithm is at making corrections. Sorting page content into categories before choosing an approach still leaves complex documents difficult.

Where deskewing restores OCR accuracy and where it still falls short

Deskewing typical scanned text produces a measurable, significant gain in OCR accuracy because it restores the orientation required for line and character analysis. Doing so eliminates a particular cause of quality loss. For Tesseract, reliable results require thorough preparation steps such as deskewing, converting to binary, plus capturing images with sufficient DPI.

According to a DFKI study, Leptonica correctly detected skew in a larger proportion of the test documents than the built-in skew detection in Tesseract. Even so, the authors judged the difference to be fairly modest. That qualification restricts what can be concluded to the test results reported. Reliability may vary among conventional processing methods, and the mere presence of automatic skew detection does not indicate a pipeline’s skew-handling performance.

This advantage also stops working when a page has more than one defect. When skew, faint printing, and creases appear together, multiple factors reduce accuracy simultaneously, so correcting the tilt addresses only the rotation-related loss. Even after alignment, pale text remains just as hard to read. Straightening the page likewise fails to resolve certain mixed-content layout issues.

Correction can bring its own costs too. A bad deskew can introduce spurious borders that mislead recognition, and the rotation step slows the workflow. At scale, even tiny per-page delays make operations more expensive. Straightening the page helps only when the change keeps the recognition cues intact and yields better extraction.

How vision-language models change the skew problem without fully eliminating it

Vision-language models treat an entire page as one visual field instead of a series of flat text rows, fundamentally altering how skewed characters are identified. This gives them a natural resilience to rotational variance. Because they draw on the broader context, these models gain an additional means of settling uncertainty when particular characters have deteriorated. Rather than depending only on matching shapes at the pixel level, these models read a character through the lens of its surrounding document. This avoids the traditional chain reaction where flawed line geometry damages segmentation prior to the start of recognition.

Yet tolerating rotation differs from withstanding all forms of disturbance. Higher accuracy on pristine data does not ensure equal resilience once that data is corrupted. Tabular and graphical layouts prove far more vulnerable to such disruptions than standard text documents. Thus, grasping an entire page does not mean the model will preserve all structural links within a corrupted table.

Transcription faithfulness draws another line separating these approaches. When text is perturbed, specialized OCR models lose more ground than classical engines yet outperform general-purpose VLMs. That ranking applies only to faithful transcription. When exact character reproduction matters, traditional systems paired with adequate preparation still hold their own.

The practical recommendation therefore hinges on the specific conditions of the document. For straightforward text captured in flatbed scans, preprocessing-based traditional engines remain cost-effective. For documents with difficult page structures, angled photographs, handwritten material, or several content types, VLMs increasingly offer the most practical solution. Neither option represents the complete production system. Effective extraction depends on preserving layout, identifying fields, validating relationships, and directing ambiguous outputs, while OCR constitutes only one stage of that process.

Industries requiring sub-0.1-degree accuracy must still correct orientation despite a model’s ability to decipher tilted text. Semantic models lack that capability. Understanding how skew disrupts text-line detection, content separation, and connections among words clarifies whether deskewing solves the failure, whether other defects require attention, or whether a document-level vision model is more appropriate for the documents.

Notes

  1. A Novel Adaptive Deskewing Algorithm for Document Images

    Supplied the comparison of line-detection, projection-profile and other skew-detection methods, and the adaptive deskewing results.

  2. A Multistage Extraction Pipeline for Long Scanned Financial Documents: An Empirical Study in Industrial KYC Workflows

    Supported the point that OCR is only one stage of extraction, which also needs layout preservation, field identification and validation.

  3. Robustness of Structured Data Extraction from Perspectively Distorted Documents

    Informed the discussion of how VLMs, specialized OCR models and classical engines hold up under perturbed documents, including tables.

  4. Seeing Straight: Document Orientation Detection for Efficient OCR

    Provided the point that applications needing very high angular precision still require explicit orientation correction.

Every new piece from The Parse Layer, as it's published.

Follow

Ingrid Halvorsen

More from The Parse Layer

  1. October 21, 2026Binarization Algorithm Tradeoffs for Low-Contrast Document Scans8 min read →
  2. September 8, 2026Preprocessing Pipelines That Improve OCR Output Quality10 min read →
  3. September 3, 2026OCR Confidence Scores as a Triage Signal in Production11 min read →