ApplicationsGuide

Counting hollow particles in an image with backlighting

Count hollow particles in an image by backlighting a monolayer, binarizing silhouettes and filtering by hole area ratio, with the arithmetic shown.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01Make the decision topological, not photometric
  2. 02Size the optics from the thinnest wall
  3. 03Pick the backlight: size, colour, diffusion
  4. 04Run the pipeline in five steps
  5. 05One frame, worked end to end
  6. 06Failure modes and the fix for each
  7. 07Checks before you trust the count
  8. 08Parts and the next step
  9. 09Questions

Counting hollow particles — shells whose edges are fully closed around an empty centre — breaks when the software fits circles to grey levels: move the room lights and the circles appear and vanish. The fix is to make the decision topological instead of photometric. Backlight a monolayer of the powder so every particle becomes a dark silhouette on a bright field, binarize, fill, and count enclosed holes, then accept a shell whose hole area sits between 10% and 50% of its filled outline. This guide works the numbers end to end: pixel size, focal length, f-number, exposure, the acceptance window and the failure modes, so you can size a station and trust the count it gives.

Make the decision topological, not photometric

Circle fitting reads shape from grey levels, so its score moves with ambient light, lamp ageing and surface finish. The defect definition needs none of that: a hollow particle is a closed dark ring around a bright centre, which in binary terms is a blob with exactly one enclosed hole. Hole count and hole area belong to the binary shape, and they survive lighting changes that wreck grey-level matching.

Contrast headroom is the reason. In a backlit silhouette the shells sit under 60 grey levels and the open field over 240, roughly 180 levels apart. Any threshold between 100 and 200 then yields the same binary image, so a ±40-level ambient swing cannot flip a single decision. Front-lit matte powder rarely manages 40 levels between shell and background; the threshold lives inside the noise and the count moves with the room. Where the station cannot be shaded, add a bandpass filter matched to the backlight and recover the headroom optically.

A backlight also implements the spec exactly. An open or cracked shell has no enclosed hole and scores zero by construction — no shape model, no per-shift tuning.

Size the optics from the thinnest wall

Work backwards from the thinnest wall the lot can produce. Give that wall at least 6 pixels; below that, its two edges blend into the bore and the hole closes up in the binary image. Powder with walls down to 50 µm therefore fixes the pixel size at 8 µm or finer.

pixel size = field of view width / horizontal pixels magnification m = sensor width / field of view width f = WD × m / (1 + m)

Take a 5 MP 2/3-inch mono camera, 2448 × 2048 pixels and 8.8 mm sensor width, framing a 20 mm field:

  • pixel size = 20 mm / 2448 = 8.2 µm.
  • wall check: 50 µm / 8.2 µm = 6.1 pixels; a 500 µm particle spans 61 pixels.
  • magnification: m = 8.8 mm / 20 mm = 0.44.
  • focal length at a 115 mm working distance: f = 115 mm × 0.44 / 1.44 = 35.1 mm, so a 35 mm lens is the pick.

A 35 mm, 2/3-inch, C-mount, 6 MP lens is a standard part for exactly this band:

Machine vision lenses35 mm, 2/3", 6 MP, C-mount machine vision lens (LS-FFL-0679)LS-FFL-0679
Type
Machine vision fixed
Sensor format
2/3"
Mount
C-mount
Resolution
6-10 MP
$219.00View partBuild a system with it

Check depth of field and diffraction before locking the aperture. Object-side depth of field is approximately 2 × N × c × (1 + m) / m², with N the f-number and c the pixel size. At m 0.44 and c 8.2 µm, f/5.6 gives 2 × 5.6 × 8.2 µm × 1.44 / 0.1936 = 683 µm, and a flat monolayer sits well inside it. Diffraction at f/5.6 spreads the Airy disk to 2.44 × 0.63 µm × 5.6 = 8.6 µm, about one pixel. Closing to f/8 grows it to 12.3 µm, 1.5 pixels, which starts eating a 6-pixel wall, so hold f/5.6 as the working value. The trade is laid out in aperture, f-number and depth of field, and Airy disk sizing against pixel pitch matters once walls run thinner. For how many pixels a gauging task needs, see camera resolution for dimensional inspection, and filter by focal length and format in the machine vision lenses finder.

Exposure follows the blur budget. Slide stationary and backlight constant on: start at 10 ms and raise exposure until the open field reads 240-250 grey levels. On a line moving at 50 mm/s, a 10 ms exposure smears each particle by 50 mm/s × 10 ms = 0.5 mm, which is 61 pixels at 8.2 µm — unusable. Strobe at 200 µs instead and the smear drops to 10 µm, about 1.2 pixels.

Punch your own sensor and field into the focal length calculator and re-derive the lens:

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Pick the backlight: size, colour, diffusion

