What Optical Design Needs to Not Miss Defects on a High-Speed Line
OPTICS
Freezing a 40 μm scratch on a part passing at 1 m/s means the light must finish within 13.3 μs, and the aperture and the light have to split a 7.5-fold light shortfall.
For a 12 MP camera with a 25 mm lens, I calculated the strobe width, aperture and depth of field, diffraction, and trigger jitter in turn.
About 10 min read
On a line where dozens of parts pass every second, a scratch of a few tens of μm does not simply show up, however good the camera. If the part moves while the shutter is open, the scratch edges stretch along the direction of travel and blend into the background, and the inspection program passes the blurred scratch as good. A missed scratch only surfaces after assembly and comes back as rework and return costs. What solves this is less the camera spec sheet than the calculation between the light-on time and the lens aperture.
The surface comes first. Matte silkscreen on a PCB scatters light evenly and is less sensitive to the lighting angle, while a glossy black molded part has strong specular reflection1, so its brightness changes a lot with small changes in angle. The calculation below assumes a near-matte surface, and whether the same numbers hold on glossy molded parts cannot be guaranteed before a sample test.
The assumed setup is a 12 MP global shutter camera with 4,096 × 3,000 px and 3.45 μm pixels, fitted with a 25 mm lens. Seeing a 40 μm scratch over 3 pixels takes 13.3 μm per pixel, which gives a 54.6 × 40.0 mm field and a WD2 of about 122 mm from the lens principal plane to the part.
The parts pass at 1 m/s, and a stationary part is taken to get enough brightness at f/5.6 with a 100 μs exposure under continuous light. Speed control of the conveying mechanism needs a separate review, and the speed is used here as a given value.
Smear is speed times light-on time
Keep the 100 μs exposure set for a stationary part, and a part moving at 1 m/s travels 100 μm in that time. With 13.3 μm per pixel, the scratch edge smears across 7.5 pixels, and a 3-pixel scratch is buried in the smear. Smear length is speed times light-on time, so holding it within one pixel requires the light to finish within 13.3 μm ÷ 1 m/s = 13.3 μs. A light that fires strongly for only that brief time is a strobe3, and even with a longer camera exposure window, the time the image forms is set by the strobe width.

