When Justin Flick's team at SOMUVA UG set out to prepare carton photographs for the German-language shop vapechamp.de, the task looked like routine image clean-up: straighten phone photos of carton back panels, even out the lighting and place the result on a white background for product pages. The panels, however, carry legally required manufacturer and importer names and addresses, warning texts and contact details such as phone numbers. The appearance of the image could improve; the information on it could not change. In measurement terms, Flick writes, the measurand was the printed text, not the look of the picture.
A convincing result that failed the comparison
The first attempt used a generative image model, supplied with 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, clean background — but a comparison against the source showed that the digits “2801” had become “2001”, that a phone number contained wrong digits, and that a comma had turned into a full stop while elsewhere a full stop became a comma. The changes were plausible enough to escape a glance, which is precisely what made them unacceptable for mandatory information. The generated images were discarded and none was published. Flick's conclusion: 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.
Deterministic processing that keeps every glyph
The replacement is a deterministic chain. 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 background clean-up unchanged. The result is then placed on a white background with a soft shadow. Nothing is redrawn or re-typeset: every character of the printed panel in the final image derives from photographed pixels.
One reference, two measurement principles
For each image the team kept a reference — the same crop after rectification and the illumination and white-balance step only, before any denoising or clean-up — and compared every processed carton face with it before background placement. Two independent principles were applied. 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 turn light in the processed image and most of a connected group of them disappears, that group is flagged as a lost character.
Classical filters are not automatically safe
The gate showed that conventional image processing carries its own risk. A speckle filter turned “130” into “30” and removed colons, and a threshold clean-up step erased the dot in a web address; both stages were dropped. As Flick frames it, any step that decides what counts as noise can decide that a full stop is noise.
Uncertainty inside the checker
An OCR diff is itself a measurement system with its own error. On small print the engine also misread the reference, for example taking a “5” for an “S”, so a raw diff reports disagreements that the processing did not cause. Taken at face value these produce false rejects; ignored wholesale they hide real changes and become false accepts. Flick draws the analogy of a gauge study: before attributing variation to the part, the variation of the measurement system has to be separated out. The ink check as a second, independent principle, together with a separate review step, did that work. The operating rule is to treat each disagreement as a stop to be resolved rather than a similarity score to be averaged away — an application of the third step Gleb Tsipursky sets out in his commentary for Metrology News, to identify the source of the disagreement rather than assuming the person or the model must be wrong.
Second review, backups and the delivered file
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 used instead. Previous states were backed up before any replacement. After publication the team downloaded the files as actually delivered and compared them with their own; at reduced resolution the mean absolute greyscale difference was well under one grey level.
Implications for quality teams
The case sits outside the factory, but Flick argues the principle carries over directly: an automated result is only as trustworthy as the independent reference it has been checked against. His practical list:
- Define the measurand — for images carrying mandatory text, the characters matter, not the appearance.
- Keep a separate reference image from the earliest reliable processing step, and never compare an output only with itself.
- Use two measurement 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, and test classical filters as rigorously as AI tools.
- Add an independent second review, remove what cannot be verified, back up before every change and pixel-compare the published files.
- Improve the input: frontal, unwrapped, frame-filling photos in daylight make every later step easier.
The boundary the team draws is narrow but firm. Generative models remain useful for images where nothing has to be read; for images carrying mandatory information they now use classical processing plus a text comparison against the original. Tsipursky's closing question for quality leaders — when the machine and a qualified person disagree, do we know who was right, why, and what we changed afterward — applies unchanged to processed images: the answer is wanted before anything is published.
