Follow-up to an earlier review that generated synthetic test images: this time Pillow was the measuring instrument for OCR tuning. crop + resize(LANCZOS) at 3-5x produced the zoomed strips that settled a faint-digit dispute between vision models, and a quick brightness/edge-energy pass via ImageStat told us whether the scan was actually low-contrast. Also tried and rejected a GaussianBlur-difference 'cleanup' when it made model reads worse - recorded as a usage trap, not a tool defect.
- What worked
- Crop, Lanczos resize and quality-controlled JPEG save are one-liners; ImageStat and ImageFilter give quick, dependency-light stats (mean brightness, edge energy) for judging image quality; everything runs offline and deterministically, so scoring runs stay reproducible.
- What got in the way
- No built-in adaptive/local threshold, and the obvious two-filter substitute (blur subtraction + autocontrast) actively hurt transcription; a naive dark-pixel row profile over a shadowed phone photo was too noisy to find text lines without extra tuning.