In the graph, a 20 μs pulse smears 1.5 pixels in the 13.3 μm-per-pixel setup. Shrink the pixel coverage to 8 μm to see the scratch over 5 pixels, and the limit drops to 8 μs. The smaller the pixel coverage, the shorter the allowed light-on time in proportion, so a decision to raise resolution is the same as a decision to buy more light.
Where to find 7.5 times more light
Collecting in 13.3 μs the light that used to arrive over 100 μs takes 7.5 times, or 2.9 stops4, more light for the same image brightness. There are three places to get it. Open the lens aperture to let in more light, raise the instantaneous brightness of the light, or boost the signal with camera gain. Gain adds no light and amplifies noise along with the signal. For defects with a small brightness difference from the background, such as scratches, it is the last resort.
Opening the f-number5 one stop from f/5.6 to f/4 brings 1.96 times the light, leaving the remaining 3.8 times to the lighting. Covering it all with the aperture would mean opening to f/2.0, and the price is paid in depth of field. The 3.8 times on the lighting side would raise heat by the same amount with continuous light, but a strobe fired as short pulses leaves room to deliver it by overdrive, briefly driving the current above the rating. The pulse width and current conditions are covered in the strobe overdrive article.
Opening the aperture wears down depth of field first
Depth of field6 is roughly proportional to the f-number. In this setup, with a circle of confusion of two pixels, it is 1.45 mm at f/5.6, 1.04 mm at f/4 and 0.52 mm at f/2.0. If the fixture and the part itself let the inspected surface height wander by ±0.5 mm, the depth of field needed is 1.0 mm, so f/4 barely fits and f/2.0 covers only half the height variation. That is why the path of covering all the light with the aperture is closed.
Close the aperture to gain depth of field, and this time diffraction7 stands in the way. The diameter of the spot a point spreads into as light passes the lens opening is 2.44 × wavelength × working f-number, and with 520 nm light at this magnification, f/8 gives 49.4 μm on the object side, larger than the 40 μm scratch. It shrinks to 34.6 μm at f/5.6 and 24.7 μm at f/4, so the aperture of this setup is boxed in between f/4 and f/5.6. By my rule, leaving it at f/4 and taking 3.8 times from the light is the combination that protects both depth of field and resolution against diffraction.
13.3μs
upper limit of light-on time that holds smear to one pixel (1 m/s, 13.3 μm per pixel)
3.8×
light the lighting must add after opening one stop to f/4
1.04mm
depth of field at f/4, matching the assumed ±0.5 mm height variation
A jittery trigger moves the part, not the defect
Even with the light cut short, if the moment it fires wobbles, the part lands in a different place in every frame. If the trigger8 signal reaches the camera and the light over hardware wiring and wobbles within ±5 μs, the position difference at 1 m/s is ±5 μm, 0.38 pixel, with almost no effect on inspection. If the same signal passes through software and wobbles by ±1 ms, the position difference is ±1 mm, ±75 pixels. The scratch comes out sharp while the part drifts back and forth by 75 pixels in the frame.
This jitter comes back as a cost when designing the ROI9, the region to inspect. If the part position moves ±75 pixels, the ROI needs a 75-pixel margin on every side so edge scratches are not cut off, which adds pixels to inspect and false-detection candidates. My approach is to keep the trigger path on hardware wiring and absorb the remaining jitter by finding a reference edge of the part and shifting the ROI to follow it.
Holding 40 μm versus reaching for 5 pixels
The table puts a setup for stationary parts, a setup for moving parts, and a setup that tries to see the scratch over 5 pixels side by side. The second and third rows both use a strobe, and the difference starts from the pixel coverage. The light multiple counts the stationary setup as 1.
| Setup | ① Minimum defect size | ② Optical setup · WD | ③ Algorithm parameters · cost |
|---|---|---|---|
| Stationary part | 40 μm = 3 px (13.3 μm/px) | 25 mm lens, WD about 122 mm from the principal plane, f/5.6, 100 μs exposure under continuous light | unusable while moving with 7.5 px of smear, light multiple 1 |
| Moving, 13.3 μs strobe | 40 μm = 3 px, 1 px smear | same lens, f/4 (depth of field 1.04 mm, diffraction 24.7 μm on the object side), 3.8 times the instantaneous light | trigger ±5 μs = 0.38 px, ROI margin ±75 px on a software path |
| Moving, reaching for 5 px (8 μm/px) | 40 μm = 5 px | 50 mm lens, WD about 166 mm from the principal plane, f/4 (depth of field 0.42 mm, diffraction 16.8 μm), 8 μs strobe, 8.2 times the light | depth of field cannot cover ±0.5 mm of height variation, so a height-following device is needed, field 32.8 × 24.0 mm |
Taken row by row, the table shows that a moving setup succeeds or fails on the balance between light and depth of field more than on the camera. The third row, which wants to see the scratch over 5 pixels, has to buy 8.2 times more light, and with 0.42 mm of depth of field it cannot cover ±0.5 mm of height variation, so a focus device that follows height gets added. The opposite approach has clear conditions too: if the part can stop even briefly at the inspection position, the first row is enough without a strobe, and if the defects to find are larger than 100 μm, it is better to enlarge the pixel coverage and gain margin in both light and depth of field.
First line of a high-speed spec sheet
When I take on a high-speed line setup, I write the allowed smear in pixels on the first line of the spec sheet, and below it the pulse width limit derived from the speed and the pixel coverage. In this example that is one pixel and 13.3 μs. The next line is the part height variation and the f-number that covers it, and the last line is the light multiple the aperture could not cover. Once these four lines are set, the camera spec follows as their result.
The people who handle this calculation are the optics engineers of high-speed inspection lines, and for beginners a good exercise is turning the one line smear = speed × time into a table across several speeds. From the equipment side, in a high-speed vision quote it is worth checking that the strobe light, its driver and the trigger wiring are listed separately from the camera. This article explains technology and is not investment advice. See our Disclaimer.
Field Note
If I bring up this setup, I put a test chart with thin lines on a fixture at the same height in place of the part, run it at 1 m/s, and shoot while shortening the pulse from 20 μs in 2 μs steps. The pulse width at which the line width matches the stationary photo within one pixel is the real limit, and if it comes out shorter than the calculated 13.3 μs, I treat it as trigger jitter or part vibration on top and look for the cause first. Then I raise and lower the fixture in 0.5 mm steps to measure the height at which the lines start to blur at f/4.
Field Checkpoints
To turn the smear, light and depth-of-field numbers into spec-sheet sentences, answer the questions below.
- Does the strobe light fit inside the roughly 122 mm WD of the 25 mm lens without blocking the lens field of view? (measured from the principal plane, so the lens front is closer)
- Is the pulse width at or below 13.3 μs, the pixel coverage divided by the speed? (at 1 m/s and 13.3 μm per pixel)
- Does the height variation of the inspected surface fit inside the 1.04 mm depth of field at f/4? (with larger variation the aperture cannot open further)
- Beyond the 1.96 times covered by the aperture, can the light deliver 3.8 times more? (confirm pulse drive conditions in the lighting supplier data)
- Does the trigger arrive over hardware wiring with jitter within ±5 μs? (on a software path, an ROI margin of ±75 px)
- For strongly reflective parts such as glossy molded ones, have you checked brightness and smear on samples? (the calculation assumes a matte surface)
Frequently Asked Questions
Could I skip the strobe by cutting the camera exposure to 13 μs?
Cutting the exposure reduces smear just as much, but the light a continuous source delivers in that short time falls 7.5 times short. Making a continuous light 7.5 times brighter raises its heat and power 7.5 times, while a strobe delivers the same instantaneous brightness only very briefly, so its average heat is far smaller. That is why short exposures and strobes usually go together.
If parts move fast, shouldn’t the frame rate go up first?
The frame rate sets how often a frame is taken, and how sharp each frame is depends on the light-on time. Raising the number of frames per second does not reduce the smear inside a frame. The frame count is a separate calculation set by the field and the speed, and that collision is covered in the frame rate and lighting article.
Glossary
- [1] Specular reflection specular reflection
Reflection in which light bounces off a smooth surface in one direction only, at the same angle it came in. If the lens sits in that direction, the light itself shows up in the image. ↩ - [2] WD working distance
The distance from the lens to the surface being inspected. The values here use a thin-lens approximation from the lens principal plane; the distance from the lens front comes from the lens drawing. ↩ - [3] Strobe strobe
A light that switches on strongly for only a brief moment. It takes over the job of the shutter when freezing a moving part. ↩ - [4] Stop stop
A way of counting light in steps of two. One stop is twice the light, and 7.5 times is about 2.9 stops. ↩ - [5] F-number f-number
The focal length divided by the diameter of the lens opening. Opening one stop from f/5.6 to f/4 roughly doubles the light coming in. ↩ - [6] Depth of field depth of field, DOF
The depth range in front of and behind the focus distance that still looks sharp. The values here assume a circle of confusion of two pixels (6.9 μm). ↩ - [7] Diffraction diffraction
The spreading of light as it passes through a narrow opening. The more the aperture is closed, the larger the circle a point spreads into, with a diameter of roughly 2.44 × wavelength × f-number. ↩ - [8] Trigger trigger
The electrical signal that tells the camera and the light when to capture. It comes from a sensor that reads the part position. ↩ - [9] ROI region of interest
The part of the image cut out for inspection. The larger the region, the more pixels to process and the more false-detection candidates. ↩
References
- Edmund Optics, Limitations on Resolution and Contrast: The Airy Disk (Airy disk diameter ≈ 2.44 × wavelength × f-number, 10.15 μm at 520 nm and f/8)
- Formulas: pixel coverage = field ÷ pixel count, smear (px) = speed × light-on time ÷ pixel coverage, magnification m = pixel ÷ pixel coverage, light per pixel ∝ on-time ÷ (N² × (1 + m)²), working f-number = N × (1 + m), diffraction diameter (object side) = 2.44 × wavelength × N × (1 + m) ÷ m, depth of field ≈ 2 × N × c × (m + 1) ÷ m², position jitter = speed × trigger jitter
- Assumptions: 12 MP global shutter camera (4,096 × 3,000 px, 3.45 μm pixels), 25 mm lens (50 mm for the 5-pixel setup), part speed 1 m/s, stationary reference f/5.6 with 100 μs exposure, height variation ±0.5 mm, wavelength 520 nm, circle of confusion 6.9 μm
Related reading — Keeping Frame Rate and Lighting from Colliding on a High-Speed Inspection Line · Why a Line-Scan Camera Chosen by Line Rate Alone Misses Defects · When Height Varies, F7.1 Beats F16 on a Telecentric Lens


