Method and system for detecting defects of power module components in harsh environment

CN122391221BActive Publication Date: 2026-09-15XIAN LINGJIAN ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610841759.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-09-15
Estimated Expiration
2046-06-11

AI Technical Summary

Technical Problem

[0004]本发明的目的在于解决现有技术中在处理电源模块元器件图像时会过度增强图像原有边缘、削弱非边缘区域增强效果,无法精准识别恶劣环境下电源模块元器件微小裂纹、隐蔽腐蚀等缺陷的问题,提供一种恶劣环境下电源模块元器件缺陷检测方法及系统

Benefits of technology

[0048] This invention acquires images of power module components and performs grayscale preprocessing. It then uses the Laplacian algorithm to obtain initial sharpening values, constructs pixel neighborhoods to acquire gradient data, calculates edge gradient indices, and further delineates a larger area to calculate high gradient aggregation indices. Based on these indices, the Laplacian sharpening values ​​are adaptively adjusted to achieve precise image sharpening enhancement. This avoids the problem of traditional Laplacian sharpening over-enhancing the inherent edges of components, weakens the sharpness of existing edges, and improves the detail enhancement effect in non-edge areas. It effectively highlights the minute defect features of power module components under harsh environments, improving the reliability of defect identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391221B_ABST
    Figure CN122391221B_ABST
Patent Text Reader

Abstract

The application discloses a kind of power module component defect detection method and system under harsh environment, comprising: by collecting power module component image and completing gray scale preprocessing, and using Laplace algorithm to obtain initial sharpening value, by constructing pixel neighborhood to obtain gradient data and calculate edge gradient index, then demarcate greater area range to calculate high gradient aggregation degree index, determine the edge degree index of pixel point, according to the index self-adapting adjustment Laplace sharpening value, realize accurate sharpening enhancement of image, avoid the problem of traditional Laplace sharpening excessive strengthening inherent edge of component, weaken the sharpening degree of original edge, improve the detail enhancement effect of non-edge area, can effectively highlight the tiny defect features of power module component under harsh environment, improve defect recognition reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology and relates to a method and system for detecting defects in power module components under harsh environments. Background Technology

[0002] With the rapid development of new energy vehicles, industrial automation, 5G communications, and medical equipment, power modules, as core power conversion components, are facing increasingly complex application scenarios and must withstand severe challenges from harsh environments such as high temperature, high humidity, vibration, and salt spray for extended periods. Power module failures often stem from component defects caused by stress in these harsh environments. Typical defects include solder joint cracking, insulation failure, and metal corrosion. These defects can not only lead to equipment downtime but also potentially cause serious safety accidents, thus creating an urgent need for defect detection in power module components.

[0003] In current industry practice, traditional defect detection methods mainly rely on manual visual inspection and single electrical tests. However, these methods have significant limitations: manual visual inspection is inefficient and greatly affected by subjective factors, making it difficult to accurately identify complex defects such as micro-cracks or hidden corrosion; single electrical tests cannot directly capture physical defects on the surface and inside of components, resulting in a high overall missed detection rate, which is no longer sufficient to meet the industry's requirements for the accuracy and efficiency of defect detection. Against this backdrop, non-contact defect detection systems based on image processing, environmental stress simulation, and multiphysics analysis have become an industry necessity, urgently requiring a defect detection method for power module components that is adaptable to harsh environments. In the image processing stage of defect detection, image sharpening is a key step in improving the clarity of defect recognition, and the commonly used technique is the Laplacian sharpening algorithm. However, existing Laplacian sharpening technology has obvious shortcomings: the edges of components that are present in the image of power module components are over-enhanced during the sharpening process, causing the sharpening effect of edge areas to dominate, while the sharpening effect of other non-edge areas that may have defects is weakened, resulting in poor enhancement effect of the entire image, which in turn affects the accuracy of subsequent defect detection and cannot effectively support the identification of small and hidden defects. Summary of the Invention

[0004] The purpose of this invention is to solve the problem that in the prior art, when processing images of power module components, the original edges of the image are over-enhanced and the enhancement effect of non-edge areas is weakened, making it impossible to accurately identify defects such as micro-cracks and hidden corrosion of power module components in harsh environments. This invention provides a method and system for detecting defects in power module components in harsh environments.

