# mzucker/page_dewarp

Text page dewarping using a "cubic sheet" model

Repository: https://github.com/mzucker/page_dewarp
Canonical: https://ross.abutalabs.com/products/page_dewarp
Homepage: https://mzucker.github.io/2016/08/15/page-dewarping.html
Language: Python
License: MIT
License Family: permissive
Last push: 2023-03-02T13:41:08+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3675, "days_push": 1280, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1526, forks 243 (observed 2026-08-28T04:04:58.370272+00:00)

## What it is
A Python command-line tool that dewarps photos of curled or warped book pages using a cubic sheet optimization model, flattening them into readable images. It also performs adaptive thresholding to produce clean, binarized document images.

## Use cases
- straighten photos of curled book pages
- dewarp scanned documents automatically
- flatten warped text in images for OCR
- convert photos of handwritten homework into clean PDFs
- preprocess archival document photos for digitization
- binarize page images to remove shadows and noise

## When to choose
- you have photos of pages with significant curl or perspective warp
- you want a simple scriptable CLI for batch dewarping images
- you need cleaner input images to improve downstream OCR accuracy
- you prefer a lightweight, dependency-minimal tool over full document scanning suites

## When to avoid
- you need a GUI or interactive correction of dewarping results
- you need PDF output, multi-page management, or full scanning workflows built in
- you need actively developed software with frequent updates and support
- your images are already flat scans that only need deskewing

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: image-processing, computer-vision, ocr, pdf
- domain: computer-vision, image-processing, pdf, files
- platform: python, cli, cross-platform
- tags: document-dewarping, page-flattening, opencv, document-scanning, thresholding

## Member repositories
- mzucker/page_dewarp (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:58.370272+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:37.499889+00:00, confidence not recorded.
  - readme: https://github.com/mzucker/page_dewarp (fetched 2026-08-28T04:04:58.370272+00:00, sha 940857d42884)
  - homepage: https://mzucker.github.io/2016/08/15/page-dewarping.html (fetched 2026-08-29T11:34:10.790272+00:00, sha 7de721656955)
- Data as of 2026-08-30T08:39:29.467469+00:00.