Lit area covers the field plus positioning slack. A 20 mm field nudged by hand wants 50 mm or more of margin per side, which any 100 mm-class panel clears. The LS-BKL-1468 is a flat red backlight with a 150 × 150 mm lit area. That leaves over 60 mm of slack per side of the example field, or coverage for a full 100 × 100 mm slide.

Colour: red near 630 nm sits where mono sensors are most sensitive and pairs with a red bandpass filter to strip room light. Infrared helps when visible glare or coloured powder crowds the image: the LS-BKL-0416 lights 136.4 × 136.4 mm at 850 nm, needs no driver, and runs constant-on only, which suits a stationary slide. One eye-safety note: 850 nm is nearly invisible, so an infrared panel can look deceptively dark — keep hands and eyes out of the beam while arranging parts.

Diffusion: opaque shells separate cleanly over a diffuse flat panel. Translucent shells let diffuse light bleed through the wall, the bore stops being bright and the hole disappears; a collimated backlight blocks those off-axis rays, so the wall reads dark and the bore stays bright. The LS-BKL-0830 is a 120 × 120 mm collimated backlight sized to this field. The trade-offs are worked through in collimated or diffuse backlight for edge gauging, and collimated backlighting that renders transparent parts solid black covers the translucent case in full.

Specification LS-BKL-1468 LS-BKL-0830 LS-BKL-0416
Wavelength 625 nm – 850 nm Infrared
Voltage – 24 V 24 VDC
Operating temperature – 0 to 50 °C 0 to 60 °C
Price $389.00 $309.00 $2,109.00 · quoted

Values as printed in each product's data sheet; open a part for its drawing and full specifications.