[0005] To achieve the above objectives, the present invention employs the following technical solution:

[0006] Methods for detecting defects in power module components under harsh environments include:

[0007] Acquire images of the power module components and preprocess the acquired images.

[0008] The preprocessed image is processed based on the Laplacian algorithm to obtain the initial Laplacian sharpening value of all pixels;

[0009] Select any pixel in the preprocessed image, construct a neighborhood region centered on that pixel, and obtain the gradient data of the neighboring pixels within the neighborhood region;

[0010] Based on the gradient data of the pixel and the gradient data of the neighboring pixels, obtain the edge gradient index of the pixel;

[0011] The region centered on the pixel is delineated again, and the high gradient aggregation index of the pixel is obtained based on the edge gradient index of the pixel and the edge gradient data of the neighboring pixels in the region.

[0012] The edge intensity index of a pixel is obtained based on its edge gradient index and high gradient aggregation index.

[0013] The initial Laplacian sharpening value is adjusted based on the edge severity index of the pixel to obtain the adjusted Laplacian sharpening value.

[0014] Image sharpening and enhancement are performed based on the adjusted Laplacian sharpening value to obtain component defects in the image.

[0015] A further improvement of the present invention is that:

[0016] Furthermore, the process of acquiring component images of the power module and preprocessing the acquired component images specifically involves: acquiring component images of the power module, converting the acquired images to grayscale, and obtaining grayscale images of the power module components.

[0017] Furthermore, the gradient data of the neighboring pixels within the neighborhood region includes: the gradient data of the first pixel in the preprocessed image. Construct with each pixel as the center The size of the neighborhood region, and the first in the neighborhood region The gray values ​​of the neighboring pixels are denoted as follows: The Sobel gradient value is denoted as And the gradient direction is denoted as .

[0018] Furthermore, the step of obtaining the edge gradient exponent of the pixel based on the gradient data of the pixel and the gradient data of the neighboring pixels specifically involves:

[0019]

[0020] in, Indicates the first element in the preprocessed image. The edge gradient index of each pixel Indicates the first element in the preprocessed image. Gradient values ​​of each pixel This represents the maximum gradient value of all pixels in the preprocessed image. Indicates the first element in the preprocessed image. Gradient direction of each pixel Indicates the first element in the preprocessed image. The first pixel The gradient direction of each neighboring pixel Indicates the first The maximum absolute value of the gradient direction difference between a pixel and its neighboring pixels. The purpose is to prevent the numerator from being zero; if Less than or equal to 180 degrees, then The value remains unchanged, if If the angle is greater than 180 degrees, then... Replace the value with ;like Less than or equal to 180 degrees, then If the value of remains unchanged, If the angle is greater than 180 degrees, then... Replace the value with ;

[0021] In the formula Partially representing the first The gradient level of the nth pixel, the nth The higher the gradient value of a pixel, the more likely it is to belong to the edge region in the image. Therefore, a larger edge gradient exponent is used to increase the probability of it being an edge. It represents the absolute value of the gradient direction difference between each pixel and its current neighboring pixels, divided by the absolute value of the maximum direction difference between the current pixel and all its neighbors, normalized to between 0 and 1. The difference is 0 when the directions are completely consistent; the proportion of the maximum direction difference is 1. This represents the total difference in gradient directions between the current pixel and all its neighbors; the smaller the summation, the more consistent the gradient directions of the current pixel with those of its neighbors; the formula... The closer the result is to 1, the more consistent the gradient direction of the current pixel with that of its neighboring pixels, and the more likely it is to be part of a continuous edge.

[0022] Furthermore, the process of further defining the region centered on the pixel and obtaining the high gradient clustering index of the pixel based on the edge gradient index of the pixel and the edge gradient data of the neighboring pixels in the region specifically involves:

[0023] For any pixel in the preprocessed image, obtain its surrounding pixels. Other pixels within the region are denoted as neighboring pixels within the region. Based on the edge gradient index of this pixel and the edge gradient data of the neighboring pixels within the region, a high gradient clustering index is obtained for each pixel, specifically:

