Cameras & acquisition

Component counting: camera setup for separation

Plan tray coverage and object-side sampling for counting; verify the smallest gaps and settled captures before evaluating region counts.

Send samples for engineering review
Component counting: camera setup for separation
Engineering illustration, not a photograph or measured result.

Inspection task

The camera must resolve the gaps that separate components, not merely fit the tray in the picture. In an illustrative setup, 60 mm across 1200 pixels gives 0.05 mm/px; a 0.2 mm gap spans 4 pixels before optical blur. This sampling calculation is a planning example, not a counting accuracy claim. Test the actual gap after mounting the lens.

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

Before connecting a live camera, work with saved original images and a fixture drawing. Record the sensor dimensions, pixel format, lens, working distance and acquisition backend. An imported image proves that an algorithm can inspect that file; it does not prove that the camera is supported, that a trigger is reliable or that a live station has passed acceptance. Confirm the device route with the installed runtime before issuing acquisition commands.

  1. Map the tray boundary and the smallest permitted gap.
  2. Focus at the occupied tray plane with automatic adjustments disabled.
  3. Capture separated, short-filled and touching controls.
  4. Repeat after feeding motion settles and at tray-edge positions.

Process map

Tray coverage and native sampling establish whether gaps remain visible. Fresh settled frames then support a count comparison.

  1. Original frame
  2. Fixture
  3. Native pixels
  4. New frame
Engineering illustration, not a photograph or measured result.
View full-size diagram

Record the evidence

Record field width, image width, observed gap pixels, exposure and settling condition. Keep the original image dimensions; a resized preview cannot substantiate the 4-pixel planning example. Record any component clipped by the field boundary.

Use the smallest permitted separation as a physical test target. Put the same pair of parts near the center and near the limits of the occupied tray, retaining the actual loading positions in the image record. With exposure fixed, compare the original gap rather than its appearance in a smoothed mask. Check whether the two edges remain distinct and whether a dark bridge appears when the tray moves. Then repeat after the tray settles, preserving the moving-frame failure instead of substituting only the better still frame. If the settled image remains merged, inspect focus and lens resolution before increasing processing complexity. The planning value of 4 pixels across the hypothetical gap is useful only if those pixels contain separate edge evidence; four blurred pixels do not establish separation.

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

Motion blur can bridge a narrow gap and produce one region for two parts. Defocus can do the same even on a stationary tray. If overlaps are physically permitted, higher pixel count alone will not expose the hidden component.

Failure isolation

Compare a sharp separated image, a blurred gap and physical overlap. Only the first supplies independent visible regions.

  1. Visible gap
  2. Blurred gap
  3. Overlap
  4. Clipped part
Engineering illustration, not a photograph or measured result.
View full-size diagram

Validate independently

Keep gain, exposure and automatic image adjustments fixed during comparisons. Capture after mechanical settling, then repeat at the allowed loading extremes. Check the original image at native size rather than judging a scaled browser preview. Verify that a new trigger produces a new frame identity and that missing frames become explicit failures. A stale but sharp picture is unsuitable evidence for the current part.

The setup passes this engineering check only if the intended separated controls remain visibly separated over the stated placement range. Touching and clipped examples must remain explicitly outside a simple region-count guarantee.

Evaluate acquisition load as well as image detail. Capture complete tray events at the intended commissioning pace and record whether every requested event produces a new image of the correct tray state. Do not use repeated frames of the same stopped tray to claim reliability during feeding. Change the physical fill between requests so a stale frame is detectable. Check that full-frame and saved-ROI dimensions agree with the recorded coordinate map. When part presentation allows overlap, label that condition explicitly and decide whether the station must improve singulation, request another view or use a separately verified recognition route. Keep the simple counting setup scoped to its visible separated-parts assumption. The acceptance reviewer should receive originals showing the smallest gap, tray extremes, motion failures and unresolved overlap, together with the declared camera settings.

Continue the engineering handoff

For an engineering handoff, supply original frames, fixture positions, camera/interface details and the capture log. Deyi Vision can review the imaging route from this evidence. Browser-local OpenCV.js execution remains a development requirement in the current capability record; do not assume that displaying a workflow makes its nodes executable in the browser.

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. Inspection resolution planningDeyi Vision

    Field of view and object-side sampling must be checked with optics, exposure and contrast.

    Checked
  2. Structural analysis and shape descriptorsOpenCV

    Connected component areas and centroids describe image regions, not hidden physical part counts.

    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