Welcome to Kunshan EEK Automation Equipment Co., Ltd.
Home/Defect Types/Foreign Matter Defect Visual Inspection

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

Quick answers

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

Foreign matter defect visual inspection: comparison of imaging on a normal surface versus a defective surfaceIllustration of how foreign matter defects appear differently in imaging, showing the difference between the material's natural texture and genuine defects.NormalSurface texture regular, no anomaliesdefect Detects "foreign matter"Texture is regular → it can be modeled and suppressed; defects are irregular → only then can they be judged as anomaliesImaging conditions: diffused / low-angle / transmitted / stripe light must be selected according to the material's optical properties
Foreign Matter Defect Visual Inspection | Imaging Comparison — Left: normal material surface (regular texture); right: imaging of the same surface type when foreign matter is present. Actual judgement thresholds must be calibrated by measuring your OK / NG samples.

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 DimensionDescription
AreaMinimum/maximum area thresholds for foreign matter; anything smaller is treated as noise
Brightness / Color DifferenceMaximum deviation relative to the body, to separate pattern from real foreign matter
ShapeWhether it conforms to known pattern rules; only non-conforming cases are suspicious
TransparencyTransparent foreign matter requires backlight / polarization to form a clear image
Compliance DatumFood 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?
Printing and sequins are part of the product's normal appearance. Judgement must first register the normal appearance datum, and only extra material that deviates from that datum and does not match the known pattern rules is judged as foreign matter.
Is Transparent Foreign Matter (Such as Glass Shards) Easy to Detect?
Hard to see clearly under ordinary light; transmitted backlight or polarized light should be used to improve contrast, with specific wavelength imaging where necessary, and the exact approach must be confirmed by measured testing.
What about reflective foreign matter such as metal chips?
Reflective spots form a clear image easily but may also be taken for highlights; polarization can be used to suppress reflections and confirm whether their form indicates foreign matter.
Who defines foreign matter standards for food and pharmaceuticals?
This involves compliance and release, so the specific acceptance criteria should be quantified and defined by the quality / regulatory department; the equipment provides inspection capability and adjustable thresholds and does not replace the customer's decision.
Is deep learning reliable for foreign matter detection?
Foreign matter shapes are unpredictable, so anomaly detection / segmentation is more practical than rule-based algorithms, but the training samples must cover typical foreign matter, and coverage determines the ceiling.
What Is the Smallest Foreign Matter That Can Be Detected?
It depends on the field of view and camera resolution (pixel scale). To be added: the minimum detectable foreign matter size must be measured for the actual site configuration; no universal figure can be given.
Does Switching the Product Model Require Reconfiguration?
Yes. Different products have different normal appearances and patterns, so the corresponding reference and thresholds should be recalled through recipes for adaptation.

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.

JPG / PNG supported, multiple files allowed
Each file must not exceed 20 MB
    JPG / PNG supported, multiple files allowed
    Each file must not exceed 20 MB
      JPG / PNG supported, multiple files allowed
      Each file must not exceed 20 MB
        A solution engineer will contact you within 1 business day after submission

        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.

        Online support WhatsApp
        WeChat
        Scan the QR code to add us on WeChat
        Call us Back to top