[0024]

[0025] in, Indicates the first A high gradient clustering index for each pixel. Indicates the first The edge gradient index of each pixel Indicates the first The first pixel The edge gradient index of neighboring pixels within a region This represents the standard deviation of the edge gradient exponent for all pixels in an image. Indicates the first The pixel and its first The Euclidean distance between neighboring pixels within a region. To represent the spatial standard deviation, take the side length of the region. ; This represents the number of all neighboring pixels within the region. This represents the maximum edge gradient exponent across all pixels within the region.

[0026] In the formula Partially representing the first The ratio of the edge gradient exponent of a given pixel to the edge gradient exponent with the largest exponent within the region is used to normalize the gradient intensity. The larger the ratio of the edge gradient exponent of a pixel to the largest edge gradient exponent in the region, the more likely it is to be an edge pixel; in the formula... Partially representing the first The difference between the edge gradient exponent of a pixel and its neighboring pixels within the region; the larger this difference, the smaller the high gradient clustering index. hour, The value is , indicating that the neighboring pixel is related to the first pixel. The gradient difference of the nth pixel is within a reasonable global discrete range. This difference represents normal gradient fluctuations within the edge region, reflecting the gradient difference between neighboring pixels and the nth pixel. Gradient consistency of pixels; when hour, The value is , indicating that the neighboring pixel is related to the first pixel. If the gradient difference of a single pixel exceeds the reasonable global dispersion range, it indicates that the neighboring pixel is likely a noise point, an isolated pixel, or a pixel in a region unrelated to the edge. Therefore, the difference value is forcibly constrained to the standard deviation. The smaller the difference, the closer the result of this part is to 0, indicating a stronger consistency of the edge gradient.

[0027] In the formula Partially represents the Euclidean distance weights of neighboring pixels within the region; The smaller, The closer the value is to 1, the better for the th... The determination of whether a pixel is in a high gradient clustering region has the greatest impact;

[0028] The closer the difference is to 1, the better the difference is between the neighboring pixel and the first pixel. The consistent gradients and close proximity of individual pixels greatly contribute to the high gradient aggregation of the central pixel.

[0029] The closer the difference is to 0, the better the difference is between the neighboring pixel and the first pixel. If the gradient difference between individual pixels is large or the distance between them is far, it cannot be proven that the central pixel is in a clustered area, and its contribution is minimal.

[0030] If the first If a pixel is surrounded by a large number of neighboring pixels with similar gradients and close proximity, and their contribution values ​​are all close to 1, the summation result will be significantly overestimated. It will also be on the larger side, indicating that the first The nth pixel is the core pixel of a continuous edge; if the nth pixel is the core pixel of a continuous edge; The pixels surrounding a given pixel are mostly neighboring pixels with large gradient differences and large distances, resulting in a lower contribution value and a smaller summation result. It will also be on the smaller side, indicating that the first Each pixel is an isolated pixel.

[0031] Furthermore, the step of obtaining the edge degree index of a pixel based on its edge gradient index and high gradient aggregation degree index specifically involves:

[0032] For any pixel If its marginal gradient exponent If the edge gradient index of a given pixel is among the top U% of all pixels in the preprocessed image, then the pixel with the largest value will be considered the first pixel. The nth pixel is denoted as a suspected edge pixel; the high gradient aggregation index of the suspected edge pixel is denoted as its edge index, i.e., the nth pixel. Edge index of each pixel The value is If the first If the number of pixels is not ranked in the top U%, then the number of pixels... Edge index of each pixel The edge degree index of non-potential edge pixels is recorded as 0.

[0033] Furthermore, the adjustment of the initial Laplacian sharpening value based on the edge severity index of the pixel to obtain the adjusted Laplacian sharpening value is specifically as follows:

[0034] For any given pixel, adjust its initial Laplacian sharpening value based on its edge sharpness index:

[0035]

[0036] in, This indicates the adjusted Laplacian sharpening value. Indicates the first The edge severity index of each pixel Indicates the first The initial Laplacian sharpening value for each pixel.

