Brushless fan controller PCB appearance defect detection method based on machine vision

CN122199420BActive Publication Date: 2026-09-11CHENGYUAN ELECTRONICS (WUHU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610247604.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-02
Publication Date
2026-09-11
Estimated Expiration
2046-03-02

AI Technical Summary

Technical Problem

[0005]为了解决现有技术中因高光溢出导致法向量解算失真,产生检测伪影,进而降低了无刷风机控制器PCB板外观缺陷检测的准确率的问题,本发明提出基于机器视觉的无刷风机控制器PCB板外观缺陷检测方法,该方法包括以下步骤:

Benefits of technology

(1)针对传统光度立体视觉算法基于朗伯体漫反射模型,在功率器件镜面反射区域因高光溢出导致法向量解算失真、三维重建出现伪影,无法区分光学伪影与真实物理缺陷的问题,本发明从时间维度分析像素在不同光照角度下的光照响应分布,计算光照响应离群度精准量化单一光源对像素的高光溢出程度;同时从空间维度结合像素邻域信息计算结构熵,表征局部边缘分布均匀性以区分高光伪影的孤立边缘与真实缺陷的特征边缘;基于双维度特征生成自适应光照置信度权重,对高光溢出的低置信度像素赋予低权重,弱化其在法向量解算中的影响,对正常漫反射的高置信度像素赋予高权重,保留其真实表面特征,有效消除焊点、散热片处的虚假尖峰、凹陷伪影,实现光学伪影与真实缺陷的更准确地区分。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199420B_ABST
    Figure CN122199420B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image data processing, more particularly, the present application relates to a brushless fan controller PCB appearance defect detection method based on machine vision, comprising: acquiring gray scale images of the PCB under different illumination angles through a multi-angle light source acquisition system, analyzing the illumination response outlier of the pixel points to evaluate the highlight overflow degree, combining the structural entropy to represent the uniformity of the neighborhood edge distribution, generating an adaptive illumination confidence weight, solving the photometric stereo equation to obtain a surface normal vector map, and extracting geometric features to determine the appearance defects. The present application can accurately identify the mirror reflection area, effectively distinguish the real geometric features from the optical artifacts, thereby improving the three-dimensional reconstruction accuracy and further improving the accuracy of the brushless fan controller PCB appearance defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology. More specifically, this invention relates to a machine vision-based method for detecting appearance defects on the PCB board of a brushless fan controller. Background Technology

[0002] As the core component of the fan system, the brushless fan controller integrates a large number of power driving devices, such as MOSFETs, IGBTs and related driving circuits, on its PCB board. During the PCB board production process, it is necessary to strictly inspect the pin soldering quality of the power devices, such as cold solder joints and bridging, as well as the physical morphology of the heat dissipation surface, such as scratches, dents, and foreign objects.

[0003] The current mainstream detection method is to use the photometric stereo algorithm, which recovers the normal vector of the object surface by the changes in the brightness of the image under multi-angle lighting, and then reconstructs the three-dimensional shape to identify defects.

[0004] However, traditional photometric stereo vision algorithms are usually based on the Lambertian diffuse reflection model, assuming that the surface of an object reflects light uniformly in all directions. In reality, the solder joints of power device pins and the surface of metal heat sinks on brushless fan controllers have extremely strong non-Lambertian specular reflection characteristics. When a light source at a certain angle illuminates these smooth curved surfaces, the industrial camera will capture the pixel-saturated highlight overflow area. In the highlight overflow area, the linear relationship between light intensity and surface normal fails, causing the normal vector calculated by the traditional photometric stereo vision algorithm to deviate. The reconstructed 3D model will have false peaks or depressions at the solder joints. Thus, the calculation distortion caused by highlight overflow makes it difficult for traditional photometric stereo vision algorithms to distinguish between real physical defects and optical artifacts, reducing the accuracy of appearance defect detection on the PCB board of brushless fan controllers. Summary of the Invention

[0005] To address the problem in existing technologies where specular clipping leads to distortion in normal vector calculations, resulting in detection artifacts and consequently reducing the accuracy of surface defect detection on brushless fan controller PCB boards, this invention proposes a machine vision-based method for surface defect detection on brushless fan controller PCB boards. This method includes the following steps: Multiple original grayscale images of the PCB board under inspection are acquired using a multi-angle light source acquisition system under different illumination angles. For each pixel in the original grayscale images, the illumination response distribution of that pixel in the time dimension is analyzed, and the illumination response outlier is calculated. The illumination response outlier is used to characterize the degree of highlight overflow caused by a single light source to the current pixel. Combining the spatial neighborhood information of the original grayscale images, the distribution characteristics of the local brightness gradient are analyzed, and the structural entropy is calculated. The structural entropy is used to characterize the uniformity of the edge distribution within the neighborhood. Based on the illumination response outlier and the structural entropy, an adaptive illumination confidence weight is generated. The photometric solid equation is solved using the adaptive illumination confidence weight to obtain the surface normal vector map of the PCB board under inspection. Geometric features are extracted based on the surface normal vector map, and the presence of appearance defects on the PCB board is determined based on the geometric features.

[0006] This invention assesses the degree of specular overflow by calculating the outlier of the illumination response, more accurately identifying pixel saturation regions caused by specular reflection, and providing a reliable basis for subsequent weight generation. By calculating structural entropy, it analyzes the local brightness gradient distribution, more accurately reflecting the uniformity of edge distribution within the neighborhood, and providing a reliable spatial feature basis for distinguishing between real geometric features and optical artifacts. By generating adaptive illumination confidence weights, it improves upon the traditional photometric solid equation, dynamically adjusting based on illumination response characteristics and structural features, effectively reducing the impact of specular overflow regions on normal vector calculation. Based on the surface normal vector map obtained through weighted solution, it enhances the accuracy of 3D reconstruction, effectively distinguishes between real physical defects and optical artifacts, and improves the accuracy of detecting appearance defects on the PCB board of brushless fan controllers.

[0007] Furthermore, the outlier of the illumination response satisfies: In the formula, For pixels In the Outliers in the illumination response of the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. The total number of elements in the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. For pixels The mean of gray values ​​in all original grayscale images. To prevent hyperparameters with a denominator of 0.

[0008] This invention achieves a scientific assessment of the outlier of illumination response by constructing a function that includes the ratio of the square of the gray value to the variance. It accurately assesses the prominence of the response intensity of a pixel relative to the background fluctuation under a single light source. When the numerator gray value is high and the denominator variance is small, it indicates that the pixel has a significant highlight response under a specific light source, thus effectively identifying pixel saturation areas caused by specular reflection.

[0009] Furthermore, the structural entropy satisfies: In the formula, For pixels structural entropy, For pixels The preset neighborhood window, For pixels The maximum value among the gradient magnitudes of all original grayscale images. For pixels The sum of the maximum gradient magnitudes of all pixels within a preset neighborhood window in all the original grayscale images. To prevent hyperparameters with a denominator of 0, It is the natural logarithm function.

[0010] This invention achieves a scientific assessment of structural entropy by constructing a negative entropy function that includes the probability distribution of gradient magnitudes. It more accurately reflects the uniformity of edge distribution within the neighborhood. When gradient energy is concentrated in a few pixels, the entropy value is low, and when gradient energy is evenly distributed, the entropy value is high. This effectively distinguishes the complexity of local structural features and provides a reliable spatial distribution basis for distinguishing between real geometric features and optical artifacts.

[0011] Furthermore, the adaptive illumination confidence weights satisfy: In the formula, For pixels In the Adaptive illumination confidence weights for the original grayscale image. For pixels In the Outliers in the illumination response of the original grayscale image. For pixels structural entropy, It is a natural exponential function.

[0012] This invention achieves a scientific evaluation of adaptive illumination confidence weights by constructing a fractional function that includes illumination response outlier and structural entropy exponent terms. This ensures that when the illumination response outlier is high or the structural entropy is low, the weight is small, indicating that the pixel may have highlight overflow or false edges. Conversely, the weight is large, indicating that the illumination response of the pixel has high confidence. This effectively balances the influence of optical and structural characteristics on confidence.

[0013] Further, obtaining the surface normal vector map of the PCB board to be inspected includes: solving for the unit normal vector by minimizing a weighted objective function, wherein the objective function is: In the formula, For pixels Surface normal vector, Let be the unit normal vector to be solved. The total number of elements in the original grayscale image. For pixels In the Adaptive illumination confidence weights for the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. For the first The original grayscale image corresponds to the direction vector of the light source. To minimize the value of the independent variable in the objective function, This is the dot product symbol.

[0014] This invention achieves accurate solution of surface normal vectors by constructing a weighted least squares objective function that includes adaptive illumination confidence weights. This ensures that the impact of low-confidence illumination conditions on normal vector solution is reduced, while the contribution of high-confidence illumination conditions to normal vector solution is enhanced. The weighting mechanism effectively suppresses the solution deviation in the specular overflow region, thereby improving the accuracy and reliability of the surface normal vector map.

[0015] Furthermore, the step of extracting geometric features based on the surface normal map and determining whether the PCB board has appearance defects based on the geometric features includes: using template matching technology to segment the surface normal map into solder joint areas and heat dissipation surface areas; for the solder joint areas, calculating the average surface curvature, and if the average surface curvature exceeds a preset range, it is determined to be a solder filling defect; for the heat dissipation surface areas, calculating the Gaussian curvature, and if a local Gaussian curvature abrupt change is detected, it is determined to be a physical morphology defect.

[0016] Furthermore, the gradient magnitude is obtained using the Sobel operator.

[0017] Furthermore, it also includes: calibrating the acquisition system to obtain the direction vector, wherein the calibration process uses Zhang's calibration method for calculation.

[0018] Furthermore, the acquisition system includes an industrial camera with a fixed viewing angle and multiple LED light sources distributed in a ring.

[0019] Furthermore, the acquisition process of the acquisition system includes controlling each LED light source to light up independently in sequence through hardware trigger signals, and simultaneously controlling the industrial camera to capture images.

[0020] The present invention has the following beneficial effects: (1) In view of the problem that traditional photometric stereo vision algorithms based on the Lambertian diffuse reflection model cause distortion in normal vector calculation and artifacts in 3D reconstruction due to high light overflow in the specular reflection area of ​​power devices, and cannot distinguish between optical artifacts and real physical defects, this invention analyzes the light response distribution of pixels under different illumination angles from the time dimension, calculates the light response outlier degree to accurately quantify the degree of high light overflow of pixels by a single light source; at the same time, it calculates the structural entropy from the spatial dimension combined with the pixel neighborhood information to characterize the uniformity of local edge distribution to distinguish the isolated edges of high light artifacts from the feature edges of real defects; based on the dual-dimensional features, it generates adaptive illumination confidence weights, assigns low weights to low-confidence pixels with high light overflow to weaken their influence in normal vector calculation, and assigns high weights to high-confidence pixels with normal diffuse reflection to retain their real surface features, effectively eliminating false peaks and depression artifacts at solder joints and heat sinks, and achieving a more accurate distinction between optical artifacts and real defects.

[0021] (2) Breaking through the limitations of the traditional photometric stereo vision algorithm in solving the photometric stereo equation with equal weights, an adaptive illumination confidence weight is introduced to realize the weighted solution of the equation, making the normal vector solution process more in line with the actual surface reflection characteristics of the PCB board of the brushless fan controller. For areas with strong specular reflection such as MOSFET, IGBT pin solder joints, and metal heat sinks, the interference value of high light overflow is weakened by weights to avoid the solution result being misled by saturated high light pixels. For the diffuse reflection surface of the non-metallic area of ​​the PCB board, high weights are retained to ensure the solution accuracy. At the same time, the time dimension analysis of illumination response outlier and the spatial dimension analysis of structural entropy complement each other, so that the weight allocation is both in line with the illumination response characteristics of a single pixel and matches the spatial structural features of the local area. The surface normal vector map obtained by the solution can truly and accurately reflect the three-dimensional morphological features of the PCB board surface, laying a reliable data foundation for the subsequent extraction of defect geometric features.

[0022] (3) Based on the modified high-precision surface normal vector map, geometric features are extracted, which gets rid of the interference of false artifacts on feature extraction in traditional algorithms. It can accurately capture the real three-dimensional shape deviation of the power device pin welding, such as insufficient solder joint height caused by poor soldering, pin shape connection caused by bridging, and physical shape defects of the heat dissipation surface, such as linear depression of scratches, local protrusion of impact damage, and irregular contour of foreign objects. Compared with the traditional method, which misjudges optical artifacts as defects and real defects are covered by artifacts and missed, the present invention can accurately identify and judge various appearance defects such as poor soldering, bridging, scratches, and impact damage, and improve the accuracy of appearance defect detection of brushless fan controller PCB board. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating the steps of the machine vision-based method for detecting appearance defects on the PCB board of a brushless fan controller, according to an embodiment of the present invention.

[0024] Figure 2 This is a schematic diagram of pixel grayscale distribution of the PCB board appearance defect detection method for brushless fan controller based on machine vision according to an embodiment of the present invention.

[0025] Figure 3 This is a schematic diagram showing the relationship between the outlier of the illumination response and the adaptive illumination confidence weight in the machine vision-based PCB board appearance defect detection method for brushless fan controllers according to an embodiment of the present invention.

[0026] Figure 4 This is a schematic diagram of the adaptive illumination confidence weight distribution of the machine vision-based PCB board appearance defect detection method for brushless fan controllers according to an embodiment of the present invention. Detailed Implementation

[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below. The described embodiments are only a part of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0029] Please see Figure 1 The diagram illustrates a flowchart of a machine vision-based method for detecting surface defects on a brushless fan controller PCB board, according to an embodiment of the present invention. The method includes the following steps: S001: Acquire multiple original grayscale images of the PCB board under test under different lighting angles through a multi-angle light source acquisition system.

[0030] Specifically, in this embodiment, the acquisition system includes a fixed-view industrial camera and multiple LED light sources distributed in a ring, denoted as... One, light source configuration: Typical value is taken Six light sources can cover The angular range meets the minimum sampling requirements for photometric stereo reconstruction. Verification using multiple test samples shows that fewer than four light sources cannot solve the algorithm vector, while more than eight light sources significantly increase hardware costs with limited accuracy improvement. Acquisition process: Hardware trigger signals control each LED light source to illuminate independently and sequentially, while simultaneously controlling an industrial camera to capture the source image sequence. Preprocessing is then performed: Gaussian denoising and illumination intensity normalization are applied to the image sequence to obtain the original grayscale image set.

[0031] like Figure 2 As shown, the difference in grayscale distribution between the initial acquired data and the preprocessed data is clearly presented. The grayscale distribution of the initial acquired data is relatively scattered and is significantly affected by noise and uneven illumination. After Gaussian denoising and illumination intensity normalization preprocessing, the pixel grayscale distribution is more concentrated, effectively eliminating redundant interference information and laying a high-quality data foundation for the accurate calculation of illumination response outlier and structural entropy.

[0032] S002: For each pixel in the original grayscale image, analyze the illumination response distribution of the pixel in the time dimension and calculate the illumination response outlier. The illumination response outlier is used to characterize the degree of highlight overflow caused by a single light source to the current pixel.

[0033] It should be noted that the solder joints and metal heat sinks of the brushless fan controller PCB are smooth metal surfaces. Under successive illumination from light sources at different angles, the grayscale value of a single pixel will exhibit sudden high brightness fluctuations, and these fluctuations have no obvious regularity. Directly relying on the raw grayscale data cannot assess the degree of highlight impact of a single light source on the pixel, nor can it accurately pinpoint the specific pixel location of highlight overflow. Therefore, this step analyzes the grayscale response distribution under different illumination angles and constructs an illumination response outlier index to accurately characterize the degree of highlight overflow of pixels under a single light source.

[0034] Specifically, the outlier of the illumination response satisfies: ; In the formula, For pixels In the Outliers in the illumination response of the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. The total number of elements in the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. For pixels The mean of gray values ​​in all original grayscale images. To prevent hyperparameters with a denominator of 0, for example, .

[0035] Among them, the numerator enhances the high-brightness response, while the denominator characterizes the overall fluctuation characteristics. When specular reflection occurs... Significant deviation This leads to a dramatic increase in the numerator and a relatively stable denominator, making It exhibits non-linear growth, accurately capturing the strong directional characteristics of specular reflection and avoiding misjudgment of highlight areas by the traditional standard deviation method.

[0036] S003: Combining the spatial neighborhood information of the original grayscale image, analyze the distribution characteristics of the local brightness gradient and calculate the structural entropy, which is used to characterize the uniformity of the edge distribution within the neighborhood.

[0037] It should be noted that the PCB surface of a brushless fan controller contains different structural areas such as solder joints, pins, heat dissipation surfaces, and substrates. The brightness gradient distribution characteristics of local pixel neighborhoods vary significantly, and highlight overflow can lead to non-uniform accumulation of local gradient energy. Relying solely on the gradient information of a single pixel cannot reflect the true distribution state of the edges within the neighborhood, nor can it distinguish whether gradient anomalies are caused by the surface structure itself or by lighting interference. Therefore, this step combines the spatial neighborhood information of pixels to analyze the overall distribution characteristics of local brightness gradients, evaluates the uniformity of edge distribution within the neighborhood by calculating structural entropy, and establishes the correlation between spatial structural features and the influence of lighting.

[0038] Specifically, the structural entropy satisfies: ; In the formula, For pixels structural entropy, For pixels The preset neighborhood window, in this embodiment preferably Pixel area, window smaller than High sensitivity to noise, greater than It will blur the details of the solder joint edges; For pixels The maximum value among the gradient magnitudes of all original grayscale images, obtained through the Sobel operator; For pixels The sum of the maximum gradient magnitudes of all pixels within a preset neighborhood window in all the original grayscale images. To prevent hyperparameters with a denominator of 0, It is the natural logarithm function.

[0039] The essence of the above relationship is the information entropy of the gradient distribution, through... Construct the probability distribution and calculate When the highlights overflow, the gradient energy is concentrated at a few edges, and the entropy value is significantly reduced. In contrast, the gradient is evenly distributed on the diffuse surface, and the entropy value is higher. This allows the spatial structure features to be associated with the optical properties, thereby improving the recognition accuracy of the highlight area.

[0040] S004: Generate adaptive illumination confidence weights based on the illumination response outlier and the structural entropy.

[0041] It should be noted that the highlight overflow degree and local structural features of different pixels on the PCB surface of the brushless fan controller exhibit dual differences. A single illumination feature or structural feature cannot serve as an effective basis for determining illumination confidence. Relying solely on illumination response outliers easily overlooks the inherent edge features of the structure itself, while relying solely on structural entropy fails to reflect the impact of highlight interference caused by illumination, making it difficult to form an accurate illumination confidence evaluation standard. Therefore, this step integrates the temporal dimension features of illumination response outliers and the spatial dimension features of structural entropy to construct adaptive illumination confidence weights, achieving a comprehensive evaluation of the pixel illumination response confidence.

[0042] Specifically, the adaptive illumination confidence weights satisfy: ; In the formula, For pixels In the Adaptive illumination confidence weights for the original grayscale image. For pixels In the Outliers in the illumination response of the original grayscale image. For pixels structural entropy, It is a natural exponential function.

[0043] The above relationship constructs a correction factor by multiplying the outlier of the illumination response by the negative exponential term of the structural entropy. This adapts to the dual differences in illumination and structure of pixels on the PCB board surface. When a pixel is affected by specular overflow, the outlier of the illumination response is larger. If this is accompanied by local gradient energy accumulation leading to a lower structural entropy, the correction factor will increase non-linearly, and the weight will decrease accordingly. For pixels with normal diffuse reflection, the outlier of the illumination response is small and the structural entropy is high. The correction factor approaches 0 and the weight approaches 1. This allows for dynamic adjustment of the confidence weight of the illumination response based on the actual state of the pixel.

[0044] like Figure 3 As shown, the negative correlation between the outlier degree of the illumination response and the adaptive illumination confidence weight is intuitively presented. When the outlier degree of the illumination response is in the range of 0-1, it indicates that there is no obvious high light spillover, and the adaptive illumination confidence weight remains in the high value range above 0.95. As the outlier degree of the illumination response increases, the adaptive illumination confidence weight decreases non-linearly. When the outlier degree of the illumination response reaches 5, the adaptive illumination confidence weight drops to about 0.85, which clearly reflects the regulatory effect of gradually suppressing the weight of the high light spillover region.

[0045] like Figure 4 As shown in the figure, the number of pixels with weights in the range of 0.95-1.00 is the highest, indicating that most pixels are in a normal diffuse reflection state and the light response is highly reliable. The number of pixels with weights below 0.90 is extremely small, corresponding to the low confidence area of ​​highlight overflow. This verifies the rationality and targeting of the weight allocation and realizes the differentiated confidence assessment of pixels in different states.

[0046] S005: Use the adaptive illumination confidence weight to solve the photometric solid equation in a weighted manner to obtain the surface normal vector map of the PCB board to be tested.

[0047] It should be noted that the conventional solution method for the photometric solid equation does not consider the differences in the reliability of pixel responses under different illuminations. The linear relationship between the grayscale data of pixels with high gloss overflow on the PCB board of the brushless fan controller and the surface normal fails. Furthermore, directly involving distorted data in the equation solution will lead to deviations in the normal vector calculation results, failing to accurately reflect the actual three-dimensional morphological features of the PCB board surface. Therefore, this step incorporates adaptive illumination confidence weights into the solution process of the photometric solid equation, and differentiates the contribution of different pixel grayscale data in the solution through a weighted approach.

[0048] Specifically, obtaining the surface normal vector map of the PCB board to be inspected includes: The unit normal vector is solved by minimizing a weighted objective function, which is: ; In the formula, For pixels Surface normal vector, Let be the unit normal vector to be solved. The total number of elements in the original grayscale image. For pixels In the Adaptive illumination confidence weights for the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. For the first The direction vector of the light source corresponding to the original grayscale image is obtained by calibrating the acquisition system. In this embodiment, the calibration process uses Zhang's calibration method. To minimize the value of the independent variable in the objective function, This is the dot product symbol.

[0049] The above relationship, through the weighted least squares method, allows high-confidence data to contribute more to the normal vector calculation. When the value is close to 0, it indicates that it belongs to highlight data, and the corresponding item is suppressed; when When the value is close to 1, it indicates that the data is valid and its contribution weight is maximized. Singular Value Decomposition (SVD) is used during the solution process to ensure numerical stability, reduce the error in normal vector reconstruction, and effectively eliminate spike artifacts at the solder joints.

[0050] S006: Extract geometric features based on the surface normal vector map, and determine whether the PCB board has appearance defects based on the geometric features.

[0051] It should be noted that the surface morphology and defect types of the solder joint area and the heat dissipation surface area of ​​the brushless fan controller PCB board differ significantly. Defects in the solder joint area mainly manifest as three-dimensional morphological deviations caused by solder fill, while defects in the heat dissipation surface area are mostly local morphological abrupt changes caused by physical forms such as scratches and impact damage. If a uniform geometric feature extraction and defect judgment standard is used, it is impossible to accurately identify the specific defect types of different areas, easily leading to inaccurate feature extraction and defect judgment bias. Therefore, this step first performs targeted region segmentation on the surface normal vector map, then extracts corresponding geometric features based on the characteristics of different areas and sets differentiated defect judgment rules.

[0052] Specifically, the step of extracting geometric features based on the surface normal map and determining whether the PCB board has appearance defects based on the geometric features includes: Using template matching techniques, such as calling OpenCV's matchTemplate function, the surface normal vector map is segmented into solder joint regions and heat dissipation surface regions; For the solder joint area, calculate the average surface curvature. If the average surface curvature exceeds a preset range, obtain the average of the average surface curvatures of multiple good product samples. As a preset range, If the value is less than the standard deviation, it is determined to be a solder filler defect; For the heat dissipation surface area, the Gaussian curvature is calculated. If a sudden change in local Gaussian curvature is detected, it is determined to be a physical morphological defect, such as a scratch or impact damage. Among them, the Gaussian curvature mutation also obtained the mean of the Gaussian curvature of multiple good samples. As a preset range, anything exceeding the above range is judged as a local Gaussian curvature abrupt change.

[0053] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A machine vision-based method for detecting appearance defects on the PCB board of a brushless fan controller, characterized in that, include: A multi-angle light source acquisition system is used to acquire multiple original grayscale images of the PCB board under different lighting angles. For each pixel in the original grayscale image, analyze the illumination response distribution of that pixel in the time dimension and calculate the illumination response outlier. The illumination response outlier is used to characterize the degree to which a single light source causes highlight overflow to the current pixel. By combining the spatial neighborhood information of the original grayscale image, the distribution characteristics of the local brightness gradient are analyzed, and the structural entropy is calculated. The structural entropy is used to characterize the uniformity of the edge distribution within the neighborhood. Based on the outlier degree of the illumination response and the structural entropy, an adaptive illumination confidence weight is generated. The photometric stereo equation is solved by weighted calculation using adaptive illumination confidence weights to obtain the surface normal vector map of the PCB board to be inspected. Geometric features are extracted based on the surface normal vector map, and the presence of appearance defects on the PCB board is determined based on the geometric features. The structural entropy satisfies: ; In the formula, For pixels structural entropy, For pixels The preset neighborhood window, For pixels The maximum value among the gradient magnitudes of all original grayscale images. For pixels The sum of the maximum gradient magnitudes of all pixels within a preset neighborhood window in all the original grayscale images. To prevent hyperparameters with a denominator of 0, It is the natural logarithm function; The adaptive illumination confidence weights satisfy: ; In the formula, For pixels In the Adaptive illumination confidence weights for the original grayscale image. For pixels In the Outliers in the illumination response of the original grayscale image. For pixels structural entropy, It is a natural exponential function.

2. The method for detecting appearance defects on a brushless fan controller PCB board based on machine vision according to claim 1, characterized in that, The outlier of the illumination response satisfies: ; In the formula, For pixels In the Outliers in the illumination response of the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. The total number of elements in the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. For pixels The mean of gray values ​​in all original grayscale images. To prevent hyperparameters with a denominator of 0.

3. The method for detecting appearance defects on a brushless fan controller PCB board based on machine vision according to claim 1, characterized in that, The process of obtaining the surface normal vector map of the PCB board to be inspected includes: The unit normal vector is solved by minimizing a weighted objective function, which is: ; In the formula, For pixels Surface normal vector, Let be the unit normal vector to be solved. The total number of elements in the original grayscale image. For pixels In the Adaptive illumination confidence weights for the original grayscale image. For pixels In the The grayscale values ​​of the original grayscale image. For the first The original grayscale image corresponds to the direction vector of the light source. To minimize the value of the independent variable in the objective function, This is the dot product symbol.

4. The method for detecting appearance defects on a brushless fan controller PCB board based on machine vision according to claim 1, characterized in that, The step of extracting geometric features based on the surface normal map and determining whether the PCB board has appearance defects based on the geometric features includes: The surface normal map is segmented into solder joint region and heat dissipation surface region using template matching technology; For the solder joint area, the average surface curvature is calculated. If the average surface curvature exceeds a preset range, it is determined to be a solder filling defect. For the heat dissipation surface area, the Gaussian curvature is calculated. If a sudden change in local Gaussian curvature is detected, it is determined to be a physical morphological defect.

5. The method for detecting appearance defects on a brushless fan controller PCB board based on machine vision according to claim 1, characterized in that, The gradient magnitude is obtained using the Sobel operator.

6. The method for detecting appearance defects on a brushless fan controller PCB board based on machine vision according to claim 3, characterized in that, Also includes: The acquisition system is calibrated to obtain the direction vector, and the calibration process uses Zhang's calibration method.

7. The method for detecting appearance defects on a brushless fan controller PCB board based on machine vision according to claim 1, characterized in that, The acquisition system includes a fixed-view industrial camera and multiple LED light sources distributed in a ring.

8. The method for detecting appearance defects on a brushless fan controller PCB board based on machine vision according to claim 7, characterized in that, The acquisition process of the acquisition system includes controlling each LED light source to light up independently in sequence through hardware trigger signals, and simultaneously controlling the industrial camera to take pictures.

Citation Information

Patent Citations

  • Method and system for detecting defects of polyethylene plastic hollow plate

    CN120102575A

  • Defect detection method and device, equipment and storage medium

    CN120259258A