The Cost of Switching Between Dark-Field and Coaxial with Software-Defined Lighting
LIGHTING
Plated terminals and matte molding differ 398 to 1 in brightness, and every added lighting state costs 16.7 ms.
For inspecting a connector that mixes nickel-plated terminals and matte molding with one lighting head, I calculated the brightness ratio one exposure would have to hold and the time each lighting state adds.
About 10 min read
Even a single connector commonly mixes two or more materials. The target is a board-to-board connector molded in black LCP resin. The molded body is matte, scattering light in every direction, and I assume a diffuse reflectance of around 5 %. The terminals are nickel-plated and bounce light like a mirror; the normal-incidence reflectance calculated from the optical constants of nickel (Johnson and Christy 1974, n = 1.92 and k = 3.61 at 549 nm) is 64 %, and allowing for the roughness of the plating, I assume a specular reflectance of 60 %. The defects to find are 15 μm scratches and dents on the terminals and short shots and burrs on the molding.
Shoot both materials under one light and the exposure set for one side erases the other. Set it for the terminals and the molding sinks into black, taking the outline of a short shot with it; set it for the molding and the terminals saturate white, wiping out the scratches. The line stops while the lighting angle is reworked on site, and pushing ahead with a compromise setting lets misses pile up quietly. False alarms get filtered out at re-inspection, but misses ship as they are.
Software-defined lighting1 puts light sources at different angles into one lighting head as separate channels and stores, as a recipe2, which channels to turn on in which order for each part. I judge this approach by two numbers: the brightness ratio one exposure would have to hold, and the time added for each extra lighting state. The camera is assumed to be 4,096 × 3,000 px with 3.45 μm pixels at 60 fps, and with the object pixel set at 5 μm, a 15 μm defect spans 3 pixels in a 20.48 × 15.0 mm field of view.
398 to 1 inside one part
Under a coaxial light3, a flat plated surface mirrors the image of the source, so the brightness entering the lens is specular reflectance × source brightness. Matte molding scatters what it receives over the whole hemisphere, so its brightness becomes diffuse reflectance × source brightness × the solid angle4 the source occupies ÷ π. Assuming the diffuser behind the half mirror appears from the part at a half-angle of 10°, the solid angle is 0.0947 sr, and the ratio of the two brightnesses is 0.60 × π ÷ (0.05 × 0.0947) = 398 to 1, or 8.6 stops of exposure.
In an 8-bit image, putting the plated surface at 242, just short of saturation, leaves the molding at 0.6, indistinguishable from noise. Even at 12 bits the molding sits at 9.8 out of 4,095, too few gray levels to hold the subtle shading of a short shot. By my calculation, the smaller the source appears, the wider this ratio grows: 1,580 to 1 at a 5° half-angle. The reason attempts to see both materials in one exposure fail lies in this calculation.
A dome cuts the ratio to 12 to 1, but
With a dome light5, whose source covers the whole hemisphere, the solid-angle term becomes π, and the ratio shrinks to specular reflectance ÷ diffuse reflectance, or 12 to 1 (3.6 stops). Both materials fit into one exposure, which is a good condition for seeing short shots and burrs on the molding as outlines. The price is the scratches on the plating. A dome sends light of equal brightness from every direction, so a scratch wall reflects the same brightness whichever way it tilts, and the dome erases scratches and texture on glossy surfaces together.
This is where the right light for each defect splits apart. A plating scratch rises as a bright line under dark field6, which lights from a low angle and sends flat reflections out of the lens, while dents or stains on the terminal surface show as dark spots under coaxial light wherever the surface leaves the plane. Short shots on the molding have their most stable outline under the dome. Three defects need three angles. With fixed lighting, you either split the work across three stations or sacrifice two defects to one angle.
Each state costs 16.7 ms and 12.29 MB
The arithmetic is simple. Turning on three angles in sequence from one head takes one frame per state. LEDs switch on and off in microseconds, so what actually sets the pace is the camera frame period: at 60 fps, 16.7 ms per state, or 50 ms for three states. Exposure is longest for dark field, assumed at about 1.5 ms, but it is shorter than the frame period and does not change the total. The data comes to 3 × 12.29 MB = 36.86 MB per part, which one 10GigE link (effective 1.15 GB per second assumed) can carry in 32 ms.

