Document Edge Detection

Document Edge Detection: Find Documents in Any Photo

ScanKit's edge-detection engine finds document boundaries even on curved pages, folds, and busy backgrounds, then straightens the perspective for a clean result. It's the core technology behind every ScanKit product.

Why ScanKit

Detection and preprocessing: what makes text recognition work

Handles curved pages

Book spines and curled edges are detected and flattened, not just corner-tracked like basic scanners.

Works on busy backgrounds

Finds the document among clutter, shadows, and uneven lighting.

Deskew, dewarp and an OCR-ready output

Skew and perspective are corrected (deskew), curved pages and folds are flattened (dewarp), and the output width in pixels sets the effective resolution (DPI) your next step receives. Text recognition can run in the same call: POST /scan/scan_pdf returns a searchable PDF with a text layer in the language you pass as ocr_lang, POST /scan/extract_text returns the text itself.

Powering API, SDK & no-code

The same engine runs everywhere: REST API, browser SDK, and instant scanners.

Want to build with it? Start with the API playground.

Try the API Playground