[0037] Furthermore, the step of enhancing the image sharpness based on the adjusted Laplacian sharpening value to obtain component defects in the image specifically involves: enhancing the image according to the adjusted Laplacian sharpening value, which weakens the sharpness of the original edges in the image and enhances the sharpness of other non-edge pixels; and performing defect detection from the grayscale image to obtain component defects in the image.

[0038] A defect detection system for power module components under harsh environments, including:

[0039] The preprocessing module acquires images of the components of the power module and performs preprocessing on the acquired images.

[0040] The sharpening module processes the preprocessed image based on the Laplacian algorithm to obtain the initial Laplacian sharpening values ​​for all pixels.

[0041] The first acquisition module selects any pixel in the preprocessed image, constructs a neighborhood region centered on that pixel, and acquires the gradient data of the neighboring pixels within the neighborhood region.

[0042] The second acquisition module acquires the edge gradient index of the pixel based on the gradient data of the pixel and the gradient data of the neighboring pixels.

[0043] The third acquisition module further delineates the region centered on the pixel and, based on the edge gradient index of the pixel and the edge gradient data of the neighboring pixels in the region, acquires the high gradient aggregation index of the pixel.

[0044] The fourth acquisition module obtains the edge degree index of the pixel based on the edge gradient index and the high gradient aggregation degree index of the pixel.

[0045] An adjustment module adjusts the initial Laplacian sharpening value based on the edge severity index of the pixel to obtain the adjusted Laplacian sharpening value.

[0046] The sharpening enhancement module performs image sharpening enhancement based on the adjusted Laplacian sharpening value to obtain component defects in the image.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] This invention acquires images of power module components and performs grayscale preprocessing. It then uses the Laplacian algorithm to obtain initial sharpening values, constructs pixel neighborhoods to acquire gradient data, calculates edge gradient indices, and further delineates a larger area to calculate high gradient aggregation indices. Based on these indices, the Laplacian sharpening values ​​are adaptively adjusted to achieve precise image sharpening enhancement. This avoids the problem of traditional Laplacian sharpening over-enhancing the inherent edges of components, weakens the sharpness of existing edges, and improves the detail enhancement effect in non-edge areas. It effectively highlights the minute defect features of power module components under harsh environments, improving the reliability of defect identification. Attached Figure Description

[0049] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a flowchart illustrating the method for detecting defects in power module components under harsh environments according to the present invention.

[0051] Figure 2 This is a schematic diagram of the structure of the power module component defect detection system under harsh environments according to the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0053] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0054] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0055] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper," "lower," "horizontal," or "inner" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, terms such as "first" and "second" are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0056] Furthermore, the use of the term "horizontal" does not imply that the component must be absolutely horizontal, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0057] In the description of the embodiments of the present invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.

[0058] The present invention will now be described in further detail with reference to the accompanying drawings:

[0059] See Figure 1 This invention discloses a method for detecting defects in power module components under harsh environments, including:

[0060] S101: Acquire images of the components of the power module and preprocess the acquired component images.

[0061] Images of power module components are acquired, and the acquired images are converted to grayscale to obtain grayscale images of the power module components.

[0062] S102, Process the preprocessed image based on the Laplacian algorithm to obtain the initial Laplacian sharpening value of all pixels;

[0063] The initial Laplacian sharpening value of each pixel in a grayscale image is calculated based on the Laplacian sharpening algorithm, and then adjusted. It should be noted that for each pixel in the grayscale image, its sharpening value is directly obtained through the Laplacian sharpening algorithm for image enhancement. Specifically, the initial sharpening value of each pixel in the image is obtained according to the Laplacian sharpening algorithm, and the initial Laplacian sharpening value of each pixel is adjusted. The sharpening value of each pixel is denoted as .

[0064] It should be noted that the initial sharpening value of the Laplacian sharpening algorithm involved in this scheme is calculated based on the initial Laplacian convolution kernel. In the field of image processing, the conventional initial value of this convolution kernel is... This matrix is ​​the standard initial convolution kernel for the Laplacian sharpening algorithm, which is a default configuration known to those skilled in the art.

