Software & integration

SKU color sorting: typed color and SKU rules

Implement a color decision on a declared image format, while keeping semantic SKU recognition and approval of any cloud model separate.

Send samples for engineering review
SKU color sorting: typed color and SKU rules — Illustrative engineering scene; not a photograph or a measured result.
Illustrative engineering scene; not a photograph or a measured result.

Purpose and operating boundary

Implement a color decision on a declared image format, while keeping semantic SKU recognition and approval of any cloud model separate.

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

Freeze source channel order, bit depth, object mask and allowed classes. Bind a local executable workflow explicitly; a browser template or review archive does not supply a runtime. Check the intermediate output against its contract before interpreting the final flag. A missing region, malformed text field, invalid coordinate or non-finite numeric value must remain an explicit failure, not a default good result. Record the actual execution backend and dependencies used for that run; do not transfer acceptance from another backend with the same template name. If a new model or preprocessing revision is selected, preserve the previous version and rerun the fixed comparison rather than combining results across identities. Present the complete number of attempted cases, how many returned usable evidence and the decision made for the remainder. These quantities describe coverage and failure handling as well as recognition quality. 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. Treat a workflow as a sequence of typed decisions, not as a single model answer. Bind the input identity, region transform, node versions, preprocessing and model package before running an experiment. Separate parameter selection on development images from evaluation on a frozen set whose answers were not used for tuning. Keep the baseline and candidate results for every case, including unsuccessful execution. An AI suggestion can propose a revision but cannot confirm the reference answer, grant data upload permission or approve production use. If a provider call has an uncertain receipt, preserve the request identity and investigate that receipt before considering any resend. Runtime availability, recognition quality and release approval are independent checks.

Procedure

  1. Convert with the correct input order and declare the HSV representation before setting ranges.
  2. For an 8-bit OpenCV trial, handle red across the circular hue boundary using H ranges 0–10 or 170–179; select saturation and value limits from source specimens, not a universal preset.
  3. Count matching valid object pixels, return Review when evidence is insufficient and retain the measured ratio.
  4. Evaluate semantic SKU separately with approved product identities; any cloud upload needs explicit data, provider, model and cost approval.

Interpret the trial

The hypothetical object contains 1000 valid pixels and 600 matching pixels, giving 60%. A declared trial criterion of 70% returns Review, not a forced red class. These illustrative hue ranges and ratio criterion require validation on the installed depth and products. Correct color alone cannot identify two same-color SKUs.

Recording worksheet

Hypothetical worksheet; values are design examples, not measured performance.
RecordValue / observationInterpretation
HSV trial representation8-bit; H [0,10] OR [170,179]Illustrative red intervals, validate S/V
Match / valid pixels600 / 1000Ratio = 60%
Trial criterion70%60% < 70% → Review
ratio = 600 / 1000 = 60%
60% < 70% -> Review

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. Input identity → Bound nodes → Result contract → Review.

  1. Input identity
  2. Bound nodes
  3. Result contract
  4. Review
Illustrative engineering scene; not a photograph or a measured result.
View full-size diagram

Two engineering views · 2

The diagram shows the order of checks. Each arrow requires recorded evidence; it does not imply an implemented automatic connection. Development → Frozen evaluation → Candidate → Approval.

  1. Development
  2. Frozen evaluation
  3. Candidate
  4. Approval
Illustrative engineering scene; not a photograph or a measured result.
View full-size diagram

Failure diagnosis

  • Using a hue range from a different pixel depth silently changes the class boundary.
  • A high cloud confidence without an approved SKU mapping or usable object evidence must not authorize a physical route.

Acceptance and handover

Accept color logic with independent known and unknown specimens, then evaluate the separate product rule. Keep range, mask, executable package and any model revision bound to the result record.

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.

  1. Deyi Vision machine vision software: evaluation scopeDeyi Vision

    Public EAN-13 PC evaluation scope and separate hardware/production acceptance.

    Checked
  2. Thresholding Operations using inRangeOpenCV

    HSV conversion and explicit channel ranges; not proof of Deyi runtime support.

    Checked
  3. Color Space ConversionsOpenCV

    Explicit input channel order and depth-dependent color conversion semantics.

    Checked

Engineering review

Bring the inspection problem and the evidence.

Send sample images, your current setup and the check that failed. Include field of view, working distance, line speed and acceptance criteria for a practical review.

Send samples for engineering review
Contact

Direct RFQ contact

Talk to engineering about the inspection problem.

Send sample images, competitor model, FOV, working distance and line speed before model selection.

Target: selection brief within 24h
Send sample images