The figure is a timeline in which the dark-field, coaxial and dome channels turn on one per frame while the camera exposes every frame. With a 1-second part tact, the 50 ms of three states is 5 % of the tact, and 10 % at 0.5 seconds. Every added state brings another 16.7 ms and 12.29 MB, so five states become 83.3 ms and 61.44 MB, and when choosing the number of states, I cap it at 10 % of the tact. The part has to stay still during those 50 ms for the three frames to capture the same spot, and the mechanical conditions for aligning frames on a moving part need a separate review.
398×
Brightness ratio of nickel plating to matte molding under coaxial light (10° source half-angle assumed)
16.7ms
Time added by one more state (60 fps)
36.86MB
Data for one part shot in three states
Recipes that never try all 32 channels
Channel counts are climbing fast. UnitX introduces its OptiX imaging system as having 32 independently controllable LED channels and explains that they can be configured for dark-field, bright-field, coaxial, dome or multi-angle 2.5D illumination. The same article notes that a typical setup cycling through several lighting states completes a round within 100 ms, which describes a generic configuration and is not a spec of that product. Turning 32 channels on and off gives 2 to the 32nd power, about 4.3 billion combinations, so a recipe cannot be built by testing them all.
I build the recipe backward from the defect list. Picking one suitable angle per defect type from the geometry above starts this connector at three states, and a state gets added only when the test images show a defect that no existing state separates. Whenever a state is added, I write down its 16.7 ms and 12.29 MB, and once the total starts to pass 10 % of the tact, I review whether two defects can share one state before adding more. On the transfer side, GigE Vision 3.0, announced by A3 on May 13, 2026, added RDMA transport, giving hosts that receive frames from several states in a row an option for lightening the CPU load.
The three-state setup goes into a single table. The lens is assumed at 0.69 magnification with an object-side NA of 0.04, and the height difference between the terminal tops and the molding top is taken as within 0.2 mm. With the allowed blur at 2 pixels (10 μm), the depth of field7 is about 0.25 mm, so both surfaces fit in one focus.
| Inspection item | ① Minimum defect size | ② Optical setup · WD | ③ Algorithm parameters · in plain words |
|---|---|---|---|
| Scratches on nickel-plated terminals | 15 μm = 3 pixels (5 μm on the object) | 12 MP with 3.45 μm pixels, 0.69 magnification lens (object-side NA 0.04 assumed), field of view 20.48 × 15.0 mm, WD 90 mm (lens spec assumed), dark-field channel (15° from horizontal) | Bright-line detection in the dark-field frame, exposure about 1.5 ms (assumed) |
| Dents and stains on terminals | 15 μm | Same lens, coaxial channel (398-to-1 brightness ratio of plating to molding) | Detect departures from flatness as dark spots in the coaxial frame; the molding is not judged in this frame |
| Short shots and burrs on molding | 15 μm | Same lens, dome diffuse channel (brightness ratio 12 to 1) | Compare against the reference outline in the dome frame; both materials fit in one exposure |
Read the table down its columns and the lens and camera stay the same across all three states; only the lighting channel and the defect judged in that frame change. The gain from switching lighting in software comes from this sharing, and the cost is calculated in advance as number of states × 16.7 ms.
Lines where fixed lighting does better
A multi-channel head does not suit every line. If the part is a single material, or one dome brings the brightness ratio within one exposure and there is only one kind of defect, a single fixed light is cheaper and easier to maintain. On a line where parts pass without stopping, the part moves between states and the frames have to be aligned, so splitting into stations may be simpler. In my judgment, the more often the product changes and the more mixed the materials, the more it pays to change only the recipe. On a strongly glossy surface such as nickel plating, shifting a channel angle by just a few degrees changes contrast a great deal, so whether the angles in the table fit as they are cannot be guaranteed before a sample test.
A multi-channel head costs more than a single light, but folding three stations into one also cuts cameras, lenses and floor space. In exchange, the engineering time to build and maintain recipes appears as a new cost, so comparing quotes is more accurate with both the equipment price and the recipe upkeep time on the table. This article explains technology and is not investment advice. See our Disclaimer.
Field Note
Building a recipe for this connector, I would shoot the terminals and the molding one channel at a time and measure their brightness before mixing channels. Checking whether the plating-to-molding ratio comes close to the calculated 398 to 1, and whether the dome brings it down to 12 to 1, gives a basis for choosing angles and exposures. Next, I shoot one set of defect samples in all three states, note in a table which frame separates each defect best, and add a state only when some defect separates in no frame. When the part changes, I fill this table in again from scratch.
Field Checkpoints
Once per-channel brightness measurements and defect-sample shots have confirmed the assumptions behind the calculations, what remains is the list below.
- Does the three-channel head (dark-field ring, coaxial, dome) fit within the 90 mm WD without hitting the lens front?
- Have you measured the plating-to-molding brightness ratio to check whether one exposure can hold it? (Calculated: 398 to 1 coaxial, 12 to 1 dome)
- Does number of states × frame period (16.7 ms at 60 fps) stay within 10 % of the tact?
- Does the part stay still during the 50 ms it takes to shoot three frames?
- Does the height difference between terminal tops and molding top fall within the 0.25 mm depth of field?
- Does the recipe record which state’s frame judges each defect?
Frequently Asked Questions
Can all channels be lit at once to finish in one frame?
Lighting several channels at once makes the contrast each channel revealed cover the others, the way a scratch glowing under dark field sinks into the bright background of coaxial light. Lighting channels of different colors at the same time and separating them with a color camera is one approach, but each material reflects each color differently, which calls for yet another calibration.
Does the recipe have to be rebuilt for every new part?
If the material combination and defect list stay the same, it is often enough to keep the angles and order and retune only the exposures. When the material changes, the brightness ratio changes, so the one-channel-at-a-time check runs again. Recording the channel order, the exposures and the defect judged in each frame in the recipe keeps anything from being missed when the recipe changes.
Glossary
- [1] Software-defined lighting multi-channel lighting
A lighting approach that puts several source channels at different angles into one head and changes which channels light, and in what order, through a software recipe. ↩ - [2] Recipe inspection recipe
A bundle of settings recording, for each part, which channels to light, in what order, at what exposure, and which defect each frame judges. ↩ - [3] Coaxial light on-axis light
Lighting sent along the lens axis through a half mirror. Flat metal shows bright, and spots that leave the plane show dark. ↩ - [4] Solid angle steradian, sr
An angle expressing the apparent area a source occupies as seen from a point. A cone with half-angle β is π × sin²β sr. ↩ - [5] Dome light cloudy-day light
Lighting in which a hemispherical diffuser sends light evenly from every direction. It suppresses both highlights and texture on glossy surfaces. ↩ - [6] Dark field dark field
Lighting from a low angle that sends reflections from flat surfaces out of the lens so only light-bending spots such as scratches appear bright. ↩ - [7] Depth of field DOF
The front-to-back range on the object side that counts as in focus. By geometric approximation, allowed blur ÷ NA. ↩
References
- UnitX, Dark-Field Illumination for Machine Vision in 2026 (OptiX with 32 independently controllable LED channels, dark-field, bright-field, coaxial, dome and 2.5D configurations, generic multi-state illumination cycle within 100 ms)
- A3, A3 Officially Releases GigE Vision 3.0, Opening New Possibilities in Machine Vision (2026-05-13, RDMA transport over RoCEv2)
- refractiveindex.info, Optical constants of Ni (Johnson and Christy 1974) (n = 1.92 and k = 3.61 at 0.549 μm, original source Phys. Rev. B 9, 5056–5070)
- Formulas: normal reflectance = ((n − 1)² + k²) ÷ ((n + 1)² + k²), solid angle = π × sin²(half-angle), coaxial brightness ratio = specular reflectance × π ÷ (diffuse reflectance × solid angle), dome brightness ratio = specular reflectance ÷ diffuse reflectance, sequential capture time = number of states ÷ fps, data = number of states × width × height × bytes, depth of field ≈ allowed blur ÷ NA
Related reading — What HDR Multi-Exposure Fusion Does When Specular and Matte Share One Frame · How Strongly Cross-Polarization Suppresses Glare Depends on the Lighting Angle · Coaxial Light Alone Does Not Settle Fine Scratches on Polished Metal