[0065] S103, Select any pixel in the preprocessed image, construct a neighborhood region centered on that pixel, and obtain the gradient data of the neighboring pixels within the neighborhood region;

[0066] For all pixels in the image, the edge strength is calculated based on their gradients. For pixels more likely to be edges, their Laplacian sharpening values ​​are reduced to a greater extent to achieve more accurate Laplacian sharpening. It should be noted that for any pixel in the image, the determination of the original edge of the image based on its gradient is mainly based on the magnitude of the pixel's gradient and its consistency with the gradient direction of surrounding pixels to determine the edge probability.

[0067] The first image in the preprocessed image Construct with each pixel as the center The size of the neighborhood region, and the first in the neighborhood region The gray values ​​of the neighboring pixels are denoted as follows: The Sobel gradient value is denoted as And the gradient direction is denoted as Obtain the Sobel gradient values ​​of all pixels in the grayscale image, and then... The Sobel gradient value of each pixel is denoted as . Let its gradient direction be denoted as .

[0068] It should be noted that the gradient direction calculation in this invention uses the atan2 function to calculate the gradient angle in the range of -180 degrees to 180 degrees. The calculated gradient angle is then converted to 0-360 degrees for subsequent calculations. The method of calculating the gradient direction is a conventional processing method for those skilled in the art.

[0069] S104, Based on the gradient data of the pixel and the gradient data of the neighboring pixels, obtain the edge gradient index of the pixel;

[0070]

[0071] in, Indicates the first element in the preprocessed image. The edge gradient index of each pixel Indicates the first element in the preprocessed image. Gradient values ​​of each pixel This represents the maximum gradient value of all pixels in the preprocessed image. Indicates the first element in the preprocessed image. Gradient direction of each pixel Indicates the first element in the preprocessed image. The first pixel The gradient direction of each neighboring pixel Indicates the first The maximum absolute value of the gradient direction difference between a pixel and its neighboring pixels. The purpose is to prevent the numerator from being zero; if Less than or equal to 180 degrees, then The value remains unchanged, if If the angle is greater than 180 degrees, then... Replace the value with ;like Less than or equal to 180 degrees, then If the value of remains unchanged, If the angle is greater than 180 degrees, then... Replace the value with ;

[0072] In the formula Partially representing the first The gradient level of the nth pixel, the nth The higher the gradient value of a pixel, the more likely it is to belong to the edge region in the image. Therefore, a larger edge gradient exponent is used to increase the probability of it being an edge. It represents the absolute value of the gradient direction difference between each pixel and its current neighboring pixels, divided by the absolute value of the maximum direction difference between the current pixel and all its neighbors, normalized to between 0 and 1. The difference is 0 when the directions are completely consistent; the proportion of the maximum direction difference is 1. This represents the total difference in gradient directions between the current pixel and all its neighbors; the smaller the summation, the more consistent the gradient directions of the current pixel with those of its neighbors; the formula... The closer the result is to 1, the more consistent the gradient direction of the current pixel with that of its neighboring pixels, and the more likely it is to be part of a continuous edge; (Judgment) and The setting of whether the angle is greater than 180 degrees is for the purpose of analyzing whether the gradient directions are similar.

[0073] The size of the neighborhood region is the smallest range within which directional information can be detected. It is computationally efficient and suitable for processing each pixel. This size can effectively capture local gradient direction changes while preserving defect details, avoiding the smoothing of tiny defect edges by an excessively large neighborhood. It is only applicable when all pixels in the captured image have the same grayscale value. When the value is 0, the image has no texture features and is not an electronic component image, so it is not considered. Similarly, it cannot be 0; adding 1 to the numerator is to avoid... 0 and 1 represent the smallest grayscale unit value.

[0074] S105, again delineate the area centered on the pixel, and obtain the high gradient aggregation index of the pixel based on the edge gradient index of the pixel and the edge gradient data of the neighboring pixels in the area.

[0075] For any pixel in the preprocessed image, obtain its surrounding pixels. Other pixels within the region are denoted as neighboring pixels within the region. Based on the edge gradient index of this pixel and the edge gradient data of the neighboring pixels within the region, a high gradient clustering index is obtained for each pixel, specifically:

