Inspection & metrology

Component counting: merged and split part diagnosis

Diagnose undercounts and overcounts from saved masks; separate touching parts, glare splits, area filtering and tray artifacts.

Send samples for engineering review
Component counting: merged and split part diagnosis
Engineering illustration, not a photograph or measured result.

Inspection task

Start with the first count mismatch and identify whether components were joined, split or excluded. Use independently known physical counts rather than assuming the desired answer. Replay the same original at unchanged segmentation before changing an area limit. This establishes whether the symptom comes from connectivity or eligibility filtering.

Prerequisites and sample controls

State the expected number and what constitutes one physical component. Prepare correctly filled, short-filled and touching-part samples, with independently counted answers. The baseline counts separated connected regions, not hidden objects. A connected region can contain several touching parts, while a single shiny part can break into several regions. Keep these limitations in the sample definition before choosing a counting threshold.

Choose the camera route

Use an area-scan camera when the full tray fits in one triggered frame. Choose monochrome for silhouette contrast and color only for an actual color requirement. Motion during feeding calls for verified global-shutter timing or a settled capture position. A line-scan route needs motion reconstruction; it is not an automatic improvement for a stationary tray.

Run the controlled procedure

Freeze a copy of the failing workflow and retain the original failed image before testing a correction. Reproduce the symptom on saved data first, then determine whether it follows the part, illumination, acquisition or software state. A changed final answer is insufficient: the relevant intermediate evidence must improve for the expected physical reason. Do not erase the initial failure after a successful rerun.

  1. Layer each of the labelled areas over the original tray image.
  2. Compare component areas before and after filtering.
  3. Separate touching parts in a new capture without editing the old image.
  4. Test glare reduction independently from threshold changes.

Process map

Trace raw regions through eligibility filters to the mismatch, then test one physical or algorithmic cause.

  1. Original failure
  2. One change
  3. Replay controls
  4. Residual risk
Engineering illustration, not a photograph or measured result.
View full-size diagram

Record the evidence

Record physical count, raw region count, eligible count and rejection reason. Label each excluded region; the difference between raw and eligible counts should be explainable. Preserve examples that remain impossible to resolve from the image.

Create a component-level failure map before trying to repair the total. Associate every physical part with the raw connected region or regions that cover it. Record components removed by the eligibility filter separately from regions that never existed in the mask. This distinguishes a visible small part discarded by minimum area from a part lost through poor contrast. Inspect the large merged region for the original gap: if the gap is absent in the raw image, a threshold adjustment cannot reliably restore its true shape. Capture a new image after physically separating the parts to test the connectivity hypothesis, retaining both old and new inputs. For a suspected glare split, change only the light arrangement and check that the same physical part becomes one coherent region without adding neighboring tray features.

Illustrative recording sheet; enter your own results
ControlRequired observationDecision boundary
N3: 3 separated parts3 eligible regions expected in this exampleCompare with independent physical count
N2: 2 separated parts2 eligible regions expected in this exampleShort fill; do not change the expected 3
T3: 3 touching partsRegion count may differ from 3Review; connected regions are not physical objects

Diagnose failed cases

A minimum-area filter can discard a small valid component; a reflection can split one part into several eligible islands. Widening area bounds may add tray noise. Recover separation or visibility before trying to compensate numerically.

Failure isolation

A joined pair, a split part and a filtered small part require different remedies, even if they produce the same total error.

  1. Merged
  2. Split
  3. Filtered
  4. Tray noise
Engineering illustration, not a photograph or measured result.
View full-size diagram

Validate independently

Alter one suspected cause per trial and replay all previously failing controls. Keep image IDs, parameter differences, ROI and runtime identity in the log. If the result changes without a corresponding change in the expected intermediate observation, investigate timing or provenance. Inconclusive frames should remain explicit review cases instead of being removed to make a comparison look better.

Replay every old mismatch after the correction and inspect individual regions. Test a new short-fill tray independently; never adjust the expected count to match a failed image.

Use a correction ledger that follows the suspected mechanism. An area-filter correction should change eligibility while leaving the raw segmentation unchanged. A light correction should change the original contrast and its resulting mask. A settling correction should remove motion-related bridges in new frames but need not change the saved blurred image. If the observed effect differs from the prediction, keep the hypothesis unresolved and examine other changes. Replay the full tray controls after each accepted correction, including extra parts and the smallest permitted component. Check that one merge and one split do not cancel into an apparently correct total. Mark touching and hidden parts as unresolved when the installed route cannot explain them. A reviewer should be able to reproduce the old mismatch, the specific improvement and the remaining limits from the supplied originals and parameter differences.

Continue the engineering handoff

Send the original failure, corrected result, parameter difference and remaining boundary cases to Deyi Vision for review. Verify corrections on the live installation only after saved-image isolation succeeds. A correction demonstrated on one file is not evidence of physical-camera reliability, robot calibration or production acceptance.

Save the original image and the resulting record together.

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. Visual inspection system design checklistDeyi Vision

    Define sample decisions, station constraints and measurable acceptance before hardware selection.

    Checked
  2. Morphological transformationsOpenCV

    Erosion and dilation alter binary regions; kernels can remove details or join regions.

    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