A vibratory platform feeds well only while the parts sit where the robot can reach them and the count stays in band. That is two numbers: how many parts are on the platform, and where their center of mass sits. A wrist camera built to return one part pose answers the pick question, not the balance question — it reports a single target no matter how many parts are in view. One overhead camera with blob analysis answers both from the same image, fast enough to close the loop with the hopper and the vibration lanes. This guide walks the pipeline, the formulas, a fully worked example with 40 parts crowded on the left of a 216 × 162 mm platform, and the hardware choice between a smart camera and a vision controller.
The decision: one overhead camera gives both numbers
Both numbers come from the same binary image, and neither needs a part-by-part pose. Blob analysis — connected-component labeling on a thresholded image — returns every region with its area, centroid, orientation and perimeter. The part count is the number of blobs that survive an area filter; the cluster centroid is the area-weighted mean of their centers. Run it on a fixed camera that sees the whole platform in one frame.
A wrist camera made for picking does a different job: it returns the pose of the target part so the robot can grip it, and extra parts in the field do not become extra outputs. Keep it on the wrist for the pick, and put a fixed camera overhead for the balance signal. That split matches the layout in vision-guided flexible feeding: architecture for random pick; if your task is locating a single part, robot vision for locating part center points covers that simpler case.
The two outputs and the math behind them
Threshold the grayscale image so the parts stand out as solid regions, then label the connected components: every labeled region is a candidate part. Keep the blobs whose pixel area falls inside your part's signature band and drop the rest — crumbs, reflections, platform marks. The survivors are your count, the same pixel-counting method shown in measure blob area in a binary image by pixel counting, extended from one blob to all of them; counting rod-shaped objects in images applies the same idea to a harder shape.
The centroid is the center of mass of the parts, not the middle of the platform. Weight each blob center by its own area A_i, so a merged double-part or an oversized part pulls the centroid the way its mass would. Blob centers come back in pixel coordinates, so check which corner your tool treats as the origin and whether it references the pixel corner or the pixel center — the half-pixel offset in blob centroid note explains the convention. At 0.15 mm/px that half pixel is 0.075 mm, invisible next to a 30 mm control band.
Labeling also needs a connectivity choice: 4-connected counts only edge neighbors, 8-connected adds the diagonals. For round parts on a vibrating bed, take 8-connected as the default, because parts never align to the pixel grid; the connectivity 4 or 8 in blob analysis comparison shows the effect on circular targets.
Step by step: image to hopper command
- Mount the camera centered over the platform, at a distance where the full platform plus about 10% margin fills the frame. Use a rigid mount — both the scale and the centroid reference live in this geometry.
- Calibrate the scale with a target of known length lying on the platform: s equals its length in mm divided by its length in pixels. Store s in the recipe; do not recompute it per image.
- Light for silhouettes. A backlit or translucent platform gives dark parts on a bright field and the cleanest separation; for shiny parts, a diffuse dome flattens the highlights. If you freeze motion with a strobed LED bank, mount it so an operator cannot stare into it at eye level, and follow the illuminator's rated safety class.
- Fix the exposure before you tune the threshold. Keep it at or under 2 ms: at 50 mm/s of vibration, 2 ms smears the image by 0.1 mm — under one pixel at 0.15 mm/px — while 10 ms smears 0.5 mm and starts merging neighbors. Lock exposure and gain; runtime camera parameter control names the parameters to pin.
- Label the blobs 8-connected and filter by area. The area band is the part signature; everything outside it is noise.
- Read the count. N is the number of blobs that passed the filter.
- Compute the area-weighted centroid and convert with s, minding the pixel-origin convention above.
- Compare both numbers with the control bands and write them to the PLC: N commands the hopper, the centroid offset commands the vibration lanes. Log both values — drift in either one is an early warning.
Worked example: 40 parts crowded left on a 216 × 162 mm platform
Inputs. An overhead camera covers a 216 × 162 mm platform with a 1440 × 1080 image, so the scale is s = 216 / 1440 = 0.15 mm/px on both axes (162 / 1080 = 0.15). The parts are 9 mm discs: each has an area of π × 4.5² = 63.6 mm², which is 63.6 / 0.15² = 2,827 px², about 60 px across. The area band accepts 2,000 to 4,000 px²: a single disc passes, a touching pair near 5,650 px² is flagged rather than counted, and debris below 2,000 px² drops out.
Count. The tool returns 40 blobs inside the band, so N = 40 parts on the platform.
Centroid. Weighting, shown on three blobs from one corner: areas 2,000, 3,000 and 4,000 px² at x = 300, 400 and 500 px give x̄ = (2,000×300 + 3,000×400 + 4,000×500) / (2,000 + 3,000 + 4,000) = 3,800,000 / 9,000 = 422 px — 22 px right of the plain average of the centers, pulled by the heaviest blob. Across the whole platform, the 40 identical parts all crowd the left and their mean blob center sits at x = 400 px, so the weighted centroid lands there too: 400 px × 0.15 mm/px = 60.0 mm from the left edge. The platform center is at 216 / 2 = 108 mm, so the cluster stands 108 − 60 = 48 mm left of center.
Sanity check. The parts cover 40 × 63.6 = 2,544 mm² of a 216 × 162 = 34,992 mm² platform — a 7% fill, low enough that blobs stay separate — and each blob carries about 2,800 px, far above the 100 px floor for a stable count.
Decision. The control bands for this line: the hopper feeds while N < 30 and pauses while N > 50; the lanes rebalance when the centroid leaves a ±30 mm band around center. N = 40 keeps the hopper quiet. The 48 mm offset fails the band, so the controller boosts the left vibration lane — or biases the hopper drop point to the right — until the centroid comes back inside ±30 mm.
Smart camera or vision controller?
The split is stations and screens. A smart camera runs the whole pipeline — threshold, labeling, area filter, centroid — on the device and hands the PLC a count and a centroid; nothing about one feeder needs a PC. A vision controller earns its rack space when several platforms report to one cabinet, when you want stored trends of N and offset, or when heavier tools join later — the growth path in AI vs rule-based smart camera inspection.
| Smart camera | Vision controller | |
|---|---|---|
| Where the pipeline runs | On the camera itself | In a fanless controller in the cabinet |
| Stations served | One platform | Several cameras and platforms |
| Output to the PLC | Count and centroid over Ethernet | Same, plus logging and dashboards |
| Best fit | A single feeder, minimal cabinet | A line of feeders or planned tool growth |
For a stand-alone platform, the SC5000X series keeps every step on the device:
- Interface
- GigE
- Resolution
- 6-10 MP
- Sensor format
- 1/2.4"
- Shutter
- Rolling
The card's shutter line says rolling: on a vibrating bed, hold the short exposure from step 4 so the scan lines do not tear.
When the platform is small and wiring must stay minimal, the LS-SMC-0063 arrives with its own lens and white polarized light, so the silhouette holds as the factory light changes:
- Interface
- GigE
- Resolution
- Up to 3 MP
Its 16 mm lens and 1.6 MP sensor match a single small platform, and the light source travels with the camera.
When several feeders share a cabinet, a controller serves them all and keeps the trends:
- LAN ports
- 5+ LAN ports
- USB 3 ports
- 3-4 USB 3 ports
- Light outputs
- 4 built-in channels
- Memory
- 8 GB
The MV-VC3301H-128G66 ships with a VM6200Pro license, 8 GB of memory and an Intel Core i3 — enough to run blob tools on several cameras and store the counts.
When the count or the centroid lies
Touching parts. Two discs that touch label as one blob of double area: N drops by the pair count and the centroid weight shifts. The area band catches it — 5,650 px² where singles run 2,827 px² is a merged pair — and the durable fix is at the platform: lower fill, backlight separation, or an erosion or watershed split for sticky mixes. Budget a 2% count tolerance for merges on a healthy bed.
Glare and drifting light. A moving highlight on metal reads as a bright blob and inflates N; a shadow splits one part in two. Control the light as in step 3 before touching the threshold — the failure mode is the one in ambient light variation in pick and place vision.
Motion blur. Parts mid-bounce smear and neighbors merge. Hold the 2 ms ceiling from step 4, tested at full vibration amplitude.
Scale drift. The centroid in mm is only as good as s. At a 500 mm working distance, a 5 mm camera shift changes the scale by 1% and moves a 60 mm centroid by 0.6 mm — harmless against a 30 mm band, but recalibrate after any mount change.
Checks before you order
- The smallest part covers at least 100 px of blob area at final scale — about 10 px across; below that the count flickers with the threshold.
- Platform fill stays under about 30%; the example runs at 7%, where blobs never bridge.
- Exposure locked at or under 2 ms, proven at full vibration amplitude.
- Scale calibrated on the platform itself and rechecked after any mount work.
- The camera covers the platform plus margin, and the count and centroid land inside your PLC cycle — 10 fps covers a 5 Hz lane-control loop twice over.
- A binary preview wired to the HMI for commissioning, the pattern in live binary image preview for defect inspection.
Size the camera from your own numbers — the calculator converts your field of view and smallest feature into the pixel count you need:
Start in smart cameras for a single platform or vision controllers for a line, match camera, lens and light in the system configurator, or bring your platform dimensions and part mix to us through the contact page and we will run the count-and-centroid math with you before you order.
Questions
How many pixels does each part need for a reliable count?
Plan for at least 100 px of blob area — about 10 px across — for the smallest part at final scale; below that, small threshold moves change the count frame to frame. More pixels also sharpen the centroid, because a blob's centroid precision scales with its diameter in pixels. The worked example runs at roughly 2,800 px per part, which is comfortable. If your smallest part lands under 100 px, narrow the field of view or move to a camera with more pixels.
Why weight the centroid by blob area instead of averaging the blob centers?
Because the feeder signal is a center of mass, not an average of positions. With identical, separated parts the two are equal. They part ways when blob sizes differ — a large part or a merged pair — because the plain average of centers drifts toward the oversized or merged blob while the area-weighted sum stays at the true mass center; the three-blob arithmetic in the example shows a 22 px gap. Use the plain mean only when every part is the same size and none touch.
Can the wrist camera we already use for picking give the count too?
Not if it returns a single target pose per image — that output cannot represent 40 parts. Some wrist cameras expose the full image or a blob tool, and the same pipeline then applies, but the wrist mount is the wrong geometry for this job: it sees the platform close up and at an angle, and the view changes with every robot pose. Give the balance signal a fixed overhead camera and leave the wrist camera to the pick.
How do I stop the vibration from blurring the parts?
Set the exposure from the motion: smear in mm equals part speed in mm/s times exposure in seconds. At 50 mm/s, a 2 ms exposure smears 0.1 mm — under one pixel at 0.15 mm/px — while 10 ms smears 0.5 mm and adjacent parts begin to merge. Lock exposure and gain once they are set, so auto control cannot stretch the time when the scene darkens.
What happens when two parts touch and count as one?
The blob count drops by the number of merged pairs, so 40 parts can read 38. Catch it in the area band: a merged pair carries about double the single-part area, so flag any blob well above your upper limit instead of silently counting it. Prevent merges by keeping the fill low — the example runs at 7% — backlighting the platform, and adding an erosion or watershed split for sticky parts.


