Skip to content

Document quality check

Document quality check measures each page for blur, skew, low resolution, cut-off text and more. It gives a clear grade and a list of reasons, so poor inputs are fixed before anyone relies on them.

At a glance

Grades every scanned or photographed page and names its defects, so bad inputs are caught before extraction and review.

Image analysis
  • OpenCV
  • NumPy
  • Laplacian sharpness and noise measures
Document input
  • PDF
  • Scanned and photographed images
  • PyMuPDF page rendering
Rules and thresholds
  • YAML threshold file
  • Per-check cut-offs with sources
  • Worst-case grading

The challenge

Enterprises receive documents as scans, phone photos and faxes of every condition. Pages arrive blurred, tilted, too small to read, dark, or cut off at the edge. Nobody notices until a downstream step fails or, worse, quietly returns wrong values.

Without a check at the door, bad inputs travel through extraction and into reviewer queues. Reviewers lose time on pages no one could read, customers are asked for re-submissions late, and errors reach records that people then trust.

What it does

  • Per-page grading

    Every page of a PDF or image receives a grade from clean to unreadable. The grade follows the worst defect found, so one serious problem is never averaged away.

  • Named defects with evidence

    Each finding is a named defect such as blurry, skewed, dark, faint or noisy, with the measured value and the cut-off that triggered it, so the reason is never a mystery.

  • Text legibility checks

    Measures the size of printed characters in the stored image and flags text that is too small to read reliably, regardless of what resolution the file claims.

  • Cut-off and blank detection

    Detects text lines that run off the page edge and pages that are blank, so missing content and empty scans are caught before they reach a reviewer.

  • Extraction trust checks

    When extracted text is available, checks it for signs of failure: no text returned, unreadable markers, repeated loops, garbled output, and the same number read two different ways.

  • Single files and folder batches

    Grade one document in a browser, or scan a whole folder with progress and totals. Results export as spreadsheet, JSON and a browsable report.

How it works

  1. Receive the document

    A PDF or image is submitted by upload, by path or as a folder. Each page is rendered to a standard working image so every document is measured the same way.

  2. Measure the page

    Single-purpose checks measure sharpness, noise, brightness, contrast, text size, text edges, skew and blank space. Each returns a status, a value and a plain explanation.

  3. Grade and explain

    Results combine into a page grade by the worst-case rule. Reasons and defect labels are attached, and a score is kept only for sorting review queues.

  4. Route and report

    Clean pages continue, doubtful pages go to a person, and unreadable pages are sent back for re-capture. Reports are written as CSV, JSON and HTML.

Under the hood

Technology
Image analysis
  • OpenCV
  • NumPy
  • Laplacian sharpness and noise measures
Document input
  • PDF
  • Scanned and photographed images
  • PyMuPDF page rendering
Rules and thresholds
  • YAML threshold file
  • Per-check cut-offs with sources
  • Worst-case grading
Outputs and access
  • CSV
  • JSON
  • HTML report
  • REST API

Business outcome

  • Bad inputs stopped at the door. Poor pages are identified before extraction and review, so effort is spent on documents that can actually be processed and trusted.

  • Less wasted reviewer time. People look at pages that need judgement, not pages no one could read. Doubtful pages are queued and ranked for attention.

  • Faster, clearer re-submissions. When a page must be re-captured, the named defect tells the sender exactly what to fix, such as retake in better light or rescan the cut-off edge.

  • Confidence in downstream data. Pages that pass carry a recorded reason to trust them, and pages that fail are kept out of records that people depend on.

Where it is used

  • Screening applicant, employee or customer document packs on arrival, before extraction begins.
  • Checking phone photographs of identity cards and certificates for glare, blur and cut-off edges.
  • Triage of large scanning backlogs, sending unreadable pages back for rescan instead of manual retyping.
  • Gatekeeping scanned forms and invoices before they enter an extraction or review queue.

Frequently asked questions

What defects does it detect?

It checks for blank pages, blur, noise, dark or faint pages, glare, uneven lighting, text that is too small, text cut off at the edge and skew. Physical conditions such as stamps over text are also flagged.

Does it use a language model?

The page checks use classical image measurement and run without a model or GPU. If extracted text is supplied, extra checks examine it for signs of failure. Nothing here depends on a particular model vendor.

How is a page graded?

Pages receive one of four grades, from clean to unreadable. The grade follows the worst finding rather than an average, so a single fatal defect cannot be hidden by otherwise good measurements.

Can I change the thresholds?

Yes. Every cut-off sits in a single thresholds file with its source noted. They are starting values and should be calibrated against your own hand-graded pages before you rely on the grade boundaries.

See it on your own documents and data

Tell us what you want to automate and we will show you how it runs inside the harness.