← Image Processing for EveryoneToolsInVisionLearning Center
Final Image-Processing Project · Lesson 77

Define an Inspection Measurement

An inspection client asks whether scratched parts should be rejected.

Read the full lesson and open its transcript below. A narrated video will be added after production.

Lesson overview

What you will learn

An inspection client asks whether scratched parts should be rejected.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

A factory asks, 'Should this scratched part be rejected?' Before writing a filter, ask what counts as a scratch and which physical measurement drives the decision. Is the tolerance based on maximum width, length, or a particular location? An algorithm cannot choose that policy for us.

02

The useful idea

Define the region of the part, the scratch measurement, and the tolerance in physical units. Specify how we calibrate the camera, where uncertainty is large, and what happens near the boundary. A result very close to the limit may need human review instead of a forced yes-or-no label.

03

Work through the example

Take one obvious pass, one obvious reject, and one borderline part. Walk through the proposed measurement with the inspection team. Are you measuring the same feature they intend? Does glare create a false mark? Those examples expose ambiguous language before it becomes a software rule. Decide what the scratch measurement means before building a detector. Is it maximum width, average width, or a width at a particular location? State the physical tolerance and how calibration uncertainty affects cases near the limit. An uncertain measurement should reach a human review path rather than being forced into a pass or fail. Save the raw crop and the outline used for measurement so the decision can be traced. Now check the idea on a concrete example: Specify a scratch-width threshold in physical units and a review path for uncertain cases. A possible trap is worth naming: A vague visual impression cannot serve as a reproducible acceptance rule. The answer follows from that evidence: Define the object, measurement, tolerance, and decision before designing filters. A scratch near the physical tolerance should not be decided by a pixel count alone. Show calibration uncertainty and the review rule before assigning a confident pass or fail.

04

Limits and next step

Write down the decision and review path. Now we'll build a pipeline whose intermediate images and numbers can support that exact decision.

Worked example

Specify a scratch-width threshold in physical units and a review path for uncertain cases.

Knowledge check

Quick check: test your understanding

Try it yourself: Consider this case: Specify a scratch-width threshold in physical units and a review path for uncertain cases. Explain how you would check the result. In your answer, address this limitation: A vague visual impression cannot serve as a reproducible acceptance rule.

Check the reasoning

Define the object, measurement, tolerance, and decision before designing filters. A vague visual impression cannot serve as a reproducible acceptance rule.

What is the main idea behind define an inspection measurement?

Define the object, measurement, tolerance, and decision before designing filters.

How is it used in the example?

Specify a scratch-width threshold in physical units and a review path for uncertain cases.

What limitation should be checked?

A vague visual impression cannot serve as a reproducible acceptance rule.

Further reading

Digital Image Processing, 4th edition — Rafael C. Gonzalez and Richard E. Woods.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 77 transcript315 words · Narration ready for the upcoming videoOpen transcript

A factory asks, 'Should this scratched part be rejected?' Before writing a filter, ask what counts as a scratch and which physical measurement drives the decision. Is the tolerance based on maximum width, length, or a particular location? An algorithm cannot choose that policy for us.

Define the region of the part, the scratch measurement, and the tolerance in physical units. Specify how we calibrate the camera, where uncertainty is large, and what happens near the boundary. A result very close to the limit may need human review instead of a forced yes-or-no label.

Take one obvious pass, one obvious reject, and one borderline part. Walk through the proposed measurement with the inspection team. Are you measuring the same feature they intend? Does glare create a false mark? Those examples expose ambiguous language before it becomes a software rule. Decide what the scratch measurement means before building a detector. Is it maximum width, average width, or a width at a particular location? State the physical tolerance and how calibration uncertainty affects cases near the limit. An uncertain measurement should reach a human review path rather than being forced into a pass or fail. Save the raw crop and the outline used for measurement so the decision can be traced. Now check the idea on a concrete example: Specify a scratch-width threshold in physical units and a review path for uncertain cases. A possible trap is worth naming: A vague visual impression cannot serve as a reproducible acceptance rule. The answer follows from that evidence: Define the object, measurement, tolerance, and decision before designing filters. A scratch near the physical tolerance should not be decided by a pixel count alone. Show calibration uncertainty and the review rule before assigning a confident pass or fail.

Write down the decision and review path. Now we'll build a pipeline whose intermediate images and numbers can support that exact decision.