PCB (Printed Circuit Board) defect detection method and system based on image recognition
Through the PCB board defect detection method based on image recognition, the use of pixel-level registration correction and adaptive compensation technologies has solved the problems of low efficiency and false detection and missed detection of traditional detection methods, and achieved high-precision and adaptive defect detection capabilities.
Patent Information
- Application Number
- CN202510826643.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional PCB board defect detection methods are inefficient and easily affected by human factors. They are unable to meet the detection needs of modern high-precision, high-speed production lines. They also lack effective multi-scale analysis and false defect elimination mechanisms, resulting in frequent false detections and missed detections.
An image recognition-based PCB defect detection method is adopted, which includes pixel-level registration correction, adaptive pixel stability compensation, reverse pyramid structure division, deep image visual analysis, pseudo-defect elimination optimization, defect point spatial distribution marking and defect depth semantic analysis, to build an intelligent defect detection optimization model.
It significantly improves the robustness and accuracy of defect detection, can effectively identify multi-scale and multi-type defects, reduce the false defect misjudgment rate, achieve high-reliability and high-precision defect detection, and has adaptive learning and self-adjustment capabilities to adapt to complex production environments.
Smart Images

Figure CN120689330A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a PCB board defect detection method and system based on image recognition. Background Art
[0002] With the rapid development of the electronics manufacturing industry, the quality of printed circuit boards (PCBs), the fundamental carriers of electronic devices, is directly related to the performance and reliability of the entire device. Accurate detection of PCB defects has become a critical link in ensuring the quality of electronic products. Traditional PCB defect detection relies heavily on manual visual inspection or simple optical inspection equipment. These methods are not only inefficient but also susceptible to human subjective factors, making them difficult to meet the inspection requirements of modern high-precision, high-speed production lines. As manufacturing processes evolve towards miniaturization and multi-layering, defect types are becoming increasingly diverse and complex, and the limitations of traditional inspection methods are becoming increasingly prominent.
[0003] PCB defect detection methods based on image recognition technology have emerged as a response to this need. Using high-speed cameras to capture PCB images, combined with advanced image processing and machine learning algorithms, they automatically identify and locate various defects, such as opens, shorts, missing solder paste, and bridges. Compared to traditional inspection methods, image recognition methods not only significantly improve inspection efficiency and accuracy, but also enable multi-scale and multi-type defect classification, adapting to complex and changing production environments. Furthermore, image recognition technology continuously optimizes its performance through deep learning models, enabling automatic learning and adaptive adjustment of defect characteristics, significantly enhancing the intelligence of inspection systems. However, PCB images present numerous challenges, such as diverse defect morphologies, complex background textures, varying lighting conditions, and interference from false defects. These factors significantly increase the difficulty of accurate detection. Traditional image processing techniques struggle to fully capture the subtle features of defects, resulting in frequent false and missed detections. Furthermore, the lack of effective multi-scale analysis and false defect rejection mechanisms compromises the credibility of inspection results. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention proposes a PCB board defect detection method and system based on image recognition to solve at least one of the above technical problems.
[0005] To achieve the above object, the present invention provides a PCB board defect detection method based on image recognition, comprising the following steps: Step S1: Collect multi-directional PCB inspection images, perform pixel-level registration correction and adaptive pixel stability compensation, and construct a spatiotemporal stability compensation image sequence; Step S2: Perform reverse pyramid structure division on the spatiotemporal stability compensation image sequence, and perform normalized similarity probability calculation to construct the initial region classification result; Step S3: Perform deep image visual analysis based on the initial region classification results, and perform comprehensive pseudo-defect elimination optimization to construct a pseudo-defect cleansed high-confidence image; Step S4: Identify PCB board connection defects on the pseudo-defect cleansed high-confidence image, mark the global defect point distribution, and construct a defect point spatial distribution map; Step S5: Based on the defect point spatial distribution map, perform threshold segmentation of each defect point area, and perform defect depth semantic analysis to obtain a comprehensive evaluation vector of the defect point; Step S6: Defect recognition confidence callback and regional calibration are performed based on the spatiotemporal stable compensation image sequence, and defect detection post-optimization is performed in combination with the comprehensive evaluation vector of the defect point to build an intelligent defect detection optimization model.
[0006] In this specification, a PCB board defect detection system based on image recognition is provided, which is used to perform the PCB board defect detection method based on image recognition as described above, including: The pixel registration module is used to collect multi-directional PCB inspection images, perform pixel-level registration correction and adaptive pixel stability compensation, and construct a spatiotemporal stable compensation image sequence; The reverse pyramid partitioning module is used to perform reverse pyramid structure partitioning on the spatiotemporal stability compensation image sequence, perform normalized similarity probability calculation, and construct the initial region classification result; The pseudo-defect removal module is used to perform deep image visual analysis based on the initial region classification results, and to perform comprehensive pseudo-defect removal optimization to construct a pseudo-defect-purified high-confidence image; The defect point distribution module is used to identify PCB board connection defects in the pseudo-defect cleansed high-confidence image, mark the global defect point distribution, and construct a defect point spatial distribution map; The defect analysis module is used to perform threshold segmentation of each defect point area based on the defect point spatial distribution map, and perform deep semantic analysis of the defects to obtain a comprehensive evaluation vector of the defect points; The post-optimization module is used to perform defect recognition confidence callback and regional calibration based on the spatiotemporal stable compensation image sequence, and to perform post-optimization of defect detection in combination with the comprehensive evaluation vector of the defect point to build an intelligent defect detection optimization model.
[0007] The beneficial effects of the present invention are specifically as follows: by collecting PCB board image data from multiple angles and multiple viewpoints, the problem of structural occlusion or defect misjudgment caused by single-view imaging is avoided. Pixel-level registration and correction technology ensures the spatial alignment accuracy between images, and solves the problem of edge blurring caused by error accumulation in the traditional multi-image superposition process. The adaptive pixel stability compensation mechanism effectively alleviates the image instability noise problem caused by factors such as ambient light fluctuations and equipment jitter, thereby constructing a highly stable, spatially consistent, and temporally continuous image sequence, significantly improving the robustness and confidence basis of subsequent recognition. The image sequence is subjected to multi-scale deconstruction processing through an inverse pyramid structure, enabling the system to extract defect features from different resolutions and perception levels, and enhancing the perception of defects of different sizes and shapes. The normalized similarity probability calculation mechanism introduces statistical comparison and regional significance distribution analysis between image segments, so that the initial defect area classification has a strong generalization ability and precision discrimination, effectively reducing the false positive phenomenon caused by texture similarity or pattern repetition. A deep image visual parsing network performs multi-channel semantic deconstruction on the initially classified regions, comprehensively considering multiple factors such as texture, edges, morphology, and reflections, significantly improving the system's ability to identify genuine defects. A comprehensive pseudo-defect elimination optimization algorithm, based on a comparative learning mechanism for real / pseudo-defect features, proactively identifies and eliminates misidentified areas caused by non-structural factors such as residual images, dust, and uneven etching. This outputs cleaner, more reliable image data, forming high-confidence image input for subsequent precise detection. Connecting to the defect recognition module, the cleaned image performs structural integrity analysis, enabling accurate detection of functionally impactful structural defects such as broken wires, shorts, and over-etching. A global defect point distribution labeling mechanism incorporates spatial context weighting and neighborhood distribution analysis during defect localization, enabling high-precision defect localization even in complex wiring or local interference environments. This effectively constructs a comprehensive defect spatial map, providing precise spatial support for subsequent defect quantification and assessment. An adaptive region threshold segmentation algorithm performs refined boundary-level segmentation on each defect point, ensuring complete defect contour extraction and significantly improving recognition accuracy. On this basis, a deep semantic parsing mechanism is introduced. Combining defect morphological evolution trends, location-sensitive features, and manufacturing deviation models, multi-dimensional attribute encoding is performed on defect points, and a comprehensive evaluation vector is output. This not only identifies the presence of defects, but also comprehensively assesses their severity, risk level, and scope of impact. The recognition results are then double-checked in both time and space using the previously constructed spatiotemporally stable image sequences, identifying and correcting missed detections and misjudgments caused by short-term fluctuations or boundary drift. The importance of defects is differentially weighted using the comprehensive evaluation vector, enabling the optimization strategy to have priority scheduling capabilities.Ultimately, an intelligent optimization model is constructed through a deep learning feedback mechanism, enabling the defect detection system to have the ability of adaptive learning, self-adjustment, and autonomous correction, thus realizing a high-reliability, high-precision, and high-closed-loop defect detection capability system for the manufacturing end. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 This is a schematic flow chart of the steps of a PCB board defect detection method based on image recognition according to the present invention; Figure 2 Detailed implementation flow chart of step S1; Figure 3 Detailed implementation flow chart of step S2; Figure 4 Schematic diagram of the detailed implementation steps of step S3. DETAILED DESCRIPTION
[0009] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0010] This application provides a method and system for detecting PCB board defects based on image recognition. The execution entities of the method and system include, but are not limited to, the following: mechanical equipment, data processing platforms, cloud server nodes, network upload devices, etc., which can be considered as general computing nodes of this application. The data processing platform includes, but is not limited to, at least one of an audio and image management system, an information management system, and a cloud data management system.
[0011] See also Figures 1 to 4 The present invention provides a PCB board defect detection method based on image recognition, comprising the following steps: Step S1: Collect multi-directional PCB inspection images, perform pixel-level registration correction and adaptive pixel stability compensation, and construct a spatiotemporal stability compensation image sequence; Step S2: Perform reverse pyramid structure division on the spatiotemporal stability compensation image sequence, and perform normalized similarity probability calculation to construct the initial region classification result; Step S3: Perform deep image visual analysis based on the initial region classification results, and perform comprehensive pseudo-defect elimination optimization to construct a pseudo-defect cleansed high-confidence image; Step S4: Identify PCB board connection defects on the pseudo-defect cleansed high-confidence image, mark the global defect point distribution, and construct a defect point spatial distribution map; Step S5: Based on the defect point spatial distribution map, perform threshold segmentation of each defect point area, and perform defect depth semantic analysis to obtain a comprehensive evaluation vector of the defect point; Step S6: Defect recognition confidence callback and regional calibration are performed based on the spatiotemporal stable compensation image sequence, and defect detection post-optimization is performed in combination with the comprehensive evaluation vector of the defect point to build an intelligent defect detection optimization model.
[0012] In the embodiment of the present invention, see Figure 1 , is a schematic flow chart of the steps of a PCB board defect detection method based on image recognition of the present invention. In this example, the steps of the PCB board defect detection method based on image recognition include: Step S1: Collect multi-directional PCB inspection images, perform pixel-level registration correction and adaptive pixel stability compensation, and construct a spatiotemporal stability compensation image sequence; In this embodiment, a high-resolution, industrial-grade HD camera, coupled with a high-precision mechanical adjustment device, enables minute angle adjustments of the PCB. The angle adjustment range is typically set within ±5 degrees, with a step angle of approximately 0.1 degrees, ensuring that the captured images cover multiple angles of the PCB surface. The camera resolution is typically selected to be at least 5000 × 4000 pixels to ensure the discernibility of subtle defect details in the image. The image acquisition frequency is controlled within 30 fps to ensure image quality while avoiding motion blur. In an experimental environment, an automated rotation stage combined with a visual control system enables efficient continuous multi-angle image acquisition, typically capturing over 50 high-quality images from different perspectives. After acquisition, due to angle variations and slight camera shake, there are displacement and rotation differences between the images, necessitating pixel-level registration. This registration process utilizes a feature-based multi-level pyramid optical flow algorithm combined with sub-pixel cross-correlation matching. Key feature points (such as corners and edges) are first extracted from the image. The pyramid structure is then used to recursively refine the registration parameters to ensure high-precision alignment at different scales. Registration accuracy is controlled within 0.1 pixel, significantly reducing geometric errors between images. In experiments, this method reduced image registration error by approximately 35% compared to traditional global registration algorithms, significantly improving the stability of subsequent processing. The registered image sequences are further subjected to adaptive pixel stability compensation to eliminate pixel grayscale instabilities caused by illumination fluctuations, reflectivity changes, and material texture heterogeneity. This method calculates the grayscale variance of the same pixel position in multi-angle images and sets an empirical threshold to distinguish optically stable from unstable regions. For unstable regions, an adaptive compensation algorithm based on weighted mean filtering is employed. The weights are dynamically adjusted based on the local grayscale variance, achieving smooth correction of local grayscale values. This process significantly improves the spatiotemporal consistency of the image and enhances the contrast between defects and background. Regarding experimental parameters, the grayscale variance threshold is typically set to 1015 (within the grayscale range of 0.255), and the weight adjustment is dynamically calculated based on the size of the neighborhood within the region (a 5×5 pixel window). After compensation, the image signal-to-noise ratio is improved by approximately 20%, effectively suppressing the generation of false defects caused by ambient light fluctuations. The multi-angle images, after registration and adaptive compensation, are integrated in chronological order to form a highly consistent and stable temporally and spatially compensated image sequence. This sequence not only captures subtle perspective changes across multiple angles of the PCB board but also ensures pixel-level grayscale stability, providing reliable basic data for subsequent multi-scale analysis and pseudo-defect removal. Throughout the entire process, the hardware environment includes a high-precision stepper motor-controlled rotation stage, an industrial camera with a resolution exceeding 20MP, and a stable light source system to ensure repeatability and stability during the acquisition process. The temporally and spatially stable compensated image sequence achieved through this step fully reflects the true defect characteristics of the PCB board surface, reduces misjudgments caused by acquisition angle and optical disturbances, and lays the foundation for accurate defect detection.
[0013] Step S2: Perform reverse pyramid structure division on the spatiotemporal stability compensation image sequence, and perform normalized similarity probability calculation to construct the initial region classification result; In this embodiment, a pyramid structure is a classic and effective hierarchical strategy for multi-scale image analysis. Step S2 employs a reverse pyramid partitioning scheme, starting with the highest-resolution spatiotemporally stable compensated image sequence and downsampling layer by layer to construct a series of image hierarchies, from detailed to coarse. Typically, a Gaussian pyramid approach is employed, with each layer's image size reduced by half compared to the previous layer, gradually reducing from full size (e.g., 4096 × 3072 pixels) to the lowest scale (e.g., 256 × 192 pixels). The total number of layers is controlled between 4 and 6 to ensure both detail and structural information are considered. The purpose of the reverse pyramid is to capture overall structural information from a coarse scale and then work back to fine scales for precise local analysis, achieving a hierarchical representation of image information. In specific implementations, each layer is generated using a Gaussian blur filter combined with subsampling (e.g., with the Gaussian convolution kernel σ set to 1.0). This ensures smoothness and proper preservation of detail in the downsampled image, minimizing aliasing during the sampling process. Furthermore, pixel consistency across all scales of the spatiotemporally stable compensated image sequence is maintained, providing accurate multi-scale data support for subsequent similarity calculations. After completing the multi-scale image sequence segmentation, each scale image is segmented into regions. This segmentation method uses either a fixed grid of equal size or adaptive superpixel segmentation based on image content (e.g., the SLIC algorithm). Each subregion is typically sized between 32×32 and 64×64 pixels, balancing computational efficiency and preservation of regional detail. Multi-dimensional features, such as grayscale distribution, texture features (e.g., local binary patterns (LBPs)), and edge density, are extracted from each subregion. Based on these features, similarity is calculated for subregions at the same location at different scales and time points. Similarity is calculated using the normalized cross-correlation coefficient (NCC) or the probability-based Mahalanobis distance method to calculate the probability of similarity across time and scale. To mitigate the impact of environmental fluctuations, a Gaussian distribution-based normalization process is introduced to map similarity probabilities to the range 0–1, forming a probability distribution map. The similarity calculation window is typically set to encompass all pixels in the region to ensure overall statistical integrity. The similarity threshold is initially set to 0.75 to distinguish between stable and unstable regions. By fusing data from multiple scales and time points, the robustness and accuracy of similarity calculations are improved, effectively distinguishing true defect areas from those characterized by ambient noise or pseudo-defects. Based on the normalized similarity probability, each subregion is divided into stable and unstable regions. Stable regions, characterized by a high similarity probability at multiple scales and time points, represent normal areas of the PCB board; unstable regions are likely locations of defects or pseudo-defects. To further refine the classification, a segmentation method based on a probability threshold (typically set between 0.7 and 0.8) is employed. The similarity probability map is binarized to identify initial anomalous subregions. Subsequently, regional connectivity analysis (such as 8-neighborhood connected domain detection) is used to merge adjacent unstable subregions to form a complete initial anomalous region.In order to enhance the spatial consistency of classification results, a post-processing model based on conditional random fields (CRF) is introduced to integrate neighborhood information and regional probability to achieve smoother and more physically consistent regional division.
[0014] Step S3: Perform deep image visual analysis based on the initial region classification results, and perform comprehensive pseudo-defect elimination optimization to construct a pseudo-defect cleansed high-confidence image; In this embodiment, a deep convolutional neural network (CNN) is used for multi-level feature extraction and fine-grained analysis. In its implementation, a pre-trained ResNet50 backbone network is used as the feature extractor, combined with an adaptive pyramid pooling module to fuse multi-scale features. This design effectively captures defect features of varying sizes and shapes, while taking into account both local details and global context. In experiments, the input image size was uniformly resized to 512×512 pixels to balance detection accuracy and computational efficiency. The network extracts multi-channel feature maps from each suspected region. These feature maps reflect visual information such as texture, edges, and color variations, helping to distinguish subtle differences between false defects (such as weld reflections and stain shadows) and real defects. The confidence scores output by the deep network are used to weight each candidate defect region, eliminating regions with confidence scores below a set threshold (e.g., 0.6). Morphological features of the candidate regions (such as area, aspect ratio, and edge smoothness) are calculated, and false defects with unusual morphologies are eliminated using pre-set rules. For example, real defects typically have stable areas and relatively regular edges, while false defects often appear small and complex. By combining detection results from images at different scales, isolated false defects that only appear at a single scale are eliminated, ensuring multi-scale consistency in defect detection and avoiding false positives caused by scale switching. Based on the spatial layout characteristics of the PCB area, candidate regions with unusual locations and no contextual associations, such as false defects that are too close to edges or isolated, are eliminated. After false defect elimination, the system generates a cleaned, high-confidence defect image. This image retains only true defect areas confirmed through multi-dimensional filtering, significantly improving the accuracy and stability of defect localization. In experiments, the false defect false detection rate of the cleaned image was reduced from an initial approximately 15% to below 3%, while the defect recall rate remained above 95%, demonstrating the superior performance of this step. Furthermore, to ensure real-time performance, the overall processing time of this step is kept within 100 milliseconds, meeting the efficiency requirements of industrial online inspection. This high-confidence image then serves as input for subsequent defect classification and qualitative analysis, ensuring the overall accuracy and reliability of the inspection system.
[0015] Step S4: Identify PCB board connection defects on the pseudo-defect cleansed high-confidence image, mark the global defect point distribution, and construct a defect point spatial distribution map; In this embodiment, a specially designed connection defect recognition module is used to identify defective areas retained in the cleansed image. This module is based on an improved graph convolutional network (GCN) combined with a convolutional neural network (CNN) architecture. This module accurately identifies minor connection defects (such as opens, bridges, and excessive solder balls) by modeling the graph structure of the defective area and combining pixel features and adjacency relationships within the area. In implementation, the cleansed image is first binarized to extract all candidate defect contours. Next, a graph structure conversion algorithm is used to convert each defect contour point into a node, and edges are established between adjacent points to form the spatial graph structure of the defective area. The GCN module learns the relationships between nodes, capturing subtle differences in defect morphology and connectivity. Simultaneously, the convolution module extracts local image texture and edge features at the nodes, achieving a two-pronged approach to improve recognition accuracy. The experimental parameters were set to maintain an input image resolution of 512×512 pixels, three GCN layers, 64 hidden node dimensions, a 3×3 kernel size for the convolutional layers, a training batch size of 16, and 50 iterations. In actual testing, this configuration achieved over 92% connection defect recognition accuracy, significantly outperforming traditional single-CNN approaches. By calculating the center point of the defect outline, high-precision two-dimensional coordinate positioning is achieved, with an error within ±2 pixels, ensuring accurate spatial labeling. In addition to the coordinates, each defect point is also accompanied by its identification category, confidence value, defect area, and morphological parameters, providing a data foundation for subsequent statistical analysis. Combined with global coordinate information, the spatial distribution of defects is visualized as a heat map. The Gaussian Kernel Density Estimation (KDE) method is used to smooth the defect point cloud, revealing areas of defect clustering and sparseness. During the experimental phase, the Gaussian kernel bandwidth used in the heat map was set to 15 pixels, balancing the clarity of detail and overall trends. The spatial distribution map of defects not only visually identifies defect hotspots but also helps locate potential problem areas in the manufacturing process. After defect point labeling and distribution map construction, the system further analyzes the defects using spatial clustering algorithms (such as DBSCAN) to identify clustered defect groups. This clustering information is valuable for quality control and process adjustments in PCB manufacturing lines. Furthermore, based on the spatial distribution of defects, the system can perform dynamic defect trend analysis, monitor defect variations across batches, and promptly identify abnormal production fluctuations. In experiments, this process improved overall defect identification and location accuracy by approximately 5%, and the accuracy of defect cluster analysis reached over 90%, significantly enhancing the practicality and intelligence of PCB defect detection systems.
[0016] Step S5: Based on the defect point spatial distribution map, perform threshold segmentation of each defect point area, and perform defect depth semantic analysis to obtain a comprehensive evaluation vector of the defect point; In this embodiment, based on the global spatial distribution of defects, the system first performs threshold segmentation on the local region where each defect resides. This local region is generally defined as a small window with a side length of 64×64 pixels centered on the defect, ensuring coverage of the entire defect area while avoiding background interference. Threshold segmentation utilizes an adaptive thresholding algorithm, combining the local grayscale mean and variance to dynamically adjust the threshold, effectively addressing complex backgrounds and uneven illumination on PCB boards. This algorithm demonstrated excellent stability in experiments, effectively separating defective regions from adjacent non-defective areas. Specific parameter settings include a local window size of 64×64 pixels, an adaptive threshold calculation window of 11×11 pixels, and a threshold constant C of 2, achieving a balance between sensitivity and false positive rate. This segmentation method achieves accurate demarcation between defective regions and background, resulting in clear edges in the segmented defective regions and an area error within 5%. After threshold segmentation, each local defect region undergoes deep semantic analysis to mine multidimensional features for comprehensive defect assessment. The Deep Semantic Network (DSN) based on the Transformer architecture is employed. This network structure excels at capturing global correlations and detailed semantics within defect images, enhancing feature representation. In its implementation, the segmented defect image is fed into the DSN. Through a multi-layer self-attention mechanism and multi-head attention computation, high-level features such as color distribution, texture complexity, edge sharpness, and morphological regularity are extracted. The network outputs a multi-dimensional defect semantic vector, typically with a dimension of 128, that describes the key attributes of the defect. Training parameters include the Adam optimizer, a learning rate of 0.0001, a batch size of 32, and 40 training cycles. Experimental data covers a wide range of PCB defect samples, ensuring the model's strong generalization capabilities. During testing, the deep semantic parsing module achieved a defect detection accuracy exceeding 93%. The deep semantic vector is integrated with the defect point's spatial information (location coordinates), morphological statistical parameters (area, aspect ratio), and confidence score to construct a comprehensive evaluation vector. This vector integrates the defect's spatial location, visual features, and semantic information, resulting in high expressiveness and discriminability. The comprehensive evaluation vector is generated using a normalization and weighted fusion strategy. Spatial coordinates are normalized to the [0, 1] range, visual and semantic features are reduced in dimension using principal component analysis (PCA) to eliminate redundancy, and finally, a unified vector is synthesized using empirical weights. This vector provides a solid data foundation for subsequent defect classification and prediction models.
[0017] Step S6: Defect recognition confidence callback and regional calibration are performed based on the spatiotemporal stable compensation image sequence, and defect detection post-optimization is performed in combination with the comprehensive evaluation vector of the defect point to build an intelligent defect detection optimization model.
[0018] In this embodiment, based on a stable compensated image sequence, confidence levels are dynamically adjusted across multiple frames for the same defect point. The specific method involves collecting confidence scores for the defect point across N frames (e.g., N=5) and performing a comprehensive evaluation using a weighted average strategy. The weighting scheme prioritizes the current frame's confidence score (approximately 0.5), while confidence scores for adjacent frames decrease by approximately 0.1 per frame. This ensures that recent image information is prioritized while leveraging historical data to stabilize the recognition results. After the adjustment, the confidence score is compared with a threshold of 0.7. Defect points below the threshold are further marked as potential false defects and enter the subsequent calibration phase. This mechanism effectively mitigates transient false detections and missed detections. In experiments, the false detection rate was reduced by approximately 12% after the confidence adjustment, significantly improving detection stability. Using the multi-frame position coordinates of the defect point in the spatiotemporal sequence, the weighted centroid method is used to correct the spatial position of the defect point, keeping the coordinate error within ±1 pixel. Based on the confidence adjustment results, the weights of each dimension in the comprehensive evaluation vector are dynamically adjusted, for example, increasing the weight of semantic features and decreasing the weight of spatial coordinates to adapt to temporal changes. Combining visual features, spatial information, and time series features, a fusion model (such as a confidence fusion algorithm based on Bayesian inference) is used to achieve final defect determination. Finally, the fusion results of confidence callback, regional calibration, and comprehensive evaluation vectors are input into an intelligent optimization model. This model uses an ensemble learning framework (such as XGBoost or LightGBM) and combines multidimensional input data to perform final defect classification and scoring. During model training, a cross-validation strategy is employed. The training set contains thousands of labeled PCB defect samples, with feature dimensions such as callback confidence, spatial coordinates, and deep semantic features. Grid search is used for hyperparameter tuning. The optimal parameter combination achieves an F1 score of 0.94, with defect detection accuracy and recall exceeding 93%. This intelligent optimization model achieves a comprehensive upgrade from single-frame image recognition to multi-temporal information fusion. It not only significantly reduces the false defect misjudgment rate, but also ensures the continuity and stability of defect detection, meeting the dual requirements of real-time and precision in industrial environments.
[0019] In this embodiment, refer to Figure 2 , is a flowchart of the detailed implementation steps of step S1. In this embodiment, the detailed implementation steps of step S1 include: Based on the high-definition camera, small angle adjustments are made to continuously collect multi-directional PCB inspection images and construct a multi-angle perturbation imaging sequence of the PCB board; Calculating pixel points of each image on the multi-angle perturbation imaging sequence of the PCB board, and performing pixel-level registration correction to generate a pixel position aligned image sequence; Calculating pixel grayscale values at different angles of the pixel position aligned image sequence to obtain pixel variance coefficients; Performing threshold segmentation processing on the pixel variance coefficient to identify stable areas and unstable areas of the optical pixels; Adaptive pixel stability compensation is performed on the stable and unstable areas of optical pixels to construct a spatiotemporal stability compensated image sequence.
[0020] In this embodiment, a high-definition camera is continuously fine-tuned within a narrow angle range to capture an image sequence with subtle angular perturbation differences. This imaging strategy is designed to leverage differences in illumination, reflection, and microstructural responses at different viewing angles to enhance the discriminative capabilities of subsequent image fusion and pseudo-defect detection. In the experimental platform, an industrial-grade CMOS camera with a resolution of 4000×3000 pixels (such as the Basler acA4112 series) is used, coupled with a high-precision stepper motor stage to adjust the camera's pitch and roll within a ±2° range, with a stepping accuracy of 0.1°. One image frame is acquired at each angular position, ultimately forming a multi-angle, slightly perturbed imaging sequence consisting of 9 to 15 frames. To ensure imaging consistency, the entire acquisition process is performed under stable temperature (22°C) and constant lighting conditions, using a parallel light source (LED ring light) with a brightness uniformity greater than 90% for lateral illumination. The purpose of multi-angle imaging is to introduce angular variations in feature responses. These subtle perturbations effectively help the model distinguish between true structural defects and pseudo-defects caused by reflections, dust, and texture. Due to slight differences in perspective, captured images inevitably exhibit subtle spatial shifts and affine deformations. To achieve this, pixel-by-pixel registration is required to ensure strict alignment within pixel space and construct a unified coordinate system for the image sequence. This step uses a feature extraction algorithm based on the scale-invariant feature transform (SIFT) to extract keypoints from each image. The FLANN (Fast Library for Approximate Nearest Neighbors) matching algorithm is then used to pair-match feature points between adjacent images. After matching, the RANSAC algorithm is used to remove mismatched points, and the affine transformation matrix, or homography, is estimated. The warpPerspective function in OpenCV is then used to remap the images, ensuring that the pixel positions of each frame are strictly aligned with a reference frame (typically an image with a 0° angle). In experiments, the NVIDIA GPU-accelerated library cuSIFT was used for feature extraction and matching, achieving registration time of less than 120ms for each pair of images. After processing, the output is a set of image sequences with consistent size, pixel alignment, and overlapping background structures, providing a unified basis for subsequent stability analysis based on time and space dimensions. After pixel registration is completed, for each spatial coordinate (x, y), its grayscale value change sequence in all image frames can be extracted. Through statistical analysis of this sequence, its stability with angular disturbance can be evaluated, thereby providing optical consistency indicators for defect identification. The specific approach of this step is: in the pixel space, traverse all coordinate points and construct the grayscale vector of its angular dimension for each pixel. ; where n is the number of image frames. Then, calculate the standard deviation of the vector and mean , and further obtain the coefficient of variance (CV) ; where ϵ=1 is a tiny constant to prevent division by zero. In the experimental setting, 8-bit grayscale images are used as input, and the size of each image is 1024×1024. Finally, a variance coefficient map is obtained, which reflects the stability characteristics of each pixel under imaging at different angles. This map reveals to a certain extent the spatiotemporal consistency of factors such as surface material reflection characteristics, structural deformation, and texture interference, providing a quantitative basis for subsequent region classification. Based on the pixel variance coefficient map, a threshold segmentation operation can be implemented to distinguish stable areas with high optical response consistency from unstable areas that are easily affected by angle perturbations. The selection of threshold segmentation usually adopts the Otsu adaptive segmentation algorithm or empirical setting. In the experiment, referring to multiple groups of PCB board samples, the CV of the statistically optically stable area is concentrated between 0.05 and 0.15, while the areas with CV greater than 0.2 are mostly reflective boundaries, stains or false alarm areas. Therefore, the segmentation threshold is usually selected. to delineate two types of areas. In practical applications, the threshold can also be dynamically adjusted based on histogram kurtosis analysis to adapt to different plates and lighting conditions. After segmentation processing, two mask images are output: one is a stable mask (Mask_S), which represents a set of pixels that maintain a consistent response at different angles; the other is an unstable mask (Mask_U), which mainly covers high-frequency noise, pseudo-defect reflection areas, etc. This segmentation operation has the characteristic of dimensionality reduction, compressing the information of the original multi-angle image into a two-dimensional stability description map, greatly improving the positioning accuracy and robustness of subsequent defect judgment. After identifying stable and unstable areas, the image sequence needs to be adaptively compensated based on regional characteristics to eliminate the interference caused by pseudo-defects while retaining the structural characteristics of real defects. There are two types of compensation strategies: for optically stable areas, the mean or median fusion method of multi-angle images is directly used; for unstable areas, weighted filtering and context structure inference methods are used to recover information. In the experiment, pixel values in the stable area are fused using weighted averaging, where the weights can be dynamically adjusted based on indicators such as signal-to-noise ratio and grayscale consistency; while in the unstable area, texture reconstruction is performed by combining spatial neighboring pixels and temporal dimension filtering results (for example, using bilateral filtering or guided filtering). In addition, to further enhance the stability compensation effect, temporal difference analysis is introduced to smooth the abnormal responses of short-term mutations in the unstable area. The final output of the spatiotemporal stable compensated image sequence retains the clear edges of the structure and removes the false texture and reflection information caused by angular disturbances. Experimental results show that this compensated image sequence can significantly improve the recall rate and precision in actual defect detection tasks, especially when dealing with pseudo-defects such as metal reflection and uneven etching.
[0021] In this embodiment, refer to Figure 3 , is a flowchart of the detailed implementation steps of step S2. In this embodiment, the detailed implementation steps of step S2 include: Divide the image sequence into equal-sized areas based on the temporal and spatial stability compensation image sequence to construct the PCB board area image sequence; Based on the time-space stable compensation image sequence, reverse pyramid structure division is performed to build a multi-scale hierarchical analysis framework; Extracting a maximum-scale image based on a multi-scale hierarchical analysis framework; calculating the grayscale distribution, texture features, and edge information of the maximum-scale image to obtain basic features of the maximum-confidence image; Performing normalized similarity probability calculation on each region of the PCB sub-region image sequence based on the maximum confidence image basic features to identify normalized inspection-exempt sub-regions and abnormal inspection-exempt sub-regions; Normal area probability distribution fitting is performed on the normalized inspection-exempt sub-areas and abnormal inspection-exempt sub-areas, and spatial cluster analysis is performed to construct the initial area classification results.
[0022] In this embodiment, a full-width PCB image sequence, after spatiotemporal stabilization compensation, is divided into several sub-region images of uniform size, facilitating subsequent feature extraction, similarity analysis, and defect detection at the local scale. This division strategy utilizes a non-overlapping, uniformly sized grid to ensure no cross-redundancy between regions. In practice, given the 2048×2048 pixel resolution of the full PCB image, the image is divided into 64×64 pixel sub-regions, resulting in a total of 1024 sub-region image sequences. Each sub-region has a corresponding segment in all stabilized and compensated image frames, forming a local region sequence (referred to as a patch sequence). Furthermore, to ensure that each sub-region contains sufficient structural information and avoid low feature dimensionality due to too small a region, a 64-pixel region size has been experimentally validated as the optimal size, preserving local image texture while balancing computational efficiency. All sub-regions are logically assigned a position index (row, col), and their mapping within the original image is established. This step not only provides operational units for subsequent multi-scale analysis but also provides an organizational structure for constructing a database of exempt regions and defect inference. In a multi-scale pyramid structure, the highest-resolution (i.e., largest-scale) image contains the richest spatial details and visual feature information. This step aims to extract essential visual features highly relevant to defect detection from the largest-scale image and construct a regional confidence assessment model. First, a grayscale histogram is calculated for the largest-scale image to obtain grayscale concentration and distribution curves for the entire image. Next, texture features are extracted using Local Binary Patterns (LBP), and their texture consistency coefficients are calculated for each subregion. Edge information is then extracted using methods such as the Canny operator and Sobel gradient, and combined with the Histogram of Oriented Gradients (HOG) to generate an edge structure map. Finally, these three features are normalized and integrated into a base feature vector using principal component analysis (PCA) or convolutional feature encoding (e.g., using shallow features from pre-trained VGG). Each subregion is assigned a "visual confidence score," which measures whether it exhibits anomalies or significant visual differences in the largest-scale image. In the experiment, the confidence score range is defined as 0~1. Generally, areas with a confidence score higher than 0.85 are considered to be normal areas with balanced texture and regular structure, while those below 0.6 may have defects or artifact interference, thereby guiding subsequent regional similarity comparison and anomaly identification operations.
[0023] After obtaining the basic visual feature vectors for each subregion, a similarity evaluation mechanism must be established between regions to identify "normalized, inspection-exempt subregions" with highly consistent features with the mainstream region and "abnormalized, inspection-exempt subregions" with significant differences. This step uses similarity metrics (such as cosine similarity, Euclidean distance, and KL divergence) to compare each subregion's features with the regional feature mean and calculate the normalization probability. The normalization probability can be defined as the normal mapping result of the similarity score between the subregion and the mean model. For example, a region with a cosine similarity score of 0.92 corresponds to a region with a confidence level exceeding 95%. In experiments, a probability threshold of 0.9 is typically set as the threshold for determining normalized, inspection-exempt subregions. Specifically, if the subregion similarity probability is greater than 0.9, it is classified as a normalized, inspection-exempt region; if it is between 0.7 and 0.9, it is classified as an abnormal, suspicious region; and if it is below 0.7, it enters the defect warning zone. This classification allows for the initial construction of a regional status map, enabling preliminary region screening and labeling based on their spatial distribution within the image. This significantly improves overall inspection efficiency, enabling the early elimination of over 80% of normal regions, allowing subsequent high-precision analysis of only suspicious areas and reducing system computational complexity. The final step involves statistically modeling each of these sub-regions based on their probabilistic characteristics and clustering and classifying them based on their actual locations in image space to generate a structured regional distribution map. First, the probability distributions of normalized and abnormalized regions are fitted to Gaussian or mixed Gaussian distributions, respectively, to assess the overall anomaly deviation trend within the current sample. This distribution fitting not only provides theoretical support for regional classification but also allows for dynamic adjustment of the discrimination threshold to accommodate different board shapes. Subsequently, spatial clustering analysis is performed on all sub-regions using unsupervised clustering algorithms such as DBSCAN or Mean-Shift, combining spatial coordinates with similarity distributions to identify "typical normal region clusters," "isolated abnormal region points," and "high-density defect suspect clusters." The clustering results can be output as a multi-category annotated map and fused with the original image to construct a preliminary PCB region classification result map. In the experimental platform, a 5×5 subregion spatial kernel is typically used as the clustering scale. Abnormal clusters must be identified when at least three adjacent subregions are marked as abnormal. The final initial region classification result map provides a spatial constraint framework for subsequent fine-grained defect extraction, pseudo-defect removal, and precise localization models, forming a key intermediate output of the entire inspection system.
[0024] In this embodiment, reference Figure 4 The above is a flowchart of the detailed implementation steps of step S3. In this embodiment, the detailed implementation steps of step S3 include: Based on the initial region classification results, the abnormal inspection-exempt sub-regions are identified and marked as potential defect region images; Perform deep image visual analysis on images of potential defect areas to extract information about the microscopic roughness distribution characteristics, substrate texture directionality, and surface reflectivity non-uniformity on the PCB surface. Performing multi-scale Gaussian filtering on the micro-roughness distribution characteristics to obtain surface texture features of different scales; According to the surface texture characteristics, the substrate texture directionality and surface reflectivity non-uniformity information are optimized for comprehensive pseudo-defect elimination to construct a pseudo-defect purified high-confidence image.
[0025] In this embodiment, in the constructed initial region classification result map, the system has divided all sub-regions into "normalized inspection-free regions" and "abnormalized inspection-free regions." Based on this, this step further considers the "abnormalized inspection-free regions" as potential high-risk defect regions, and independently extracts and marks them as target region images. First, based on the spatial clustering results, a connectivity analysis is performed on all regions in the abnormal cluster to confirm whether they constitute a complete potential defect region. If a region is adjacent to multiple surrounding abnormal regions (such as more than 3), it is marked as a "high-confidence potential defect region"; if it is an isolated abnormal region, the label is retained but a lower confidence weight is assigned. In the experimental platform, a region mask based on image coordinates is used for extraction, and the potential defect region image is cropped and saved as an independent image set according to the original image resolution to facilitate subsequent multi-dimensional analysis and processing. The typical size is 128×128 or 256×256 pixels, depending on the original sub-region division scale. Upon completion, a set of image blocks focused on the suspect area is output. A unified data structure is constructed using matrix indices, location coordinates, and confidence labels, laying the foundation for subsequent deep visual feature extraction and pseudo-defect analysis. Using deep image parsing methods, high-precision surface feature analysis is performed on images of potential defect areas, identifying the essential physical and optical differences between real and pseudo-defects. This analysis encompasses three key aspects: microscopic roughness distribution, substrate texture directionality, and reflectivity nonuniformity. Specifically, the image of the potential defect area is first illuminated and normalized using image enhancement techniques (such as local contrast enhancement and the Retinex algorithm) to eliminate interference caused by local brightness differences. Frequency-domain analysis methods, such as the two-dimensional discrete wavelet transform (DWT) or Fourier transform (FFT), are then used to obtain the image's energy response across different directions and frequency components, thereby extracting surface microroughness characteristics (such as local spectral density variations). Furthermore, gradient direction analysis (such as structural tensor calculation) is used to extract local dominant texture direction information. Texture consistency metrics (such as directional entropy) are then combined to identify the consistency and discreteness of texture arrangement. For reflectance imbalance analysis, the mean and variance of pixel grayscale values within each directional window within the image are used to characterize areas of localized illumination instability. In the experiment, local sliding windows ranging in size from 5×5 to 15×15 were used as computational primitives to ensure that feature extraction maintains both spatial locality and global statistical characteristics. The resulting multiple feature matrices will guide the next stage of artifact removal and image cleanup.
[0026] After extracting micro-roughness features, this step aims to separate and analyze texture features at different scales on the image surface through multi-scale Gaussian filtering. This operation allows for a hierarchical separation of fine-grained texture, background structural interference, and true defect responses in the original image, thereby enhancing the ability to remove false defects. The original image is blurred multiple times using a Gaussian kernel function, each with a different standard deviation σ (typically set to σ = 1.0, 2.0, 4.0, and 8.0). Each blurred image is then differentiated from the original image to extract detailed texture features at different scales. This processing method, similar to the Difference of Gaussian (DoG) pyramid, can highlight edges and texture responses at different scales. Specifically, small-scale filtering (σ ≤ 2.0) enhances microstructural responses and is suitable for detecting microcracks and fine-line defects; medium-scale filtering (σ ≈ 4.0) preserves medium-scale texture structures and can identify partial erosion, light wear, and other defects; and large-scale filtering (σ ≥ 8.0) suppresses background interference and the effects of illumination variations. In the experiment, energy statistics and texture retention coefficients were evaluated for the texture response map at each scale, further guiding the integrated decision-making and weighting of multi-scale information. The final output is a texture feature map corresponding to multiple scales, providing multi-dimensional data support for subsequent false defect removal and high-confidence image construction. After obtaining the multi-scale texture map, texture directionality, and reflectivity information, the final step is to perform a comprehensive false defect removal operation. The goal is to remove "false anomalies" caused by texture repetitiveness, reflection interference, or the substrate's natural structure, retain the true defect response, and construct the final high-confidence cleaned image. First, within the multi-scale texture map, by comparing the relative rate of change of texture energy at each scale (e.g., large differences between microscale and mesoscale textures and highly consistent directionality), false defects suspected of being caused by texture repetition can be initially identified. Such areas often cause false positives in actual inspections due to repeated texture responses. Subsequently, "texture suppression" processing is performed on highly consistent regions by combining the substrate's main texture direction with its local texture consistency index (DCI). Finally, areas of reflectivity inhomogeneity are identified based on the degree of abnormal clustering of local brightness gradients (e.g., a directional trend of local reflectance peaks), and are filtered out using a reflective region mask. This fusion optimization process utilizes a rule-based prioritization mechanism (texture consistency first, then reflectivity) combined with a regional confidence weighted model to embed the final cleansed region into the original image for local restoration.Experimental evaluation shows that the purified image can reduce the average false detection rate to below 0.9%, significantly improving the misjudgment caused by metal reflections, etched edges and silk-screen ghosting in traditional methods, thereby outputting a high-confidence image with a purer visual structure and clearer defect identification, providing a solid foundation for subsequent precise positioning and classification.
[0027] In this embodiment, the specific steps of performing comprehensive optimization of pseudo-defect elimination based on the substrate texture directionality and surface reflectivity non-uniformity information according to the surface texture characteristics and constructing a pseudo-defect cleaned high-confidence image are as follows: Perform inherent texture interference analysis based on substrate texture directionality to identify inherent texture pseudo-defect areas; performing anisotropic diffusion filtering on the intrinsic texture pseudo-defect region based on the surface texture features to obtain an intrinsic texture defect optimized region; Performing texture noise suppression processing on the inherent texture defect optimization area to generate a texture suppression optimization area; performing abnormal light spot disturbance analysis based on the surface reflectivity non-uniformity information and marking the light spot disturbance pseudo-defect area; Perform uniform illumination compensation on the pseudo-defect area caused by the light spot disturbance and construct an illumination compensation area; Comprehensive pseudo-defect elimination optimization is performed on the texture suppression optimization area and the illumination compensation area, and super-resolution reconstruction is performed based on the normalized inspection-exempt sub-area to construct a pseudo-defect purification high-confidence image.
[0028] In this embodiment, during the manufacturing process of PCB boards, their substrates (e.g., FR4 material) typically possess a certain degree of natural texture directionality, often manifesting as stripes, fibers, or fabric-like image features distributed along a certain principal direction. This substrate texture is often misidentified as linear or stripe-like defects during imaging, resulting in false defects. This step aims to identify and mark "intrinsic texture false defect regions" caused by the inherent substrate structure through in-depth analysis of texture directionality. Specifically, the principal direction of each potential defect region is analyzed using the Structure Tensor method or the Histogram of Oriented Gradients (HOG). The Texture Orientation Index (TOI) for that region is obtained by calculating the distribution density and variance of the principal directions within a local area of the image. If a region exhibits a high concentration of directionality (e.g., principal direction angular variance σθ < 5°) and the texture structure remains consistent across multiple image sequences, it is identified as a typical intrinsic texture region. In the experiment, areas with a TOI exceeding 0.85 were marked as candidates for intrinsic texture defects and further screened using auxiliary indicators such as grayscale mean fluctuation and local texture periodicity. This process effectively identifies highly repeatable and directionally stable natural structural textures, preventing subsequent inspections from misidentifying defects such as cable breaks and copper wire erosion. To further mitigate the interference of intrinsic texture regions with the visual analysis model, this step introduces anisotropic diffusion filtering (ADF) to optimize the structure of identified intrinsic texture defects. ADF is a guided filtering method based on image gradient information. It maintains the edges of the main image structure while smoothing out redundant details along the main texture direction. In implementation, the Perona-Malik model is used for diffusion calculations. Its diffusion function f(x) is regulated based on the local gradient strength of the pixel, achieving the dual effects of "edge suppression and texture diffusion." During the application process, diffusion intensities of different directions are applied to each intrinsic texture region: the diffusion factor is set to a high value (e.g., K=2030) along the main texture direction and a low value (e.g., K=510) perpendicular to the texture direction, achieving uniform fusion within the main texture direction while preserving the edges of structures in non-main directions. The number of diffusion iterations is generally controlled between 10 and 20 to avoid over-smoothing. Through this operation, the highly directional redundant structures in the intrinsic texture region are weakened or fused, thereby optimizing the image structure of this region. The output "intrinsic texture defect optimized region" image presents a more uniform visual effect without pseudo-structural response, which is beneficial for subsequent noise suppression and defect location analysis.
[0029] After anisotropic diffusion filtering, some image noise caused by high-frequency texture, such as micro-streaks and periodic point-like interference, may remain. These components may originate from microscopic inhomogeneities in the PCB substrate texture or errors in the camera system's photosensitive response. To further cleanse these areas, this step employs a combined texture noise suppression strategy, combining frequency-domain filtering with spatial median filtering to effectively suppress residual texture noise. First, in the frequency domain, a band-stop filter is used to precisely remove directional frequency components with strong texture response from the image spectrum. Typically, this filter retains the 0.02π and 0.8ππ bands and suppresses periodic interference between 0.2π and 0.8π. Subsequently, a nonlinear median filter is applied in the spatial domain, typically using the statistical median rather than the mean in a 3×3 or 5×5 window. This filter preserves the main regional contours while eliminating highly random high-frequency point noise. Experimental data shows that this combined filtering strategy can reduce texture intensity by less than 15% while improving image structural stability (e.g., the texture consistency coefficient (TUC) increases by approximately 12%). After processing, the resulting "texture suppression optimized region" image significantly weakens high-frequency texture responses, effectively shielding error sources caused by material structure and providing an ideal baseline image state for final pseudo-defect removal. Besides texture interference, another common cause of pseudo-defects is "spot disturbance" caused by surface reflections or uneven illumination. This type of optical artifact appears as a localized bright spot in the image, and its characteristics are highly similar to the high-contrast defect response, which can easily lead to model misjudgment. This step utilizes the reflectivity non-uniformity information extracted earlier and combines it with brightness gradient anomaly cluster analysis to quantitatively identify and label these spot disturbances. First, the image is converted to a color space with higher photometric perceptual consistency (such as Lab or YCbCr). The luminance channel L or Y is extracted, and local maximum detection and regional connectivity analysis are performed. The spot regions in the image are then analyzed using local luminance variance (LLV) and gradient cluster index (GCI). If the brightness variance of a region within a local window (e.g., 11×11 pixels) is greater than twice the overall image mean, and its gradient direction is highly concentrated within a ±10° range, it is identified as a spot disturbance region. In the experimental setup, the brightness anomaly region must be larger than 5×5 pixels to filter out isolated, bright pixel interference. All regions meeting these criteria are masked in the image and stored as a "spot disturbance pseudo-defect region" set for subsequent illumination compensation processing.
[0030] To address the high-brightness interference characteristics of the spot-disturbance region, this step employs a brightness compensation strategy based on an illumination balance model to dynamically suppress local brightness and enhance regional perceptual consistency. The specific processing flow consists of two steps: local illumination modeling and dynamic compensation map generation. In the modeling phase, bilateral filtering is used to extract low-frequency modeling of the brightness channel to generate a background illumination distribution map. The background illumination map is then subtracted from the original image brightness to obtain the spot amplitude map for the true reflection-enhanced region. In the compensation phase, an adaptive compression function (such as a gamma transform or nonlinear mapping function) is designed to suppress this spot amplitude map. The adjusted brightness channel is then re-integrated into the original image to form an image of the illumination-compensated region. In the experimental setup, the gamma value is typically set between 0.4 and 0.6 to achieve medium-intensity compensation. The compression threshold is dynamically set to the 90th percentile of the full-image brightness distribution to adapt to the spot response in different brightness environments. After this operation, the highlight areas in the image are smoothly transitioned to the surrounding brightness range, achieving overall brightness consistency and significantly reducing the false detection rate of false defects caused by reflection disturbances. The resulting "illumination compensation area" image replaces the original reflective interference area and participates in subsequent image fusion and defect detection. The cleansed areas formed by the two main sources of false defects—intrinsic texture disturbance and spot disturbance—are fused together to achieve integrated false defect removal. Specifically, the texture suppression optimization area and the illumination compensation area are first embedded into the original image using image masks. The Laplacian blending algorithm is then used to soften the edges around the fused area to avoid visual discontinuities in the transition zone. The fused image becomes the initial cleansed image. To further improve image resolution and fine defect detection accuracy, a deep learning model (such as an ESRGAN-based super-resolution network) is used to reconstruct images based on normalized, uninspected sub-area image samples. This model learns the detailed structure and high-frequency response characteristics of the normalized area to reconstruct high-quality texture contours and edge details in the cleansed image. In experiments, the super-resolution magnification was set between 2 and 4 times, and the output size was adjusted based on the original image resolution. The final output image is a "pseudo-defect purified high-confidence image" with features such as high structural clarity, low pseudo-effects, and high defect separability, providing the most ideal input basis for subsequent defect precision positioning and classification recognition models.
[0031] In this embodiment, the specific steps of step S4 are: Identify PCB board connection defects on pseudo-defect-purified high-confidence images and mark multiple connection defect points; Perform graph neural reasoning on multiple connection defect points to identify the spatial continuity and physical rationality of the connection defect points; Predicting fracture structures based on the spatial continuity and physical rationality, and identifying potential fracture structure points; Accurately locate potential fracture structure points in space, mark the global defect point distribution, and construct a defect point spatial distribution map.
[0032] In this embodiment, the pseudo-defect cleaned high-confidence image, due to the effective suppression of texture noise and spot disturbance, exhibits high image stability and detail resolution, forming the foundation for high-precision connection defect detection. This step aims to identify connection defects in PCB circuits, such as cold solder joints, broken solder joints, continuous solder joints, or detached solder joints. First, edge enhancement-based image segmentation methods, such as Canny edge detection combined with region growing, are used to extract the edges and structural contours of the solder joint connection area. A set of connection defect candidate points is then constructed by combining the grayscale variation characteristics of the solder joint area (such as the average brightness of the pad center), shape parameters (roundness, area, etc.), and local texture stability indicators. A pre-trained lightweight convolutional neural network (such as a MobileNet or ResNet18 variant) is then used to perform binary classification on the candidate areas, outputting a probability score indicating whether the connection is abnormal (a recommended threshold of P>0.65). In experiments, training on samples of solder joint defects of different categories (approximately 10,000 images) achieved an average detection accuracy of 94.3%. Finally, multiple points with high connection anomaly scores are visualized on the image as labeled boxes or masks, creating an "initial labeled graph of connection defect points" to provide coordinate input for subsequent structural reasoning and fracture prediction. The identified connection defect points only provide local information and cannot fully reflect their connectivity and physical plausibility within the overall circuit structure. Therefore, a graph neural network (GNN) is introduced for spatial structural reasoning and analysis. This step treats the PCB image as graph-structured data, with each connection defect point as a graph node. Edges are established between nodes based on their physical layout and circuit wiring rules to construct a "defect point spatial graph G = (V, E)." Edge weights are determined by two factors: Euclidean distance (connection established if less than a certain threshold D, such as D = 30 pixels); and a consistency score for the circuit path connection direction. Once the graph structure is constructed, it is fed into a GNN model (such as GCN or GAT) for inter-node information propagation and aggregation, outputting a "continuity score" and a "physical plausibility score" for each node. The continuity score assesses the smoothness of connections between a node and multiple surrounding defective nodes, while the physical plausibility score evaluates whether a node is located along a normal electrical structural path on the PCB. In experiments, the model was trained on a dataset of labeled simulated fracture samples (approximately 5,000 sets of artificially synthesized connection interruption data), achieving an assessment accuracy exceeding 92%. The final results significantly eliminate isolated, sporadic, non-structural defect points and focus on continuous defect segments that may form circuit fracture chains, providing logical support for fracture structure prediction.
[0033] Based on the spatial and physical scores of each defect point obtained through graph neural inference, this step further explores the "potential fracture structures" that may form between defect points. Fracture structures typically manifest as multiple consecutive anomalies along the conductor, unclosed solder joints, copper wire breaks, or non-closed conductive paths. The specific method is as follows: First, a "continuous anomaly subgraph" is constructed based on the continuity scores output by the previous step, extracting connected subsets of all continuously connected anomaly points. Second, a path matching model from the circuit rule library is used to simulate circuit paths in the areas covered by these subgraphs (for example, by comparing the wiring diagram to determine whether the actual current path forms a loop). If the connected anomaly points in a certain area form a continuous path but the current path is not closed, and the wire width does not meet the design specifications (below a set threshold, such as 0.3mm), the unclosed endpoints are marked as "potential fracture structure points." This prediction model integrates multi-dimensional features such as spatial layout, structural constraints, and connection morphology to provide a high-level structural assessment of the connection defect point map. In experiments, the potential fracture point identification model achieved an accuracy of 88.7% on a real defect test set, significantly outperforming traditional edge connectivity algorithms. This step effectively identifies areas with potential fracture trends caused by single-point connection anomalies, providing a reliable basis for subsequent location and alarm systems. After identifying potential fracture points, they must be accurately spatially mapped and globally annotated to construct a spatial distribution map of structural defects. This step first optimizes the location of each potential fracture point using sub-pixel spatial regression techniques. This method combines edge fitting (e.g., Sobel+quadratic interpolation) with regional centroid offset correction to calculate the fracture point's precise coordinates to the decimal pixel level (e.g., accuracy within 0.2 px). All defect point coordinates are then uniformly mapped to the PCB's unified physical coordinate system (typically using a calibration parameter that converts image size to physical dimensions, such as 1 px = 10μm). These points are then categorized and labeled according to the circuit region they belong to (e.g., signal layer, power layer, etc.). Finally, the defects are visually marked on the original image using color coding (e.g., red indicates potential fracture points, orange indicates confirmed connection anomalies), and a "defect point spatial distribution map" is output. Each marked point in the map includes information such as spatial coordinates, defect type, and confidence score. This distribution map not only serves as a valuable data reference for subsequent repair and quality inspection processes, but also serves as an input for quality traceability, process improvement, and automated repair control systems. Experimental verification has shown that the system has a detection success rate exceeding 93% for typical multi-point solder joint failures and an improvement of over 20% in the accuracy of identifying minor solder cracks and breakpoints, significantly improving the overall efficiency and accuracy of PCB defect detection and location.
[0034] In this embodiment, the specific steps of step S5 are: Defining a defect point segmentation region threshold; performing defect point region threshold segmentation on the spatiotemporal stability compensation image sequence one by one based on the defect point segmentation region threshold and the defect point spatial distribution map, and extracting the image threshold segmentation frame of each defect point; Extracting texture gradient vectors, color statistical parameters and edge morphology sequences based on the image threshold segmentation frame; Perform multi-dimensional defect behavior modeling based on the texture gradient vector, color statistical parameters, and edge morphology sequence to construct a behavior model for each defect point; Performing deep semantic analysis of defects on the behavior model to obtain defect semantic types and defect behavior stages; A comprehensive defect feature evaluation is performed based on the defect semantic type and defect behavior stage to obtain a comprehensive evaluation vector of the defect point.
[0035] In this embodiment, after constructing the spatial distribution map of defect points, regional segmentation of the spatiotemporally stable compensated image sequence is required to further analyze the local features of each defect point. First, a segmentation threshold for each defect point is defined based on the spatial coordinates of the defect point. This threshold typically includes a spatial radius (e.g., r = 15 pixels) and a grayscale difference threshold (e.g., ΔI = 20 grayscale levels) to ensure coverage of the defect point and its surrounding area. Image segmentation is performed on each defect point using a region growing algorithm. This algorithm starts from the center pixel of the defect point and expands outward until it reaches the preset spatial radius or grayscale difference threshold. This method extracts a thresholded image segmentation box for each defect point, ensuring that all relevant pixel information is included. Experiments using these parameters to segment multiple defect points have shown that the defect area can be effectively extracted, with highly accurate and consistent segmentation results. This step provides a reliable foundation for subsequent feature extraction and behavioral modeling. The distribution of gradient orientations within each segmentation box is calculated using the Histogram of Oriented Gradients (HOG) method. The segmentation box is divided into multiple small cells (e.g., 8×8 pixels). The gradient direction and magnitude are calculated within each cell, and a directional histogram is constructed. This method captures the texture directionality and edge information of the defect area. Within the segmentation box, statistical parameters such as the mean, variance, skewness, and kurtosis of the three RGB channels are calculated. These parameters reflect the color distribution characteristics of the defect area and help distinguish different types of defects. The Canny edge detection algorithm is used to extract edge information within the segmentation box. Next, morphological features such as edge length, direction, and curvature are analyzed to construct an edge morphology sequence. These features describe the geometric shape and structural characteristics of the defect area. These three types of features are fused to construct a high-dimensional feature vector. To avoid the computational complexity caused by excessive dimensionality, dimensionality reduction methods such as principal component analysis (PCA) can be used to reduce the feature dimensionality to a reasonable range (e.g., 50 dimensions). Machine learning algorithms such as support vector machines (SVMs) or random forests are used to train the reduced feature vector to construct a defect behavior model. This model can predict the type and severity of the defect based on the input feature vector. Cross-validation and other methods were used to validate the constructed behavioral model and evaluate its accuracy and robustness. In experiments, the behavioral model constructed using this method demonstrated high accuracy and stability across multiple test sets. Based on the output of the behavioral model and a predefined defect classification system (e.g., open circuit, short circuit, cold solder joint, continuous solder joint), the semantic type of each defect point was determined. This classification system can be adjusted and expanded based on actual application needs. The characteristic change trends of the defect point were analyzed to determine its behavioral stage.For example, by comparing images at multiple time points, the expansion of the defect area can be observed to determine whether it is in the initial stage, development stage, or stable stage. The identified semantic type and behavioral stage are combined with the spatial location information of the defect point to generate a corresponding semantic label. This label can be used for subsequent visualization and defect management. Based on the semantic type and behavioral stage of the defect, a set of evaluation indicators are defined, such as severity, scope of impact, and difficulty of repair. Each indicator can be weighted according to actual needs. Combining the behavioral model output and semantic label of the defect point, the score of each evaluation indicator is calculated and combined into a comprehensive evaluation vector. For example, the severity can be determined based on the size and location of the defect area, and the scope of impact can be evaluated based on the degree of impact of the defect on the surrounding circuits. The comprehensive evaluation vector is used for defect sorting, priority determination, and repair strategy formulation to improve the efficiency and effectiveness of defect management.
[0036] In this embodiment, the specific steps of step S6 are: Based on the time-space stable compensation image sequence, the time stamp is arranged in time sequence, and the defect area positioning trajectory is monitored to generate a time series coordinate sequence for each defect point; Positioning and tracking defect behaviors at different time points on the time series coordinate sequence to generate a defect behavior trajectory map; Calculating the defect boundary deviation rate on the defect behavior trajectory map to obtain a defect deviation rate curve; Performing defect recognition confidence callback and regional calibration on the defect offset rate curve to obtain defect location calibration feedback information; Post-defect detection optimization is performed based on the comprehensive evaluation vector of defect points and the defect positioning calibration feedback information, and an intelligent defect detection optimization model is constructed.
[0037] In this embodiment, after completing spatiotemporal stability compensation for images and constructing high-confidence images with pseudo-defect cleanup, the image sequence needs to be managed and reconstructed in the temporal dimension to further analyze the evolution characteristics of defects at multiple time points. First, the stable and compensated image sequence is time-stamped to ensure that each frame has a unique time identifier. In the experimental system, images are typically acquired with a time step of 10ms, generating a time series such as T0, T1, T2, ..., Tn. Next, for each defect point, based on its initial location coordinates in the spatial distribution map, its spatial position change is tracked frame by frame across all image frames at all time points. A combined method based on the Normalized Cross-Correlation (NCC) and shape matching is used to locate the coordinates of the center point of the defect region in consecutive frames. This method accurately captures the temporal trajectory of the defect point, thereby generating a complete temporal coordinate sequence {P0(x0, y0), P1(x1, y1), ..., Pn(xn, yn)}. After obtaining the time-series coordinates of a defect point in each time frame, its dynamic evolution trajectory needs to be characterized from the perspective of its behavioral pattern. By spatially connecting these time-series coordinates, a trajectory map of the defect point can be constructed. This map reflects the behavioral evolution path of the defect region, including both the changing trends in spatial displacement and the deformation dynamics of the defect contour boundary. To accurately describe the trajectory map, Bezier curve fitting can be used to smooth the time-series point set, supplemented by multi-order difference techniques to extract the local acceleration and velocity changes of the trajectory. This trajectory information is particularly important in behavioral identification. For example, if a defect exhibits nonlinear boundary jitter over a short period of time, it typically indicates stress anomalies in the surface material, potentially signaling the potential development of deeper cracks. In experimental verification, trajectory maps were constructed for 20 defect points with significant spatial shift trends. Approximately 70% of the trajectory changes corresponded to actual defect expansion behavior, demonstrating the high sensitivity of this step in capturing defect development dynamics. The defect boundary shift rate is an important indicator of the degree of change in the defect point's geometric contour over time. This metric is expressed by calculating the Euclidean distance between the center of the defect area outline in each frame and the center of the initial frame (reference frame), normalized to the average drift rate per time unit. The calculation process first extracts the defect edge in each frame (using Canny + morphological closing), then calculates the coordinates of the contour's center of mass. The distance between the center of mass points of all frames and the center of mass of the initial frame is compared to produce a drift rate sequence. This sequence reflects the degree of continuity of the defect boundary "drift." Visualizing this sequence as a line graph constructs a defect drift rate curve. This curve can be used to determine whether the defect is stable or an artifact caused by occasional lighting disturbances.When the deflection rate shows a significant upward trend (>1.5 pixels / frame) over multiple consecutive frames, the defect can be judged to be physically extensible. If the deflection rate stabilizes over time, it may be an inherent static defect. In experimental testing, 50 defect samples were analyzed, and the average difference in the slope of the deflection rate curve between real defects and pseudo-defects exceeded 38%, demonstrating the strong discriminative power of this indicator in defect identification.
[0038] The numerical characteristics of the curve (such as slope changes, local extrema, and stability segments) are used to perform a confidence rollback on previously identified defects. Specifically, if a defect has a high identification confidence level (e.g., >85%) during the static analysis phase, but its offset curve exhibits high-frequency, large oscillations (standard deviation σ > 2.0 pixels), the identification confidence level is rolled back to an adjusted value (e.g., to 65%), and a regional recalibration command is issued. This regional recalibration reconstructs the segmented region based on the original defect center and re-extracts texture and edges to avoid false identifications caused by illumination interference and texture drift. This feedback mechanism can significantly reduce the rate of false defect markings in practical applications. In recognition tests on 100 PCB samples, the false alarm rate dropped from 14.2% to 5.7% after implementing the confidence rollback mechanism, demonstrating its practical significance in improving recognition accuracy. Finally, after completing the defect dynamic behavior trajectory analysis and confidence callback mechanism, it is necessary to integrate all static and dynamic features to construct a post-optimization model for more accurate and reliable defect identification and classification. The core concept of this model is to establish a multi-feature joint decision framework by fusing the static comprehensive evaluation vector with dynamic positioning and calibration feedback information. This optimization model adopts a decision-level fusion strategy, where static features (texture, edges, and color) are provided by the aforementioned comprehensive evaluation vector, and dynamic features (drift rate, confidence fluctuation) are provided by the trajectory monitoring and calibration module. A joint model based on logistic regression (Logistic Regression) or graph neural network (GNN) is used to achieve weighted correction and final judgment of the defect identification results. In system experiments, after deploying this intelligent optimization model, the overall recognition accuracy increased to 96.8%, with a re-inspection correction rate of 21.3%, effectively achieving the model's fault tolerance and refined defect annotation goals.
[0039] In this embodiment, a PCB board defect detection system based on image recognition is provided, which is used to execute the above-mentioned PCB board defect detection method based on image recognition, including: The pixel registration module is used to collect multi-directional PCB inspection images, perform pixel-level registration correction and adaptive pixel stability compensation, and construct a spatiotemporal stable compensation image sequence; The reverse pyramid partitioning module is used to perform reverse pyramid structure partitioning on the spatiotemporal stability compensation image sequence, perform normalized similarity probability calculation, and construct the initial region classification result; The pseudo-defect removal module is used to perform deep image visual analysis based on the initial region classification results, and to perform comprehensive pseudo-defect removal optimization to construct a pseudo-defect-purified high-confidence image; The defect point distribution module is used to identify PCB board connection defects in the pseudo-defect cleansed high-confidence image, mark the global defect point distribution, and construct a defect point spatial distribution map; The defect analysis module is used to perform threshold segmentation of each defect point area based on the defect point spatial distribution map, and perform deep semantic analysis of the defects to obtain a comprehensive evaluation vector of the defect points; The post-optimization module is used to perform defect recognition confidence callback and regional calibration based on the spatiotemporal stable compensation image sequence, and to perform post-optimization of defect detection in combination with the comprehensive evaluation vector of the defect point to build an intelligent defect detection optimization model.
[0040] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.
[0041] The foregoing description is intended only to provide specific embodiments of the present invention, which are intended to enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest manner consistent with the principles and novel features disclosed herein.
Claims
1. A PCB board defect detection method based on image recognition, characterized in that: The following steps are involved: Step S1: Collect multi-directional PCB inspection images, perform pixel-level registration correction and adaptive pixel stability compensation, and construct a spatiotemporal stability compensation image sequence; Step S2: Perform reverse pyramid structure division on the spatiotemporal stability compensation image sequence, and perform normalized similarity probability calculation to construct the initial region classification result; Step S3: Perform deep image visual analysis based on the initial region classification results, and perform comprehensive pseudo-defect elimination optimization to construct a pseudo-defect cleansed high-confidence image; Step S4: Identify PCB board connection defects on the pseudo-defect cleansed high-confidence image, mark the global defect point distribution, and construct a defect point spatial distribution map; Step S5: Based on the defect point spatial distribution map, perform threshold segmentation of each defect point area, and perform defect depth semantic analysis to obtain a comprehensive evaluation vector of the defect point; Step S6: Defect recognition confidence callback and regional calibration are performed based on the spatiotemporal stable compensation image sequence, and defect detection post-optimization is performed in combination with the comprehensive evaluation vector of the defect point to build an intelligent defect detection optimization model.
2. The PCB defect detection method based on image recognition according to claim 1, characterized in that: The specific steps of step S1 are: Based on the high-definition camera, small angle adjustments are made to continuously collect multi-directional PCB inspection images and construct a multi-angle perturbation imaging sequence of the PCB board; Calculating pixel points of each image on the multi-angle perturbation imaging sequence of the PCB board, and performing pixel-level registration correction to generate a pixel position aligned image sequence; Calculating pixel grayscale values at different angles of the pixel position aligned image sequence to obtain pixel variance coefficients; Performing threshold segmentation processing on the pixel variance coefficient to identify stable areas and unstable areas of the optical pixels; Adaptive pixel stability compensation is performed on the stable and unstable areas of optical pixels to construct a spatiotemporal stability compensated image sequence.
3. The PCB defect detection method based on image recognition according to claim 1, characterized in that: The specific steps of step S2 are: Divide the image sequence into equal-sized areas based on the temporal and spatial stability compensation image sequence to construct the PCB board area image sequence; Based on the time-space stable compensation image sequence, reverse pyramid structure division is performed to build a multi-scale hierarchical analysis framework; Extract the maximum scale image based on the multi-scale hierarchical analysis framework; Calculating the grayscale distribution, texture features, and edge information of the maximum-scale image to obtain basic features of the maximum-confidence image; Performing normalized similarity probability calculation on each region of the PCB sub-region image sequence based on the maximum confidence image basic features to identify normalized inspection-exempt sub-regions and abnormal inspection-exempt sub-regions; Normal area probability distribution fitting is performed on the normalized inspection-exempt sub-areas and abnormal inspection-exempt sub-areas, and spatial cluster analysis is performed to construct the initial area classification results.
4. The PCB defect detection method based on image recognition according to claim 1, characterized in that: The specific steps of step S3 are: Based on the initial region classification results, the abnormal inspection-exempt sub-regions are identified and marked as potential defect region images; Perform deep image visual analysis on images of potential defect areas to extract information about the microscopic roughness distribution characteristics, substrate texture directionality, and surface reflectivity non-uniformity on the PCB surface. Performing multi-scale Gaussian filtering on the micro-roughness distribution characteristics to obtain surface texture features of different scales; According to the surface texture characteristics, the substrate texture directionality and surface reflectivity non-uniformity information are optimized for comprehensive pseudo-defect elimination to construct a pseudo-defect purified high-confidence image.
5. The PCB defect detection method based on image recognition according to claim 4, characterized in that: The specific steps of comprehensively eliminating and optimizing the pseudo-defects based on the substrate texture directionality and surface reflectivity non-uniformity information according to the surface texture characteristics to construct a pseudo-defect cleaned high-confidence image are as follows: Perform inherent texture interference analysis based on substrate texture directionality to identify inherent texture pseudo-defect areas; performing anisotropic diffusion filtering on the intrinsic texture pseudo-defect region based on the surface texture features to obtain an intrinsic texture defect optimized region; Performing texture noise suppression processing on the inherent texture defect optimization area to generate a texture suppression optimization area; performing abnormal light spot disturbance analysis based on the surface reflectivity non-uniformity information and marking the light spot disturbance pseudo-defect area; Perform uniform illumination compensation on the pseudo-defect area caused by the light spot disturbance and construct an illumination compensation area; Comprehensive pseudo-defect elimination optimization is performed on the texture suppression optimization area and the illumination compensation area, and super-resolution reconstruction is performed based on the normalized inspection-exempt sub-area to construct a pseudo-defect purification high-confidence image.
6. The PCB defect detection method based on image recognition according to claim 1, characterized in that: The specific steps of step S4 are: Identify PCB board connection defects on pseudo-defect-purified high-confidence images and mark multiple connection defect points; Perform graph neural reasoning on multiple connection defect points to identify the spatial continuity and physical rationality of the connection defect points; Predicting fracture structures based on the spatial continuity and physical rationality, and identifying potential fracture structure points; Accurately locate potential fracture structure points in space, mark the global defect point distribution, and construct a defect point spatial distribution map.
7. The PCB defect detection method based on image recognition according to claim 1, characterized in that: The specific steps of step S5 are: Defining a defect point segmentation region threshold; performing defect point region threshold segmentation on the spatiotemporal stability compensation image sequence one by one based on the defect point segmentation region threshold and the defect point spatial distribution map, and extracting the image threshold segmentation frame of each defect point; Extracting texture gradient vectors, color statistical parameters and edge morphology sequences based on the image threshold segmentation frame; Perform multi-dimensional defect behavior modeling based on the texture gradient vector, color statistical parameters, and edge morphology sequence to construct a behavior model for each defect point; Performing deep semantic analysis of defects on the behavior model to obtain defect semantic types and defect behavior stages; A comprehensive defect feature evaluation is performed based on the defect semantic type and defect behavior stage to obtain a comprehensive evaluation vector of the defect point.
8. The PCB defect detection method based on image recognition according to claim 1, characterized in that: The specific steps of step S6 are: Based on the time-space stable compensation image sequence, the time stamp is arranged in time sequence, and the defect area positioning trajectory is monitored to generate a time series coordinate sequence for each defect point; Positioning and tracking defect behaviors at different time points on the time series coordinate sequence to generate a defect behavior trajectory map; Calculating the defect boundary deviation rate on the defect behavior trajectory map to obtain a defect deviation rate curve; Performing defect recognition confidence callback and regional calibration on the defect offset rate curve to obtain defect location calibration feedback information; Post-defect detection optimization is performed based on the comprehensive evaluation vector of defect points and the defect positioning calibration feedback information, and an intelligent defect detection optimization model is constructed.
9. A PCB board defect detection system based on image recognition, characterized in that: The method for detecting PCB defects based on image recognition according to claim 1 comprises: The pixel registration module is used to collect multi-directional PCB inspection images, perform pixel-level registration correction and adaptive pixel stability compensation, and construct a spatiotemporal stable compensation image sequence; The reverse pyramid partitioning module is used to perform reverse pyramid structure partitioning on the spatiotemporal stability compensation image sequence, perform normalized similarity probability calculation, and construct the initial region classification result; The pseudo-defect removal module is used to perform deep image visual analysis based on the initial region classification results, and to perform comprehensive pseudo-defect removal optimization to construct a pseudo-defect-purified high-confidence image; The defect point distribution module is used to identify PCB board connection defects in the pseudo-defect cleansed high-confidence image, mark the global defect point distribution, and construct a defect point spatial distribution map; The defect analysis module is used to perform threshold segmentation of each defect point area based on the defect point spatial distribution map, and perform deep semantic analysis of the defects to obtain a comprehensive evaluation vector of the defect points; The post-optimization module is used to perform defect recognition confidence callback and regional calibration based on the spatiotemporal stable compensation image sequence, and to perform post-optimization of defect detection in combination with the comprehensive evaluation vector of the defect point to build an intelligent defect detection optimization model.
Citation Information
Cited By
Tire tread production control method based on image recognition
CN120894374A
Safety shoe quality detection method based on artificial intelligence visual inspection
CN120894639A
Air conditioning unit fault monitoring method and system based on multi-modal data fusion
CN121089191A
Communication chip layout defect automatic identification method based on artificial intelligence
CN121120610A
An artificial intelligence-based communication chip layout defect automatic identification method
CN121120610B