Run the pipeline in five steps

  1. Acquire. One frame, backlight only. Shade the station or fit the matched bandpass filter; the open field must read 240-250 grey levels with the shells under 60.
  2. Binarize. Fix the threshold at 128 and leave it there. With 180 levels of separation, any value from 100 to 200 produces the same binary image, so there is nothing to re-tune between shifts. If dust or slide stains clutter the frame, clean them up before thresholding — the filter-before-threshold routine and the binarization fixes for particle measurement both apply here.
  3. Filter blobs. Keep blobs between 250 and 7,500 px². At 8.2 µm/px a filled 300 µm particle covers π/4 × 300² = 70,700 µm², about 1,050 pixels; an 800 µm one covers about 7,480. The floor removes dust and fragments; the ceiling removes clumps bigger than any single particle.
  4. Fill enclosed holes and count them. A hole is any background region not connected to the image border. Fill each blob's holes and record how many it holds.
  5. Classify. Hollow means exactly one enclosed hole, that hole at least 100 px² (11 pixels across — smaller sits below the decision's resolution), and the ratio within 0.10-0.50. Everything else is not a hollow particle under this spec.
ratio = hole area / filled outline area concentric shell: ratio = (d / D)², with d the bore and D the outer diameter ratio 0.10 to 0.50 means d/D = 0.32 to 0.71, i.e. wall thickness 15-34% of D

The window is derived, not guessed. Substituting d = D − 2t turns the ratio into (1 − 2t/D)²: ratio 0.10 gives sqrt(0.10) = 0.316, so t = 34% of D; ratio 0.50 gives 0.707, so t = 15% of D. The lower bound also rejects fragments with slivers of trapped background; the upper bound rejects bright pockets trapped between touching solid particles. Measure areas the same way every frame — pixel counting on the binary image is the reference method.

One frame, worked end to end

Suppose a frame holds 412 blobs that survive the area filter. Five of them score like this:

Particle Outer D Bore d Ratio (d/D)² Enclosed holes Decision
Thin shell 500 µm 300 µm (300/500)² = 0.36 1 hollow
Solid particle 500 µm none 0 0 not hollow
Thick shell 400 µm 80 µm (80/400)² = 0.04 1 rejected, below 0.10
Very thin shell 600 µm 460 µm (460/600)² = 0.59 1 rejected, above 0.50
Cracked shell 450 µm 350 µm with a 60 µm gap hole leaks to the border 0 rejected, edges not fully closed

If 37 of the 412 classify as hollow, the hollow fraction is 37 / 412 = 0.0898, reported as 9.0%. Every input traces back to the optics section: 8.2 µm pixels, f/5.6 with 683 µm depth of field, a 10 ms exposure, thresholds pinned at 128.

Failure modes and the fix for each

  • Touching particles. Two overlapping solids can trap a bright pocket that passes the hole test. Guard twice: reject blobs with filled area above 1.5× the batch median (a 500 µm median is 2,920 px², so the line sits at about 4,380 px²), and reject blobs with outline roundness under 0.9.
  • Translucent shells. Diffuse backlight bleeds through the wall and fills the bore. Switch to the collimated panel before touching any threshold.
  • Dust and stains. They silhouette like tiny particles, and the 250 px² floor removes them. If the glass is badly fouled, contrast itself degrades — clean or replace the slide. The dark contaminant lighting-then-blob workflow is the same lighting-first logic on a different part.
  • Fused shells. Two shells joined by a bridge produce one blob with one odd-shaped hole. Require hole roundness 4π × hole area / perimeter² ≥ 0.8 and the odd shapes drop out.
  • Walls thinner than assumed. If the narrowest wall measures under 5 pixels in a captured frame, halve the field on the same camera: pixels drop to 4.1 µm and a 25 mm-class lens takes over at a shorter working distance. Re-run the two optics formulas.
  • When the approach does not fit. Poured layers deeper than one particle merge silhouettes; spread a monolayer or change methods. A silhouette also reports the bore ratio only — for per-particle wall thickness or 3-D hollowness, image single particles at higher magnification.

Checks before you trust the count

  • Histogram. Two peaks, background at 240 or above and shells at 60 or below. A valley shallower than 100 levels means the light needs work before the software does.
  • Wall resolution. Measure the narrowest wall in a real frame of your powder: 6 pixels or more.
  • Golden set. Hand-classify 100 particles and require 98% agreement before the count goes into a report; rerun the set after any lighting or optics change.
  • Threshold sweep. Thresholds 100 through 200 must all return the same count. If they disagree, contrast is too low — back to the backlight.
  • Repeatability. Count the same slide five times; the spread must stay within 1%, about 4 particles on a 412-blob frame.
  • Orientation. Rotate the slide 30° and recount. Area and ratio are orientation-independent, so the hollow count should repeat within ±1 particle.

Parts and the next step

The bench version is a 5 MP mono camera, the 35 mm C-mount route above and a red flat panel. The embedded version fits in one housing: the LS-SMC-0063 is a 1.6 MP GigE smart camera with a 16 mm lens and built-in white light (polarized, transparent-light) that runs the threshold-blob-hole chain on device at up to 60 fps.

Smart cameras & vision sensors1.6 MP smart camera, 60 fps, 16 mm lens, white light (polarized, transparent light) (LS-SMC-0063)LS-SMC-0063
Interface
GigE
Resolution
Up to 3 MP
$1,110.00View part

Size the lens in the lens finder, pick the panel in the backlight category — the red flat 150 × 150 mm backlight covers the example field — and let the lights configurator or the lens configurator assemble the station. If the count belongs on the device, compare smart cameras. More worked inspection setups sit on the applications topic page, and unusual lots are worth a note through the contact page.

Questions

Why does a circle-fitting count change when the room lights change?

Circle finders score candidates from grey levels, so an ambient shift moves every score and the threshold with it; a shell that passed at 09:00 fails at 15:00. The backlit silhouette pins shell and background about 180 grey levels apart, so any threshold from 100 to 200 returns the same binary image and a ±40-level ambient swing cannot flip a decision. Where the station cannot be shaded, a bandpass filter matched to the backlight recovers most of that headroom.

What does the 0.10-0.50 hole area ratio window actually accept?

For concentric shells the ratio is (bore / outer diameter)², so 0.10-0.50 accepts bores from 32% to 71% of the outer diameter — walls from 34% down to 15% of D. Below 0.10 sit thick-walled, nearly solid particles; above 0.50 start the bright pockets trapped between touching solids. Narrow the window around your golden samples once they exist; the derivation, not the constant, is what travels.

Can I count hollow particles on a moving line?

Yes, with a strobe. Budget motion blur at 1-1.5 pixels: at 50 mm/s a 10 ms exposure smears a particle 0.5 mm, about 61 pixels at 8.2 µm/px, while a 200 µs strobe holds the smear near 10 µm, about 1.2 pixels. Pick a strobe-rated high-power backlight fired from a trigger, and keep the bench exposure arithmetic unchanged.

How hollow is a particle that scores 0.36?

The area ratio is a 2-D measure. For a spherical shell with d/D = 0.6, the hollow volume fraction is (0.6)³ = 0.216, so about 22% of the sphere's volume is void and the wall carries the remaining 78%. Use the area ratio to sort shells; use the cube only where the particles are known spheres.

Will translucent shells still count correctly?

Not on a diffuse panel: light bleeding through the wall fills the bore and the enclosed hole disappears, so translucent shells read solid. A collimated backlight blocks the off-axis rays that would otherwise punch through the shell, keeping the wall dark and the bore bright — the same behaviour that renders fully transparent parts as solid black silhouettes. If holes vanish on a translucent lot, change the diffusion before the threshold.