A small e-commerce imaging case shows why product images that carry legally required text need an independent reference. Justin Flick of SOMUVA describes how his team cleaned phone photos of carton back panels and found that a convincing image could still contain altered information.
The goal was to turn the photos into straightened, evenly lit images on a white background for online product pages. The panels carried manufacturer and importer names and addresses, warning texts and contact details. The images could look better, but the information had to remain unchanged. The team treated the printed text as the measurand, not the image’s appearance.
The first attempt used a generative image model. The team supplied a straightened carton image and told the model to keep every printed character, number and symbol identical. The output looked professional, but comparison with the source found changes: “2801” had become “2001”; a phone number contained wrong digits; a comma had become a full stop, and elsewhere a full stop had become a comma. The alterations were plausible and hard to spot at a glance. The images were discarded and none was published. A generative model produces what text plausibly looks like, not necessarily what was printed, and visual inspection is a weak check against plausible errors.
The team replaced the model with a deterministic chain. Each carton face was rectified with a perspective transform from four corner points. Uneven lighting was flattened by estimating background illumination and dividing it out, followed by white balancing. Denoising was gentle and edge-preserving. Text blocks were marked as protected regions where pixels passed through background cleanup unchanged. The result was placed on a white background with a soft shadow. Nothing was redrawn or re-typeset; every character came from photographed pixels.
For each image, the team kept a reference: the same crop after rectification and illumination/white-balance, but before denoising or cleanup. Each processed face was compared with that reference before background placement, using two measurement principles. The first was an OCR diff: both images were read by an open-source OCR engine with German and English data after upscaling, and word sequences were aligned so deviations could be listed. The second was an ink check independent of reading text. Pixels clearly darker than the carton background in the reference counted as print; if they became light in the processed image and most of a connected group disappeared, the group was flagged as a lost character.
The gate showed that classical filters are not automatically safe. A speckle filter turned “130” into “30” and removed colons. A threshold cleanup step erased the dot in a web address. Both stages were dropped. Any step that decides what counts as noise can decide that a full stop is noise.
An OCR diff has its own uncertainty. On small print, the engine misread the reference image as well, for example reading a “5” as an “S”. A raw OCR diff therefore reports disagreements that processing did not cause. Taken at face value, these can lead to false rejects; ignored wholesale, they can hide real changes and produce false accepts. The team compared this with a gauge study, separating measurement-system variation from changes introduced by processing. The ink check and a separate review step did that work. Each disagreement was treated as a stop, not a similarity score to be averaged away.
A separate automated review, independent of the processing chain, checked the images in two rounds. In the first round, a composite image failed because one inserted line could not be verified reliably. The composite was removed and the genuine information block from the carton was used instead. Before any replacement, the previous state was backed up. After publication, the team downloaded the delivered files and compared them with its own; at reduced resolution, the mean absolute greyscale difference was well under one grey level. The published file was checked like every step before it.
The team’s rules are direct: define the measurand; keep a separate reference from the earliest reliable step; use two principles such as OCR diff and ink check; characterize OCR errors on the reference; treat disagreement as a stop; test classical filters as rigorously as AI; add independent second review; back up and pixel-compare published files; and improve input with frontal, unwrapped, daylight photos. Generative models remain useful where nothing must be read. For mandatory information, the team now uses classical processing plus text comparison against the original.
The case echoes Gleb Tsipursky’s argument in a prior Metrology News commentary that quality leaders should measure disagreements before reducing human review. For processed images, the corresponding question is simple: when output and reference disagree, the answer should come before publication.
