Inspection & metrology

Surface defects: false-alarm diagnosis

Separate reflection, registration drift and genuine surface changes by replaying the earliest divergent image, not by raising the final reject threshold.

Send samples for engineering review
Surface defects: false-alarm diagnosis — Illustrative engineering scene; not a photograph or a measured result.
Illustrative engineering scene; not a photograph or a measured result.

Purpose and operating boundary

Separate reflection, registration drift and genuine surface changes by replaying the earliest divergent image, not by raising the final reject threshold.

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

Select an unchanged good part that now fails. Preserve its original reference and datum overlay before modifying any mask or threshold. 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. A surface-defect station must distinguish a material defect from a change in viewing conditions. Scratches, dents, oil, texture and a reflection can produce similar intensity changes, yet require different dispositions. Prepare acceptable parts from the expected finish range and defect samples with recorded locations and orientations. Choose a datum that remains visible when the surface changes. A reference image is useful only after its pose and illumination are comparable with the current part. An image difference is not a physical depth measurement, and a detected region does not by itself identify a defect mechanism. Decide whether dirt is a reject, a cleaning request or an excluded condition before collecting answers. Store original views of ambiguous samples rather than inventing a clean reference or a corrected label. 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

  1. Compare source pose with the reference pose and inspect the datum residual before surface subtraction.
  2. Replay with the original transform, then a independently verified corrected transform; retain both difference images.
  3. Inspect residuals along edges separately from an interior scratch; do not include silhouette error in a defect-area count.
  4. Repeat a real defect after correction so that an alignment fix cannot quietly make the inspection insensitive.

Interpret the trial

The hypothetical good part has 30 residual pixels before registration correction and 3 afterward. The defect sample retains 25. This supports investigating alignment but does not establish a production threshold or classify every residual as a defect.

Recording worksheet

Hypothetical worksheet; values are design examples, not measured performance.
RecordValue / observationInterpretation
Good part before30 pxInspect alignment
Good part after3 pxResidual remains recorded
Defect after25 pxVerify feature remains

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.

  1. Failure image
  2. First divergence
  3. Hypothesis
  4. Replay
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. Original failure → Correction → Neighboring cases → Retained evidence.

  1. Original failure
  2. Correction
  3. Neighboring cases
  4. Retained evidence
Illustrative engineering scene; not a photograph or a measured result.
View full-size diagram

Failure diagnosis

  • A whole-outline alarm suggests pose or scale drift. Check the transform first.
  • Local bright patches that follow the light indicate reflection; a coordinate correction alone will not repair them.

Acceptance and handover

Accept the diagnosis only when the saved false alarm is explained and the genuine defect remains observable after the correction. Keep both replay and live recapture results.

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. Operations on arraysOpenCV

    Explicit array operations including absdiff and inRange; a vendor-neutral workflow must validate type, shape and independent test data.

    Checked
  3. Geometric Image TransformationsOpenCV

    Source/destination coordinate mappings, affine/perspective transformations and interpolation; image geometry does not certify an installed Deyi executor.

    Checked
  4. Morphological TransformationsOpenCV

    Opening/closing change binary foreground geometry; verify kernels against the smallest relevant feature.

    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