[0076]

[0077] in, Indicates the first A high gradient clustering index for each pixel. Indicates the first The edge gradient index of each pixel Indicates the first The first pixel The edge gradient index of neighboring pixels within a region This represents the standard deviation of the edge gradient exponent for all pixels in an image. Indicates the first The pixel and its first The Euclidean distance between neighboring pixels within a region. To represent the spatial standard deviation, take the side length of the region. , , represents the number of all neighboring pixels within the region; This represents the maximum edge gradient exponent across all pixels within the region.

[0078] In the formula Partially representing the first The ratio of the edge gradient exponent of a given pixel to the edge gradient exponent with the largest exponent within the region is used to normalize the gradient intensity. The larger the ratio of the edge gradient exponent of a pixel to the largest edge gradient exponent in the region, the more likely it is to be an edge pixel; in the formula... Partially representing the first The difference between the edge gradient exponent of a pixel and its neighboring pixels within the region; the larger this difference, the smaller the high gradient clustering index. hour, The value is , indicating that the neighboring pixel is related to the first pixel. The gradient difference of the nth pixel is within a reasonable global discrete range. This difference represents normal gradient fluctuations within the edge region, reflecting the gradient difference between neighboring pixels and the nth pixel. Gradient consistency of pixels; when hour, The value is , indicating that the neighboring pixel is related to the first pixel. If the gradient difference of a single pixel exceeds the reasonable global dispersion range, it indicates that the neighboring pixel is likely a noise point, an isolated pixel, or a pixel in a region unrelated to the edge. Therefore, the difference value is forcibly constrained to the standard deviation. The smaller the difference, the closer the result of this part is to 0, indicating a stronger consistency of the edge gradient; dividing by K is for normalization to avoid subsequent negative enhancement.

[0079] In the formula Partially represents the Euclidean distance weights of neighboring pixels within the region; The smaller, The closer the value is to 1, the better for the th... The determination of whether a pixel is in a high gradient clustering region has the greatest impact;

[0080] The closer the difference is to 1, the better the difference is between the neighboring pixel and the first pixel. The consistent gradients and close proximity of individual pixels greatly contribute to the high gradient aggregation of the central pixel.

[0081] The closer the difference is to 0, the better the difference is between the neighboring pixel and the first pixel. If the gradient difference between individual pixels is large or the distance between them is far, it cannot be proven that the central pixel is in a clustered area, and its contribution is minimal.

[0082] If the first If a pixel is surrounded by a large number of neighboring pixels with similar gradients and close proximity, and their contribution values ​​are all close to 1, the summation result will be significantly overestimated. It will also be on the larger side, indicating that the first The nth pixel is the core pixel of a continuous edge; if the nth pixel is the core pixel of a continuous edge; The pixels surrounding a given pixel are mostly neighboring pixels with large gradient differences and large distances, resulting in a lower contribution value and a smaller summation result. It will also be on the smaller side, indicating that the first Each pixel is an isolated pixel;

[0083] exist Within the defined area, it is determined whether the current pixel is located in a dense region of continuous edges. Considering that the minimum defect size of power module components is typically at the level of several pixels, such as the length and width of a crack, or corrosion of solder joints, etc. It can capture the clustering characteristics of defect edges while reducing the introduction of background noise. The spatial standard deviation controls the distance decay rate, and taking one-third of the side length of the region ensures that the distance weight is reduced to a certain value at the neighborhood boundary. This is sufficient to distinguish the effects of pixels that are near and those that are far away.

[0084] S106, Based on the edge gradient index and high gradient aggregation index of the pixel, obtain the edge degree index of the pixel;

[0085] For any pixel If its marginal gradient exponent If the edge gradient index of a given pixel is among the top U% of all pixels in the preprocessed image, then the pixel with the largest value will be considered the first pixel. The nth pixel is denoted as a suspected edge pixel; the high gradient aggregation index of the suspected edge pixel is denoted as its edge index, i.e., the nth pixel. Edge index of each pixel The value is If the first If the number of pixels is not ranked in the top U%, then the number of pixels... Edge index of each pixel The edge degree index of non-potential edge pixels is recorded as 0.

