ElectronicsNovember 18, 2025

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 ...

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:

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

Because of this, even the slightest color deviation forces engineers to continually adjust:

➡️ 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:

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:

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:

This means AI can still recognize the structural features of insufficient solder, voids, and missing components even if the light brightens or darkens.

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.

Defect Judgment Crosses from "Pixel" to "Structure" 

The AI's recognition logic is to:

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 

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:

Ready to Upgrade Your AOI?

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

Learn About DaoAI P Series

Subscribe for an instantly better inbox

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