Image pre-processing
The raw image gets de-skewed, lighting-corrected, and contrast-enhanced. Faded thermal paper gets boosted. Photos taken at angles are perspective-corrected. Background clutter (table, hands, other objects in the photo) is masked out so only the receipt itself enters the OCR pipeline. This stage alone accounts for most of the accuracy gap between "lab demo" and "production reality."