pdftract/crates
jedarden 5ef9ef7740 feat(pdftract-3wku): implement deskew via pixFindSkewAndDeskew
Implement the deskew preprocessing step using leptonica's
pixFindSkewAndDeskew (Hough line transform). The function:
- Detects dominant text angle on grayscale input
- Rotates by negative angle if >= 0.3 deg threshold
- Returns input unchanged for negligible skews (< 0.3 deg)
- Emits IMG_DESKEW_OUT_OF_RANGE diagnostic for angles > 15 deg
- Returns detected angle for quality tracking

Changes:
- Add leptonica-plumbing dependency (ocr feature)
- Create preprocess.rs module with deskew() function
- Add ImgDeskewOutOfRange diagnostic code
- Expose preprocess module in lib.rs

The implementation uses pixFindSkewAndDeskew which both detects
the skew angle and performs deskewing in one call, returning
the detected angle for debugging purposes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 21:20:02 -04:00
..
pdftract-cer-diff docs(pdftract-aawrz): add LICENSE-MIT and LICENSE-APACHE files 2026-05-23 10:36:28 -04:00
pdftract-cli feat(pdftract-2w3r): implement StructTree coverage check and XY-cut fallback 2026-05-23 20:53:25 -04:00
pdftract-core feat(pdftract-3wku): implement deskew via pixFindSkewAndDeskew 2026-05-23 21:20:02 -04:00
pdftract-libpdftract feat(pdftract-juc): implement Standard 14 font metrics registry 2026-05-23 14:04:02 -04:00
pdftract-py docs(pdftract-aawrz): add LICENSE-MIT and LICENSE-APACHE files 2026-05-23 10:36:28 -04:00