Introduction
In the early 1980s, industrial computer vision was largely defined by binary "silhouette" processing. While computationally efficient, these systems struggled with complex assemblies where parts overlapped or where surface defects did not alter the object's outline. Stephen Barnard’s 1980 paper proposed a shift toward gray-scale statistics to create a more robust and diagnostic inspection system capable of operating in real-world factory environments.
Methodology: The Statistical Framework
The proposed system moves beyond simple thresholding by evaluating the statistical relationship between a test image and a reference model. The process involves two primary stages: Training, where a human operator defines "windows" of interest on a perfect assembly, and Inspection, where the system evaluates new units after performing geometric registration (translation and rotation).
The core of the inspection logic relies on two complementary statistical measures:
- The $\chi^2$ (Chi-Squared) Test ($\tau$): This measure compares the marginal gray-level distributions (histograms) of a subarea. It is location-insensitive, meaning it detects if the correct "amount" of light and dark pixels are present, regardless of their exact coordinates.
- The Correlation Coefficient ($\rho$): This measures the joint distribution by comparing pixels at specific $(x, y)$ coordinates. It is location-sensitive, determining if the features in the test image align spatially with the model.
The Diagnostic Matrix
The primary innovation of this approach is the ability to diagnose the nature of a defect by analyzing the pattern of $\tau$ and $\rho$ scores. Rather than a binary pass/fail, the system categorizes the state of the assembly based on these values.
As illustrated in the matrix above, the system can distinguish between several states:
- High $\tau$, High $\rho$: The part is present and correctly positioned.
- Small $\tau$, Small $\rho$: The part is missing or severely damaged (the fundamental pixel distribution has changed).
- High $\tau$, Small $\rho$: The part is present but misplaced (the "stuff" is there, but in the wrong spot).
- Small $\tau$, High $\rho$: A systematic lighting change has occurred (the spatial pattern remains, but brightness levels have shifted).
Experimental Results
The system was evaluated on practical industrial components, including a water pump and a computer terminal.
In the water pump test, the system was tasked with identifying a missing pulley. As shown in the results table below, the "Pulley" window returned significantly lower scores ($\tau = .236$, $\rho = .354$) compared to non-defective components like the "Link" or "Spout," which maintained scores near .900.
In a second test involving a computer terminal, the system successfully identified a misplaced write head. In this instance, $\tau$ remained high (.890) because the component was still within the search window, but $\rho$ dropped to .458 because the spatial alignment was lost. This confirmed the system's ability to differentiate between missing and merely misaligned parts.
Conclusion and Limitations
Barnard’s method proved to be computationally efficient enough for the hardware of its era while providing sophisticated diagnostic data. However, the system faced certain limitations: it assumed positional variation was limited to 2D translation and rotation, and it required manual training to define rectangular windows of interest. Despite these constraints, the use of dual gray-scale statistics represented a significant leap forward in making automated inspection resilient to the "messiness" of real-world industrial settings.
Summary updated