Instruments & Meters

Why Processed Product Images Need an Independent Text Reference

A small carton-image workflow shows how generative edits and ordinary filters can alter legally required text, and how a separate reference and two checks catch it.

Chidi OkonkwoOctober 25, 20265 min read10 views
A conceptual studio scene shows a generic carton panel, an early reference image and two abstract inspection overlays converging on a clean product image.

A small image-processing case at SOMUVA UG (haftungsbeschränkt), the Lüdenscheid, Germany, company behind the German-language shop vapechamp.de, shows why processed images that carry mandatory text need an independent reference. The team wanted to turn phone photos of carton back panels into clean, straightened images on a white background for online product pages. Those panels carry legally required manufacturer and importer names and addresses, warning texts and contact details such as phone numbers. The images could look better, but the information on them could not change. In measurement terms, the measurand was the printed text, not the appearance of the image.

Generative editing produced plausible but wrong text

The first attempt used a generative image model. The team supplied a straightened image of the carton and an explicit instruction to keep every printed character, number and symbol identical. The output looked professional: sharp print, even light and a clean background. A 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 had become a comma. None of this was easy to spot at a glance because the changes were plausible. For mandatory information, that was not a cosmetic issue, so the generated images were discarded and none was published. The lesson was that a generative model produces what text plausibly looks like, not what was printed. Visual inspection is a weak check against plausible errors, which is precisely why it cannot serve as the reference.

A deterministic pipeline kept photographed pixels

The team replaced the model with a deterministic chain. The carton face was rectified with a perspective transform from four corner points. Uneven lighting was flattened by estimating the background illumination and dividing it out, followed by white balancing to a target tone. Denoising was gentle and edge-preserving. Text blocks were marked as protected regions in which pixels passed through the background clean-up unchanged. The result was then placed on a white background with a soft shadow. Nothing on the carton was redrawn or re-typeset. Every character of the printed panel in the final image was derived from the photographed pixels.

Two independent checks against an early reference

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. Every processed carton face was compared with that reference before it was placed on the background, using two measurement principles. The first was an OCR diff. Both images were read by an open-source OCR engine with German and English language data after upscaling. The resulting word sequences were aligned and every deviation was listed. The second was an ink check that did not depend on reading text at all. Pixels clearly darker than the carton background in the reference counted as print. If such pixels became light in the processed image, and most of a connected group of them disappeared, that group was flagged as a lost character.

The gate also showed that classical filters are not automatically safe. A speckle filter had turned 130 into 30 and removed colons. A threshold clean-up step had erased the dot in a web address. Both stages were dropped. As the case puts it, any step that decides what counts as noise can decide that a full stop is noise.

OCR needed its own error budget

An OCR diff is itself a measurement system, with its own error. On small print, the OCR engine misread the reference image as well, for example reading a 5 as an S. A raw OCR diff therefore reports disagreements that the processing did not cause. Taken at face value, such results lead to false rejects; ignored wholesale, they hide the real changes, which become false accepts. The analogy with a gauge study is useful here. Before attributing variation to the part, a gauge study separates out the variation of the measurement system. In this case, the OCR misreads of the reference had to be separated from changes introduced by the processing. A second, independent principle, the ink check, and a separate review step did that work. This follows Gleb Tsipursky's third step in his commentary on AI inspection: identify the source of the disagreement rather than assuming the person or the model must be wrong. The principle the team took from it was to treat each disagreement as a stop to be resolved, not as a similarity score to be averaged away.

Independent review, backups and the published 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 was used instead. Before any image was replaced, the previous state was backed up so it could be restored. After publication, the team downloaded the files as actually delivered and compared them with its own. At reduced resolution, the mean absolute greyscale difference was well under one grey level. The published file is the last link in the chain, and it deserves the same check as every step before it.

What the case means for quality teams

The practical takeaways are specific. Define the measurand: for images that carry 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. 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. Improve the input: frontal, unwrapped, frame-filling photos in daylight make every later step easier.

The case does not show that generative models are useless. It says they remain useful for images where nothing has to be read. For images that carry mandatory information, the team now uses classical processing plus a text comparison against the original. Near the end of his commentary, Tsipursky asks whether quality leaders know who was right when the machine and a qualified person disagree, why, and what changed afterward. For processed images, the question is the same. When the output and the reference disagree, the answer should come before anything is published.