[0086] This ratio is based on the assumption of the sparsity of edges in the image. In the image of power module components, the real physical edges, such as pins and package outlines, usually account for 20%–40% of the total number of pixels. In this embodiment, U=30%. In other embodiments, the ratio of the number of real edge pixels can be set by actual measurement of a large number of similar healthy electronic component images.

[0087] S107, Adjust the initial Laplacian sharpening value based on the edge severity index of the pixel, and obtain the adjusted Laplacian sharpening value;

[0088] The image is sharpened and enhanced based on the adjusted Laplacian sharpening value. This adjusted Laplacian sharpening value reduces the sharpening of existing edges in the image, preventing over-sharpening due to edge gradients. It should be noted that for any given pixel, the higher its edge sharpness index, the more likely it is to be considered an existing edge in the image, and the lower the degree of Laplacian sharpening should be applied. For any given pixel, the initial Laplacian sharpening value is adjusted based on its edge sharpness index:

[0089]

[0090] in, This indicates the adjusted Laplacian sharpening value. Indicates the first The edge severity index of each pixel Indicates the first The initial Laplacian sharpening value for each pixel.

[0091] S108 performs image sharpening enhancement based on the adjusted Laplacian sharpening value to obtain component defects in the image.

[0092] The image is enhanced by adjusting the Laplacian sharpening value. The adjusted Laplacian sharpening value weakens the sharpness of the original edges in the image and improves the sharpness of other non-edge pixels. Defect detection is performed on the grayscale image to obtain component defects in the image.

[0093] The detection of component defects in the image includes, but is not limited to, template matching, neural networks, etc. Those skilled in the art can choose for themselves. This process is a well-known technology and will not be described in detail in this embodiment.

[0094] See Figure 2 This invention discloses a defect detection system for power module components under harsh environments, comprising:

[0095] The preprocessing module acquires images of the components of the power module and performs preprocessing on the acquired images.

[0096] The sharpening module processes the preprocessed image based on the Laplacian algorithm to obtain the initial Laplacian sharpening values ​​for all pixels.

[0097] The first acquisition module selects any pixel in the preprocessed image, constructs a neighborhood region centered on that pixel, and acquires the gradient data of the neighboring pixels within the neighborhood region.

[0098] The second acquisition module acquires the edge gradient index of the pixel based on the gradient data of the pixel and the gradient data of the neighboring pixels.

[0099] The third acquisition module further delineates the region centered on the pixel and, based on the edge gradient index of the pixel and the edge gradient data of the neighboring pixels in the region, acquires the high gradient aggregation index of the pixel.

[0100] The fourth acquisition module obtains the edge degree index of the pixel based on the edge gradient index and the high gradient aggregation degree index of the pixel.

[0101] An adjustment module adjusts the initial Laplacian sharpening value based on the edge severity index of the pixel to obtain the adjusted Laplacian sharpening value.

[0102] The sharpening enhancement module performs image sharpening enhancement based on the adjusted Laplacian sharpening value to obtain component defects in the image.

