Insights · DaoAI

The Critical Failure Point in PCBA Inspection: Why AOI Color Sampling(TOC) Misses Defects by Ignoring Component Shape and Structure

Analyze why traditional AOI's color-only logic is unstable and leads to high False Negatives in PCBA production. Discover how AI AOI uses shape, texture, and structure for

The Critical Failure Point in PCBA Inspection: Why AOI Color Sampling(TOC) Misses Defects by Ignoring Component Shape and Structure

Abstract: The Inherent Flaw of Traditional Color-Based AOI

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 .

Three Major Pain Points of Color Sampling Algorithms (TOC)

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.

9564a354ff7945b4871fc9a0a7dc1687

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:

e76b06c14fec4e6baa69a4406feb3f5c

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 AI Breakthrough: Evolution from "Color-Based" to "Visual Understanding"

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.

AI Automatic Learning from Golden Samples

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.

Screenshot 2025-11-18 at 11.47.41

Summary of Essential Differences

FeatureColor Sampling Algorithm (TOC)AI AOI
Judgment BasisColor + BrightnessShape, Texture, Structure, Brightness/Darkness, Reflection
Light SensitivityHighLow
Sensitivity to Process VariationHighLow
Engineer Tuning RequiredManyOperators can use feedback learning to update the model
Programming Time3–5 hoursApproximately 5 minutes
False Negatives/False PositivesHighSignificantly Reduced
Generalization CapabilityPoorHigh

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.

Ready to Upgrade Your AOI?

See how DaoAI's AI-powered AOI cuts false rejects, slashes programming time, and pays for itself.

Keep reading

How AI Cuts PCBA AOI Programming from 3 Hours to 5 Minutes without Component Library or CAD

For most manufacturers using AOI for PCBA inspection, the real bottleneck isn't the hardware — it's the programming of ...

November 07, 2025

The NPI Paradox: Transforming PCBA Inspection with Visual AI & 5-Minute Setup

It's Monday morning. The ERP shows a new High-Mix job scheduled for Line 3. The pick-and-place files are loaded, the ...

February 04, 2026

AI Is Revolutionizing Crystal Inspection In the Chemical Industry

In the modern chemical industry, crystal inspection has a crucial impact on the quality and performance of products. ...

April 09, 2025

Subscribe for an instantly better inbox

AI inspection insights, product news, and industry analysis. Once a month, no noise.

Originally published on the DaoAI Robotics site →

Put physical AI to work on your line.