Foreign Matter Defect Visual Inspection
Foreign matter defect visual inspection: for extraneous impurities, hair, metal chips and adherents on the surfaces of food, pharmaceutical, electronic and material products, diffuse light forms a clear contrast image, distinguishing material patterns from real foreign matter.
defect Overview
Foreign matter not belonging to the part itself forms a clear image through contrast with the background; the difficulty is distinguishing patterns from foreign matter
Foreign matter is non-intrinsic material mixed into the product or adhering to its surface, such as dust, hair, metal chips, fibers and debris. Under uniform diffuse light, foreign matter images clearly because its color, brightness or shape differs from the body itself, and machine vision judges it with Blob analysis / deep learning; the main risk is misjudging the material's own prints, sequins or texture as foreign matter, so the threshold must be defined by the quality department together with the product team.
In the image, foreign matter appears as an "extra thing" whose material, color, or form differs from the body. It may be dark dust landing on a light-colored part, a reflective metal chip, a fine hair, or debris from a previous process step adhering to the surface. Because the form of foreign matter is completely unpredictable and rule-based algorithms cannot enumerate every case, deep learning "anomaly detection / segmentation" is often more practical.
Foreign matter is most easily confused with "features of the material itself". Products with prints, sequins or coating speckles already have bright spots and off-color patches in their normal appearance. Judgement must establish the normal appearance baseline for that product, and only "extra substances" that deviate from the baseline and do not match known pattern rules should be judged as foreign matter.
For transparent or reflective foreign matter (such as transparent debris or glass shards), ordinary diffuse light may not make it visible, so backlight, polarization or specific wavelength bands are needed to raise contrast. Foreign matter inspection in the food and pharmaceutical industries also involves compliance and release standards, and the specific acceptance criteria must be defined by the quality and regulatory departments.
Occurrence Causes
Only when the cause is known can you decide which station should check for it
- Ambient dust: floating dust and settling fibers at open stations
- Equipment wear: tool / conveyor belt wear shedding, metal chips mixed in
- Incoming Material Carried In: Impurities in the Raw Material Itself That Were Not Removed
- The material itself: prints, sequins and coating spots are normal and must be excluded
- People and packaging: hair, skin flakes and packaging debris falling in
imaging Key Points
Whether it can be detected depends first on whether it can be captured
Uniform Diffused Light
Using color or brightness contrast to make foreign matter form a clear image is the basic illumination for foreign matter inspection
Transmitted Backlight
Increase contrast for transparent / translucent foreign matter (glass shards, transparent debris)
Polarized Light
Suppress reflections to highlight non-specular foreign matter on reflective surfaces
Normal Datum
Register the product's normal appearance to exclude its own features such as prints or sequins
judgement Method
The judgement centres on "extra material relative to the normal appearance baseline". First register and compare against the baseline, then measure the area, brightness difference and morphology of the connected regions that deviate from it; only those that do not match the known pattern rules become foreign matter candidates.
Threshold bias: for food / pharmaceutical applications, an escaped foreign matter defect is extremely costly, so the judgement should be on the strict side; but treating normal printing as foreign matter causes heavy over-rejection, so the baseline must be accurate. The specific acceptance rules are defined quantitatively by the quality / regulatory department and saved with the recipe.
| Judgement Dimension | Description |
|---|---|
| Area | Minimum/maximum area thresholds for foreign matter; anything smaller is treated as noise |
| Brightness / Color Difference | Maximum deviation relative to the body, to separate pattern from real foreign matter |
| Shape | Whether it conforms to known pattern rules; only non-conforming cases are suspicious |
| Transparency | Transparent foreign matter requires backlight / polarization to form a clear image |
| Compliance Datum | Food and pharmaceutical acceptance criteria are defined by the quality / regulatory department |
Applicable algorithm
Normal appearance datum
Use OK samples to build a baseline, then compare differences to find extra material
- Rule out printed sequins
- Registration avoids false differences
Blob and Morphology
Segment the difference map to quantify foreign matter area and morphology
- Filter by dual thresholds
- Effective for stable foreign matter
Anomaly detection / segmentation
Use deep learning to detect foreign matter of unknown shape
- Suitable for unpredictable shapes
- Requires training samples with coverage
Common Materials
Common Industry
Common Question
How Do You Distinguish Foreign Matter from Printed Patterns?
Is Transparent Foreign Matter (Such as Glass Shards) Easy to Detect?
What about reflective foreign matter such as metal chips?
Who defines foreign matter standards for food and pharmaceuticals?
Is deep learning reliable for foreign matter detection?
What Is the Smallest Foreign Matter That Can Be Detected?
Does Switching the Product Model Require Reconfiguration?
Submit sample testing
Foreign matter inspection relies on a normal appearance reference and difference comparison to distinguish the material's own features from genuine foreign substances.
Submitted successfully
We have received your sample testing request. A solution engineer will contact you within 1 business day via contact you.
Need to assess imaging conditions, defect criteria and cycle time item by item? Go to the Full Requirement Assessment →
Send Us Your Defect Samples and We Will Measure Them and Show You the Results
Whether a defect can be detected depends on whether imaging captures the defect features. Provide OK and NG samples and we will run actual imaging and judgement tests on the equipment.