For Justin Flick of SOMUVA UG, the German company behind the online shop vapechamp.de, the problem was mundane: turning phone photos of carton back panels into clean, straightened images on a white background for product pages. But those panels carry legally required information — manufacturer and importer names and addresses, warning texts — together with contact details such as phone numbers. The images could look better; the information could not change. In measurement terms, Flick writes, the measurand was the printed text, not the appearance of the image.
The framing follows an argument by Gleb Tsipursky that quality leaders should measure disagreements between automated inspection and qualified human judgment before reducing human review. Flick's case is small and sits outside the factory, but he says the principle carried over directly: an automated result is only as trustworthy as the independent reference it has been checked against.
A plausible result that did not hold up
The first attempt used a generative image model, given a straightened carton image and an explicit instruction to keep every printed character, number and symbol identical. The output looked professional: sharp print, even light, a clean background. Comparison with the source told a different story. The digits “2801” had become “2001”; a phone number contained wrong digits; a comma had turned into a full stop and elsewhere a full stop into a comma. Because the changes were plausible, they were hard to spot at a glance. The generated images were discarded and none was published. Flick's lesson: a generative model produces what text plausibly looks like, not what was printed, and visual inspection is too weak a check to serve as the reference.
A deterministic chain
The replacement was a deterministic pipeline. The carton face is rectified with a perspective transform from four corner points; uneven lighting is flattened by estimating the background illumination and dividing it out, followed by white balancing to a target tone; denoising is gentle and edge-preserving. Text blocks are marked as protected regions in which pixels pass through the clean-up unchanged, and the result is placed on a white background with a soft shadow. Nothing is redrawn or re-typeset — every character in the final image derives from photographed pixels.
Reference and gate
For each image a reference was kept: the same crop after rectification and the illumination and white-balance step only, before any denoising or clean-up. Every processed carton face was compared with that reference before being placed on the background, using two measurement principles. The first is an OCR diff: both images are read by an open-source OCR engine with German and English language data after upscaling, the word sequences are aligned, and every deviation is listed. The second is an ink check that does not read text at all — pixels clearly darker than the carton background in the reference count as print, and if such pixels become light in the processed image and most of a connected group disappears, that group is flagged as a lost character.
Classical filters under the same scrutiny
The gate also caught conventional processing steps. A speckle filter had turned “130” into “30” and removed colons, and a threshold clean-up step had erased the dot in a web address; both stages were dropped. Flick's conclusion is blunt: any step that decides what counts as noise can decide that a full stop is noise.
OCR carries its own uncertainty
An OCR diff is itself a measurement system with its own error. On small print it misread the reference image as well, for example reading a “5” as an “S.” A raw diff therefore reports disagreements the processing did not cause: taken at face value these produce false rejects, while ignoring them wholesale hides real changes as false accepts. Flick draws a gauge-study analogy — before attributing variation to the part, separate out the variation of the measurement system. The independent ink check and a separate review step did that work, treating each disagreement as a stop to be resolved rather than a similarity score to be averaged away.
Second review, backups and the published file
A separate automated review, independent of the processing chain, checked the images in two rounds. A composite image failed in the first round because one inserted line could not be verified reliably, and was replaced with the genuine information block from the carton. Previous states were backed up before any replacement, and after publication the delivered files were downloaded and compared with the originals; at reduced resolution the mean absolute greyscale difference was well under one grey level.
Takeaways for quality teams
Flick's recommendations: define the measurand, since for images with mandatory text the characters matter rather than the appearance; keep a separate reference from the earliest reliable processing step and never compare an output only with itself; use two principles, such as an OCR text diff and a pixel-level ink check; characterise the OCR's own errors on the reference before trusting its verdicts; treat any disagreement as a stop, not a score; test classical filters as rigorously as AI tools; add an independent second review and remove what cannot be verified; back up before every change and pixel-compare the published files; and improve the input with frontal, unwrapped, frame-filling photos in daylight. Generative models, he concludes, remain useful where nothing has to be read.
