Purpose and operating boundary
Find the earliest color mismatch in acquisition, channel conversion, mask or class rule before changing thresholds to force the expected SKU.
This tutorial defines an engineering evaluation, not a ready-to-run product certification. The current Deyi Vision public PC example covers an EAN-13 workflow on confirmed sample images. Native OCR and detection work in the engineering code must be checked against the installed runtime, bound models and job before use. A browser template does not prove browser execution: the planned OpenCV.js backend needs separate verification. Cloud recognition requires explicit approval of the image scope, provider, model and cost. A review archive is not an executable release package. Camera, firmware and driver compatibility require their own check. All worksheet values below are hypothetical; they are not Deyi Vision measurements or customer results.
Prepare the evidence
Retain a color original, neutral reference and previously unknown item. Freeze the expected class outside the processing input and record the current conversion revision. Write a failure record that another engineer can replay without guessing which image or revision was used. Include the original source, affected region, actual output, expected disposition and the first divergent intermediate result. Record whether the symptom appears on replay, live capture or both. After a correction, rerun the original failure and the previously successful neighboring conditions. A fix that removes one alarm by excluding its region or accepting a missing result changes the requirement rather than resolving the cause. If the failure remains unresolved, keep the affected operation in Review or inhibited state with its reason; do not label an untested workaround as a validated solution. Color sorting and SKU recognition answer different questions. A color region may match a red reference while the item is the wrong size, label or package variant. Define whether the job sorts a physical color, verifies an expected SKU or requires both independent checks. Use color images with known channel order and keep exposure, white balance and light spectrum in the recipe. Test acceptable material lots, glossy surfaces, shadows and foreign products rather than only a clean reference swatch. Low saturation makes hue unreliable, and clipped highlights remove information that an algorithm cannot restore. Unknown, unobservable and mixed-color items need an explicit route. If semantic SKU recognition uses a model, validate that model separately from the color threshold and require approval before any cloud transfer. Troubleshoot from the earliest observable divergence. Replay the same saved source through the unchanged baseline and candidate and compare intermediate images, regions, numeric values and result states. If the source itself differs, the comparison no longer isolates the algorithm. Change a single suspected cause, write the expected effect before running, and retain the negative result when the hypothesis fails. Separate unreadable evidence, a rule mismatch, missing dependencies and an execution fault; they require different remedies. A replay can reproduce a software failure but cannot validate the live trigger, illumination timing or physical reject path. Keep those acquisition and line checks as separate follow-up experiments.
Procedure
- Inspect raw channel order and a known source pixel before converting color spaces.
- Replay the same original with the declared conversion, then compare the saved object mask and valid-pixel denominator.
- Check white-balance drift, clipping and low saturation independently; an unobservable color must stay unknown or Review.
- Validate the correction on new captures and neighboring color classes, retaining the original mistaken result instead of overwriting it.
Interpret the trial
The hypothetical same source color is RGB [200,40,30] or BGR [30,40,200]. Swapping array labels without matching the actual input order changes its meaning. Neither this pixel nor a corrected preview proves SKU identity. A grayscale-only source cannot be repaired into original color by changing a conversion code.
Recording worksheet
| Record | Value / observation | Interpretation |
|---|---|---|
| Same source color | RGB [200,40,30] | Declared RGB order |
| Equivalent channel layout | BGR [30,40,200] | Conversion must match source order |
Two engineering views
Two engineering views · 1
The diagram shows the order of checks. Each arrow requires recorded evidence; it does not imply an implemented automatic connection. Failure image → First divergence → Hypothesis → Replay.
- Failure image
- First divergence
- Hypothesis
- Replay
Two engineering views · 2
The diagram shows the order of checks. Each arrow requires recorded evidence; it does not imply an implemented automatic connection. Original failure → Correction → Neighboring cases → Retained evidence.
- Original failure
- Correction
- Neighboring cases
- Retained evidence
Failure diagnosis
- A red object becoming blue after conversion suggests channel order; compare the original pixel first.
- A class changing only with a different background suggests an incorrect mask or denominator, not necessarily a new product color.
Acceptance and handover
Close diagnosis only when the first divergent stage is reproduced, corrected and checked against independent known and unknown samples. Keep remaining ambiguities visible and document whether acquisition, geometry or decision logic changed.
Keep the source images, the expected decision, the exact revision and the complete result record together. Freeze the evaluation set before selecting the final parameters. If those answers are later used to tune the workflow, mark that set as development data and obtain a new independent acceptance set. Keep Review, NoResult, execution error and missing acquisition visible in the denominator; do not turn them into passes by filtering rows. Save a reproducible failure alongside the successful sample. The handover should identify who may change the recipe, how a prior approved revision is restored and which device output remains inhibited until acceptance. A software result alone does not establish that a moving physical part reached the correct destination.
Sources and technical references
These references explain the methods and limits used in this tutorial. Example checks are guidance; production acceptance requires evidence from your own samples.
- Deyi Vision machine vision software: evaluation scopeDeyi Vision
Public EAN-13 PC evaluation scope and separate hardware/production acceptance.
Checked - Color Space ConversionsOpenCV
Explicit input channel order and depth-dependent color conversion semantics.
Checked - Thresholding Operations using inRangeOpenCV
HSV conversion and explicit channel ranges; not proof of Deyi runtime support.
Checked
Component and selection references
- machine vision software
- Automated Visual Inspection
- Visual Inspection System Design Checklist
- Battery Tab Weld Height Inspection
- Balluff Vision Sensor Alternative
- Datalogic Barcode Reader Alternative
- Banner Vision Sensor Alternative
- Choose lighting and ROI for visible assembly checks
- Troubleshoot visible assembly verification failures
- EAN-13 traceability: duplicates and missing reads
- Camera setup for visible fill-level inspection
- Lighting and ROI for a visible liquid boundary
- Troubleshoot unstable visible fill-level decisions
- Set inspection thresholds with a confusion matrix
- Check laser-profile datum and missing-data behavior
- OCR labels: unreadable versus wrong text
- Set up a camera for open-package completeness checks
- Choose lighting and ROI for open-package contents
- Troubleshoot false package-completeness decisions
- Seal and bead appearance: gap diagnosis
- Surface defects: false-alarm diagnosis