[0103] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting defects in power module components under harsh environments, characterized in that, include: Acquire images of the power module components and preprocess the acquired images. The preprocessed image is processed based on the Laplacian algorithm to obtain the initial Laplacian sharpening value of all pixels; Select any pixel in the preprocessed image, construct a neighborhood region centered on that pixel, and obtain the gradient data of the neighboring pixels within the neighborhood region; Based on the gradient data of the pixel and the gradient data of the neighboring pixels, obtain the edge gradient index of the pixel; The edge gradient index of the pixel is obtained based on the gradient data of the pixel and the gradient data of the neighboring pixels, specifically as follows: in, Indicates the first element in the preprocessed image. The edge gradient index of each pixel Indicates the first element in the preprocessed image. Gradient values ​​of each pixel This represents the maximum gradient value of all pixels in the preprocessed image. Indicates the first element in the preprocessed image. Gradient direction of each pixel Indicates the first element in the preprocessed image. The first pixel The gradient direction of each neighboring pixel Indicates the first The maximum absolute value of the gradient direction difference between a pixel and its neighboring pixels. The purpose is to prevent the numerator from being zero; if Less than or equal to 180 degrees, then The value remains unchanged, if If the angle is greater than 180 degrees, then... Replace the value with ;like Less than or equal to 180 degrees, then If the value of remains unchanged, If the angle is greater than 180 degrees, then... Replace the value with ; The region centered on the pixel is delineated again, and the high gradient aggregation index of the pixel is obtained based on the edge gradient index of the pixel and the edge gradient data of the neighboring pixels in the region. The process involves further defining the region centered on the pixel, and obtaining the high gradient clustering index of the pixel based on the edge gradient index of the pixel and the edge gradient data of the neighboring pixels within the region. Specifically: For any pixel in the preprocessed image, obtain its surrounding pixels. Other pixels within the region are denoted as neighboring pixels within the region. Based on the edge gradient index of this pixel and the edge gradient data of the neighboring pixels within the region, a high gradient clustering index is obtained for each pixel, specifically: in, Indicates the first The high gradient clustering index of individual pixels Indicates the first The edge gradient index of each pixel Indicates the first The first pixel The edge gradient index of neighboring pixels within a region This represents the standard deviation of the edge gradient exponent for all pixels in an image. Indicates the first The pixel and its first The Euclidean distance between neighboring pixels within a region. To represent the spatial standard deviation, take the side length of the region. ; This represents the number of all neighboring pixels within the region. This represents the maximum edge gradient exponent across all pixels within the region. The edge intensity index of a pixel is obtained based on its edge gradient index and high gradient aggregation index. The edge intensity index of a pixel is obtained based on its edge gradient index and high gradient aggregation index, specifically as follows: For any pixel If its marginal gradient exponent If the edge gradient index of a given pixel is among the top U% of all pixels in the preprocessed image, then the pixel with the largest value will be considered the first pixel. The nth pixel is denoted as a suspected edge pixel; the high gradient aggregation index of the suspected edge pixel is denoted as its edge index, i.e., the nth pixel. Edge index of each pixel The value is If the first If the pixel is not ranked in the top U%, then the... Edge index of each pixel The edge degree index of non-suspected edge pixels is recorded as 0. The initial Laplacian sharpening value is adjusted based on the edge severity index of the pixel to obtain the adjusted Laplacian sharpening value. The initial Laplacian sharpening value is adjusted based on the edge severity index of the pixel to obtain the adjusted Laplacian sharpening value, specifically as follows: For any given pixel, adjust its initial Laplacian sharpening value based on its edge sharpness index: in, This indicates the adjusted Laplacian sharpening value. Indicates the first The edge severity index of each pixel Indicates the first Initial Laplacian sharpening value for each pixel; Image sharpening and enhancement are performed based on the adjusted Laplacian sharpening value to obtain component defects in the image.

2. The method for detecting defects in power module components under harsh environments according to claim 1, characterized in that, The process of acquiring images of the power module components and preprocessing the acquired images involves: acquiring images of the power module components, converting the acquired images to grayscale, and obtaining grayscale images of the power module components.

3. The method for detecting defects in power module components under harsh environments according to claim 1, characterized in that, The gradient data of the neighboring pixels within the neighborhood region includes: the gradient data of the first pixel in the preprocessed image. Construct with each pixel as the center The size of the neighborhood region, and the first in the neighborhood region The Sobel gradient value of each neighboring pixel is denoted as . And the gradient direction is denoted as .

4. The method for detecting defects in power module components under harsh environments according to claim 1, characterized in that, The method of image sharpening enhancement based on the adjusted Laplacian sharpening value to obtain component defects in the image specifically involves: enhancing the preprocessed image according to the adjusted Laplacian sharpening value, and using the enhanced image for defect detection to obtain component defects.

5. A defect detection system for power module components under harsh environments, characterized in that, When the power module component defect detection system in the harsh environment is executed, it implements the steps of the power module component defect detection method in the harsh environment as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Consistency-based edge detection method

    CN104268872A

  • Drill rod image acquisition method for explosion-proof drilling

    CN118521795A