In traditional Automated Optical Inspection (AOI), the "Color Sampling Algorithm (TOC)" is the core method frequently used to judge common defects such as insufficient solder, voids, exposed copper, wrong components, and missing components. Its logic is straightforward: if the proportion of color pixels within the Region of Interest (ROI) meets the set criteria for "standard brightness + standard chrominance," it is judged as OK; otherwise, it is NG.
However, this method often presents three major pain points in the actual factory environment. The core reason for its struggle is that it only looks at color, not at shape and structure.
Pain Point 1: Extreme Sensitivity to Light Variation
The sampling algorithm is fundamentally based on "color determination". However, the color-only approach fails when:
The light angle slightly changes.
The brightness is slightly adjusted.
Solder paste reflection varies.
The substrate color is slightly different.
In Figure ①, the chromaticity triangle represents the acceptable color range. In the “insufficient solder” scenario (Figure ②), typical settings might be:R: 0–65, G: 0–85, B: 70–180, used to filter pixel values that match normal solder appearance.
The color-extraction algorithm can switch modes by adjusting parameters:
Brightness Mode: RGB chroma fixed at 0–180; judgment based only on brightness (Figure ①).
Chroma Mode: Brightness fixed at 0–255; judgment based on chroma range (Figure ②).
Because of this, even the slightest color deviation forces engineers to continually adjust:
Brightness range
RGB boundaries
Pixel-ratio thresholds
➡️ TOC has no generalization ability — every product change requires rebuilding the model
Pain Point 2: Defect Color Varies Significantly Across Processes
A single defect, such as "insufficient solder," presents entirely different color characteristics depending on the process:
Insufficient solder before the reflow oven is brighter.
Insufficient solder after the reflow oven is darker and shows oxidation.
Different factories use different materials (e.g., water-soluble vs. no-clean solder paste).
The color simply cannot be summarized by one single triangle.
This leads to the pre-set RGB range often being inaccurate, resulting in the recurring issue of False Positives (misjudgment) and False Negatives (missed detection).
Pain Point 3: Single-Pixel Logic Ignores Structural Features
The Color Sampling Algorithm determines if a single pixel is within the standard brightness and chrominance range. However, actual defects are "structural". For example, the characteristics of insufficient solder include:
Reduced area.
Abnormal shape.
Irregular reflection.
Disrupted solder surface texture.
Traditional TOC ignores these structural features, relying solely on pixel color. This makes it prone to being misled by reflection , often misjudging shadows as insufficient solder , or misjudging bright metal surfaces as exposed copper.
The breakthrough of AI AOI is that it no longer relies on color, but on the "visual features" and "shape texture" itself. AI models learn:
Shape.
Texture.
Component geometry.
The distribution of protrusions and depressions.
The overall features of normal samples.
This means AI can still recognize the structural features of insufficient solder, voids, and missing components even if the light brightens or darkens.
It does not rely on the chrominance triangle and does not require brightness limits.
Light source changes no longer force engineers to rebuild the model.
Traditional sampling algorithms require engineers to define: RGB range , brightness limits , proportionality thresholds , and ROI size.
In contrast, AI AOI only requires one "Golden Sample" image and the AI automatically builds the standard model.
It automatically learns: the shape of the solder surface , the normal solder joint texture , component geometry , light and shadow characteristics , and substrate material differences.
This eliminates the need to set dozens of parameters.
Process changes no longer require the settings to be redone.
Defect Judgment Crosses from "Pixel" to "Structure"
The AI's recognition logic is to:
Judge the integrity of the solder surface.
Judge area anomalies.
Judge if the component is shifted.
Judge if there is foreign material.
Judge if the texture is normal.
Judge if the defect aligns with the true morphology of a "wrong part" or "missing part".
This stability makes AI significantly superior to the sampling algorithm for detecting insufficient solder, voids, tombstoning (flipping), shifting, missing components, solder cracks, and wrong parts.
Summary of Essential Differences
| Feature | Color Sampling Algorithm (TOC) | AI AOI |
| Judgment Basis |
Color + Brightness |
Shape, Texture, Structure, Brightness/Darkness, Reflection |
| Light Sensitivity |
High |
Low |
| Sensitivity to Process Variation |
High |
Low |
| Engineer Tuning Required |
Many |
Operators can use feedback learning to update the model |
| Programming Time |
3–5 hours |
Approximately 5 minutes |
| False Negatives/False Positives |
High |
Significantly Reduced |
| Generalization Capability |
Poor |
High |
The Color Sampling Algorithm was historically important, enabling early AOI adoption. However, as SMT/PCBA processes and materials become more complex, "judging defects solely by color" no longer meets current quality requirements.
AI is essentially doing one thing: evolving AOI from being "based on color" to being "based on visual understanding".
This achieves:
No reliance on light source consistency.
No need for extensive manual settings.
Stronger generalization capability.
Greater stability, accuracy, and controllability.