광학 분해능·노출 중 이동량·피사계심도 세 조건의 관계를 나타낸 도식
Optics

Machine-Vision Inspection: Physics Comes Before Software

When an inspection system isn’t performing as expected, the first instinct is usually to touch the algorithm — adjust thresholds, swap filters, add more training data. But there are cases where nothing you do improves it, no matter how much you tune.

In those cases, the information usually was never in the image to begin with. What was actually being attempted was software trying to reconstruct information that doesn’t exist.

This piece lays out three physical quantities that decide whether an inspection succeeds or fails. If these three aren’t secured, everything that comes after is meaningless.


Setting the Scene

Picture a line handling continuous web material. Printed matter or packaging film runs at tens of meters a minute, and you need to find fine scratches on its surface. The defect width is barely visible to the naked eye.

Under these conditions, there are three physical quantities that need to be secured before software even enters the conversation.


The Three Physical Quantities That Decide Success or Failure

Quantity Requirement Result if not secured
Optical resolution (mm/px) 1/3 or less of the defect width The defect gets lost between pixels
Motion during exposure (mm) 1/2 or less of the resolution Motion blur destroys edge information
Depth of field (mm) At or above the target’s vertical wobble range Periodic focus loss causes false detections to spike

1. Optical Resolution — Does the Defect Register in a Pixel?

Resolution is how many millimeters of the target a single pixel covers. It comes out of dividing the field-of-view width by the sensor’s horizontal pixel count.

When the defect width and the resolution are similar, that defect ends up in a state where it either spans a pixel or doesn’t — visible in one position, gone in another. For reliable detection, a single defect needs roughly at least three pixels assigned to it.

No matter how sophisticated you make the algorithm, it’s pointless if the resolution is insufficient. The defect was simply never recorded in the image.

2. Motion During Exposure — Is the Shot Captured Without Blur?

If the shutter is open while the target is moving, the image smears by that much. Multiply exposure time by travel speed and you get motion during exposure.

Once this value exceeds half the resolution, defect edges get smeared out. No matter how much you raise resolution, blur cancels it out.

The fix is shortening exposure time, but that darkens the image by the same amount. That’s why, on high-speed lines, lighting output sets the ceiling on performance. This is why strobe lighting gets used.

3. Depth of Field — Does Focus Hold?

It’s rare for a target to pass by perfectly flat. The material wobbles slightly up and down, thickness varies, or there’s vibration from the transport mechanism.

If depth of field is narrower than that wobble range, focus is on at some moments and off at others. Inspection results oscillate periodically, and it takes a long time to pin down the cause.

Depth of field increases as you stop down the aperture. But stopping down darkens the image and increases the effect of diffraction. Here too, lighting output is what holds you back.


The Three Are Interlinked

The three items above can’t be tuned independently.

  • To raise resolution → narrow the field of view or increase sensor pixel count → data volume and processing load go up
  • To reduce blur → shorten exposure → the image darkens
  • To increase depth of field → stop down the aperture → the image darkens further

In the end, all three converge on lighting output. That’s why investing in lighting is never wasted money for high-speed inspection.


Design Sequence

Understanding this relationship fixes the review order.

Step What to decide Basis
1 Minimum defect size to detect Comes from the inspection spec
2 Required resolution 1/3 of the defect size
3 Field of view and sensor pixel count Back-calculated from resolution
4 Allowable exposure time Calculated from line speed and resolution
5 Required lighting output Determined from exposure time and aperture
6 Algorithm Only after the conditions above are secured

The algorithm comes last. Start with the first five steps not properly settled, and you won’t even know later where to go back and fix things.


Closing

The question worth asking when an inspection system isn’t working well is this: if a person looked at this image, could they see the defect?

If they can’t, it’s not an algorithm problem. You need to go back to the optics.


The figures and criteria in this article are general design guidance. Please validate against your own target and environment before applying them to an actual system.

Related ReadingHow to Calculate Machine-Vision Lens Focal Length

Leave a Reply

Your email address will not be published. Required fields are marked *