Intelligent vision-based non-destructive testing method and system for defects in powder metallurgy parts

By constructing a defect response weight that combines texture direction deviation and morphological compactness, the problem of distinguishing between normal flow marks and micro-cracks on the surface of powder metallurgy parts is solved, achieving higher detection accuracy.

CN123052015APending Publication Date: 2026-11-06ZHEJIANG HENGJI YONGXIN NEW MATERIALS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611552623.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately distinguish between normal sintering flow marks, natural micropores, and microcracks on the surface of powder metallurgy parts, leading to problems of missed or incorrect identification.

Method used

By constructing defect response weights and combining texture direction deviation and morphological compactness, directional enhancement templates are fused to process the image, enhancing the edge features of micro-cracks and suppressing the interference of normal flow marks.

Benefits of technology

It can effectively distinguish between normal flow marks and micro-cracks on the surface of powder metallurgy parts, reduce missed and false identifications, and improve detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123052015A_ABST
    Figure CN123052015A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, in particular to a powder metallurgy part defect nondestructive detection method and system based on intelligent vision. The method comprises the following steps: acquiring an initial image of light intensity distribution on a surface of a powder metallurgy part; for any pixel point in the initial image, a defect response weight is constructed; the initial image is processed in combination with the defect response weight of each pixel point and a preset direction enhancement template, and a defect boundary is defined according to image data after processing, so that a detection output result is obtained. The application can improve the surface detection accuracy of the powder metallurgy part and reduce the defect omission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method and system for non-destructive testing of defects in powder metallurgy parts based on intelligent vision. Background Technology

[0002] Powder metallurgy parts are formed through processes such as powder pressing and sintering. During the forming process, sintering flow marks related to material flow and pressing direction typically form on their surface. Additionally, due to the gaps between powder particles and the influence of the forming process, natural micropores may also exist on the surface. When powder metallurgy parts are subjected to forming stress or stress during subsequent use, micro-cracks may also occur in localized areas. These different surface characteristics may all manifest as localized grayscale changes during actual inspection; therefore, it is necessary to process the surface images of powder metallurgy parts to identify the true defects.

[0003] Currently, surface defect detection of powder metallurgy parts can be achieved using machine vision-based image detection methods. This involves acquiring images of the powder metallurgy part's surface and using image features such as grayscale, edges, and textures to identify abnormal areas. For example, existing image detection methods typically extract candidate defect regions based on abrupt changes in grayscale or edge variations in the image, and then determine the defect region through threshold segmentation, edge detection, or feature classification.

[0004] However, for powder metallurgy parts, normal sintering flow marks, natural micropores, and microcracks can all form obvious grayscale or edge variations, making the above-mentioned different surface features highly similar in image features. It is difficult to accurately distinguish normal sintering flow marks, natural micropores, and microcracks based solely on the degree of grayscale variation or a single edge feature. As a result, normal sintering flow marks or natural micropores are easily identified as defects, or microcracks are missed due to interference from normal textures and micropores, leading to unidentified issues. Summary of the Invention

[0005] To reduce the problem of missed detection during the inspection of surface defects in powder metallurgy parts, this application provides a non-destructive testing method and system for powder metallurgy parts based on intelligent vision.

[0006] Firstly, this application provides a non-destructive testing method for defects in powder metallurgy parts based on intelligent vision, employing the following technical solution: A non-destructive testing method for defects in powder metallurgy parts based on intelligent vision includes: acquiring an initial image of the light intensity distribution on the surface of the powder metallurgy part; For any pixel in the initial image, construct the defect response weights; The initial image is processed by combining the defect response weights of each pixel with a preset direction enhancement template, and the defect boundaries are defined based on the processed image data to obtain the detection output result. The construction of defect response weights includes: A texture direction deviation is constructed to characterize the degree of anomalousness of a pixel deviating from the normal texture, and a shape compactness is constructed to characterize the degree of geometric closure of a local gray-level concave region; the texture direction deviation and the shape compactness are fused to obtain the defect response weight of each pixel; The texture direction deviation is determined based on the degree of gray-level change within a local window, the degree of gray-level change at the global maximum, the main local texture direction, and the main process direction preset by powder metallurgy. The greater the drastic change in grayscale within the local window, the greater the deviation of the texture direction; the greater the angle difference between the main direction of the local texture and the main direction of the process, the greater the deviation of the texture direction.

[0007] Since normal sintering flow marks typically have a texture direction consistent with the main direction of powder metallurgy processes, while the texture direction of microcracks tends to deviate from this main direction, and natural micropores usually appear as relatively closed and regular gray-level depressions, this method constructs texture direction deviation and morphological compactness for each pixel. The texture direction deviation, which characterizes the degree of drastic local gray-level changes and the degree of texture direction abnormality, is fused with the morphological compactness, which characterizes the geometric closure of gray-level depressions, to form a defect response weight for each pixel. This defect response weight, combined with a preset direction enhancement template, is then used to process the initial image, enabling differentiated processing based on defect characteristics at different pixel locations. By simultaneously considering both direction deviation and local morphological features, the interference of normal flow marks and natural micropores on defect identification can be reduced, and the response can be improved for areas with abnormal directions and non-closed morphological features. This allows microcracks to be more fully characterized in the processed image, reducing the missed identification of microcracks caused by interference from normal textures and micropores. For regions with drastic grayscale changes and texture directions significantly deviating from the main process direction, the texture direction deviation is correspondingly increased; for texture regions aligned with normal flow mark directions, the abnormal response can be reduced. Therefore, while preserving the abrupt grayscale changes characteristic of microcracks, the interference of normal sintering flow marks on defect identification can be reduced, making microcracks with abnormal direction characteristics more likely to enter the subsequent defect enhancement process, thus solving the problem of similar grayscale changes between normal flow marks and microcracks.

[0008] Optionally, an initial image of the surface intensity distribution of the powder metallurgy part is acquired, including: The original light intensity distribution data of the powder metallurgy part surface is collected; the original light intensity distribution data is processed by the local background difference algorithm to achieve light uniformity and obtain balanced light intensity distribution data. The uniform light intensity distribution data is spatially smoothed and denoised, and the processed data is mapped to the effective detection area to obtain the initial image.

[0009] The local background difference algorithm is used to perform illumination homogenization processing, and further spatial smoothing and noise reduction and effective detection area mapping are performed. This enables the obtained initial image to reduce non-defect grayscale changes caused by the reflective characteristics of the metal surface of powder metallurgy parts, local illumination unevenness and random pixel fluctuations of the sensor, while eliminating background signal interference outside the effective detection area.

[0010] Optionally, the degree of grayscale change within the local window is calculated using a spatial differential operator, and the principal direction of the local texture is obtained using a structural tensor analysis algorithm.

[0011] Optionally, the process of constructing the morphological compactness includes: Pixels in the initial image whose grayscale value is less than the set grayscale depression extraction threshold are marked as depression pixels; Cluster the concave pixels to generate multiple concave connected regions, and extract the concave connected regions that satisfy a preset area threshold as effective concave regions. Based on the actual pixel area and edge perimeter of the effective recessed region, the regional shape compactness of the effective recessed region is calculated, and the regional shape compactness is assigned to the corresponding pixel point to obtain the shape compactness of each pixel point; the regional shape compactness is positively correlated with the actual pixel area and negatively correlated with the edge perimeter.

[0012] Pixels in the initial image data that are below the grayscale depression extraction threshold are marked as depression pixels, and these depression pixels are clustered to form depression connected regions. Then, the region shape compactness is calculated based on the actual pixel area and edge perimeter of the effective depression region, so that local grayscale depressions are no longer judged solely by grayscale size, but can be further distinguished by their two-dimensional spatial shape.

[0013] Natural micropores typically form relatively closed and regular concave structures, while microcracks usually exhibit slender, branching, or irregularly extending forms. Therefore, although both may produce gray-scale concavities, the area of ​​the corresponding region and the perimeter of the edge are different, resulting in different regional morphological compactness.

[0014] Optionally, the step of obtaining the set gray-level concavity extraction threshold includes: introducing a dark area deviation coefficient to modulate the global gray-level standard deviation of the initial image; subtracting the modulated global gray-level standard deviation from the global gray-level mean of the initial image to determine the gray-level concavity extraction threshold.

[0015] The basic gray-level depression extraction threshold is determined using the global gray-level mean and global gray-level standard deviation of the initial image data. Furthermore, a dark area deviation coefficient is introduced to modulate the global gray-level standard deviation, allowing the gray-level depression extraction threshold to be determined in conjunction with the overall gray-level distribution of the current image, rather than using a fixed gray-level threshold. This enables the adjustment of the depression extraction conditions based on the overall gray-level variations of different powder metallurgy part surface images, preventing excessively bright or dark overall gray-level changes from directly altering the depression judgment result. This reduces the likelihood of normal dark textures being incorrectly extracted or shallow cracks being missed.

[0016] Optionally, the defect response weight of each pixel is obtained by fusing the texture direction deviation and the shape compactness, including: The form openness is calculated based on the form compactness, wherein the greater the form compactness, the smaller the form openness; The product of the texture direction deviation and the shape openness is used as the defect response weight.

[0017] When a region has high morphological compactness, its morphological openness decreases, thereby suppressing the defect response in that region; conversely, when a region has low morphological compactness and high texture orientation deviation, its defect response weight increases. Thus, by utilizing the combined effects of directional and morphological features, normal flow marks and natural micropores can be further distinguished from microcracks with abnormal orientations and elongated shapes, reducing misidentification.

[0018] Optionally, the construction process of the preset orientation enhancement template includes: Recursive calculations are performed based on preset edge enhancement order parameters to obtain the recursive weights for each order. Based on the offset of each local coordinate within the preset local calculation window size, the weight value of the corresponding position is determined from the recursive weights of each order to construct the edge highlighting calculation matrix. The local coordinates are rotated so that the rotated coordinate axes are parallel to the flow mark direction. Based on the spatial aspect ratio and Gaussian distribution standard deviation, a direction-selective Gaussian template is constructed as the direction enhancement template, which is combined with the edge prominence calculation matrix.

[0019] On the one hand, the local edge changes corresponding to microcracks are enhanced by edge highlighting calculation matrix. On the other hand, the continuous texture of normal flow marks can be suppressed by direction-selective Gaussian distribution corresponding to the main process direction of powder metallurgy, thereby avoiding the synchronous enhancement of normal sintering flow marks and improving the image feature difference between microcracks and normal flow marks.

[0020] Optionally, the initial image is processed by combining the defect response weights of each pixel with a preset orientation enhancement template, including: using the defect response weights as weight allocation coefficients, performing weighted fusion calculations on the original pixel values ​​of the initial image at the corresponding pixel points and the convolution calculation results of the orientation enhancement template to obtain processed image data.

[0021] Secondly, this application provides a non-destructive testing system for defects in powder metallurgy parts based on intelligent vision, employing the following technical solution: The intelligent vision-based non-destructive testing system for powder metallurgy defects includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the aforementioned intelligent vision-based non-destructive testing method for powder metallurgy defects.

[0022] The above-mentioned non-destructive testing method for powder metallurgy defects based on intelligent vision is generated into a computer program and stored in a memory so that it can be loaded and executed by a processor. Thus, a system can be made based on the memory and processor for easy use.

[0023] This application has the following technical advantages: By using the degree of texture orientation anomaly and the morphological features of gray-level concave regions as two complementary defect discrimination criteria, a pixel-level defect response weight is constructed. This weight is then used to spatially modulate orientation-selective edge enhancement, enabling the detection process to employ different image processing methods for different surface features. This solves the problem of normal sintering flow marks, natural micropores, and microcracks on powder metallurgy parts easily being confused in terms of gray-level or edge features, leading to the missed identification of microcracks. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the non-destructive testing method for defects in powder metallurgy parts based on intelligent vision, according to an embodiment of this application. Detailed Implementation

[0025] This application discloses a non-destructive testing method for defects in powder metallurgy parts based on intelligent vision. It quantifies the deviation of local texture direction from the main process direction and the geometric closure characteristics of recessed areas. A defect response weight distribution is constructed based on the deviation and closure characteristics. This distribution is used to distinguish between cracks, micropores, and normal flow marks. The defect response weight distribution is introduced as a spatial modulation factor into a mathematical template. This template integrates direction selectivity and edge highlighting characteristics. The system uses this template to activate high-frequency enhancement and directional filtering operations in the crack region, reducing the probability of missed detections.

[0026] Reference Figure 1 The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision includes steps S1-S3.

[0027] S1: Obtain an initial image of the surface light intensity distribution of the powder metallurgy part.

[0028] Specifically, the powder metallurgy parts are in a stable transport state on the production line. The surface light reflection signal of the side (or demolding friction surface) of the powder metallurgy parts is collected by an image capture module deployed above the production line.

[0029] The system converts the surface light reflection signal into raw light intensity distribution data. The raw light intensity distribution data is denoted as... . It is a two-dimensional numerical matrix. Variables Represents the horizontal spatial coordinates of a pixel. Variable This represents the vertical spatial coordinates of a pixel. For example, the raw light intensity distribution data could be a... A two-dimensional matrix. The values ​​in the matrix reflect the physical distribution of light intensity on the surface of the powder metallurgy part. This distribution includes signals from sintering flow marks, natural micropores, flat areas, and microcracks.

[0030] Subsequently, the original light intensity distribution data was processed to homogenize the illumination. The metal surface of powder metallurgy parts has strong reflective properties. This property causes the original light intensity distribution data to exhibit uneven background grayscale. A local background subtraction algorithm was used to process the original light intensity distribution data. The local background subtraction algorithm eliminates low-frequency illumination interference by subtracting the average pixel grayscale value of local areas.

[0031] After differential calculation, the uniform light intensity distribution data is extracted. The uniform light intensity distribution data eliminates illumination offset and reflects the physical morphology of the part surface.

[0032] Subsequently, spatial smoothing and denoising processing is performed on the balanced light intensity distribution data. In this embodiment, a Gaussian smoothing filter algorithm is used to process the balanced light intensity distribution data. The Gaussian smoothing filter algorithm performs a pixel gray-level weighted average operation according to the Gaussian distribution rule.

[0033] Specifically, the Gaussian smoothing filter algorithm performs a weighted average of pixel grayscale values ​​according to the Gaussian distribution rule. The specific processing steps include: for any pixel in the balanced light intensity distribution data, constructing a local calculation window of a set size centered on that pixel; assigning corresponding weight coefficients to each pixel within the local calculation window according to the Gaussian distribution rule, where the closer a pixel is to the center, the larger its weight coefficient, and the farther away, the smaller its weight coefficient; subsequently, multiplying the original grayscale value of each pixel within the local calculation window by its corresponding weight coefficient, and summing and normalizing the product results to calculate the weighted average grayscale value; finally, updating the grayscale data of the center pixel using the weighted average grayscale value. The preferred range for the standard deviation parameter of the Gaussian smoothing filter algorithm is 1.0 to 2.0. This algorithm is a conventional technique in this field and will not be described in detail further.

[0034] The image capture sensor generates random pixel fluctuations during operation, which are suppressed by a Gaussian smoothing filter algorithm. After filtering, the true physical edge features of the surface are preserved, resulting in filtered light intensity distribution data.

[0035] As a preferred approach, the standard deviation parameter of the Gaussian smoothing filter algorithm is preferably in the range of 1.0 to 2.0.

[0036] The effective region is extracted from the filtered light intensity distribution data.

[0037] The filtered light intensity distribution data is uniformly mapped onto the effective detection area of ​​the part. This effective detection area is denoted as... .

[0038] Specifically, the filtered light intensity distribution data is uniformly mapped to the effective detection area of ​​the part. The process is as follows: based on the edge features of the powder metallurgy part, the pixel coordinate range representing the surface of the part is located in the current image matrix and defined as the effective detection area. Extract the effective detection area from the filtered light intensity distribution data. The values ​​within the region are retained, while background data outside the region are uniformly assigned zeros. This eliminates external background interference.

[0039] Light intensity distribution data in the region Signal values ​​other than those specified are set to zero to eliminate external background interference. The system outputs the initial image after region extraction. This initial image is denoted as... .

[0040] S2: For any pixel in the initial image, construct the defect response weights.

[0041] In this embodiment, the defect response weight is obtained by multiplying the texture direction deviation term and the shape openness. The texture direction deviation term characterizes the degree of abnormality of a pixel deviating from the normal texture, while the shape openness term characterizes the geometric openness of a local gray-level concave region.

[0042] Regarding texture orientation deviation: It is understandable that cracks and micropores on the surface of powder metallurgy parts exhibit abrupt changes in grayscale, and it is impossible to distinguish between cracks and micropores based solely on grayscale values.

[0043] However, the grayscale changes in flat areas and normal flow marks are gradual. Furthermore, the direction of normal flow marks in powder metallurgy parts is parallel to the die pressing direction, while the directions of cracks and micropores are either chaotic or perpendicular to the stress direction. Therefore, a texture direction deviation is constructed here. The degree of grayscale change is combined with the texture extension direction to distinguish abnormal features from normal flow marks.

[0044] The formula for calculating texture orientation deviation can be expressed as: ; In this formula, express Texture direction deviation at a location is dimensionless and is used to characterize the degree of abnormality in that location compared to the normal texture. Represented by coordinates The degree of grayscale change within a local window centered on the pixel is calculated using a spatial differential operator, which can be, for example, the Laplacian operator. The Laplacian operator calculates the second derivative of the pixel, which reflects the undulation of the surface texture. In this embodiment, the absolute value or amplitude of the Laplacian operator output is taken as the degree of grayscale change. This represents the most significant change in grayscale across the entire image, serving as a reference value for normalization. Representing coordinates The main direction of the local texture at that location. This indicates the main process direction of powder metallurgy. When metal powder is subjected to force, it is compacted and flows along this vertical direction. At this time, this vertical direction is the main process direction of powder metallurgy. This represents the zero constant, which can be 0.001.

[0045] Specifically, the principal direction of the local texture is obtained through a structural tensor analysis algorithm, the calculation steps of which include: Calculate the partial derivatives in orthogonal directions: Use the spatial differential operator to calculate the first-order partial derivatives of grayscale values ​​of each pixel within the local window in the horizontal and vertical directions.

[0046] Construct the local structure tensor matrix: Calculate the squares of the horizontal partial derivatives, the squares of the vertical partial derivatives, and the product of the horizontal and vertical partial derivatives respectively; then, perform local weighted smoothing summation on the above three sets of calculation results within the local window to construct the second-order structure tensor matrix (i.e., the partial derivative matrix) corresponding to the current pixel.

[0047] Feature decomposition and direction extraction: Perform eigenvalue decomposition on the structure tensor matrix to obtain the corresponding eigenvalues ​​and eigenvectors; extract the eigenvectors corresponding to the smaller eigenvalues, which represent the texture extension direction with the gentlest local gray-level change; calculate the spatial angle between the eigenvector and the reference coordinate axis, and use the angle value as the main direction of the local texture.

[0048] The structural tensor analysis algorithm is a conventional technique in this field, and the specific process will not be described in detail here.

[0049] Increased drastic changes in grayscale within a local window lead to increased deviation of the strained texture direction. Increased angular difference between the principal direction of the local texture and the principal direction of the process results in increased trigonometric function difference terms, ultimately leading to increased deviation of the strained texture direction.

[0050] In real-world scenarios, this reflects that when the surface edge is distinct and its direction deviates significantly from the material flow direction, the abnormal characteristics of the region become more pronounced.

[0051] The system sets the local window size to Pixels. When the window size is too small, it cannot cover the physical width of the micropores on the surface of the powder metallurgy part. When the window size is too large, local edge features are averaged by background pixels. The main process direction is preferentially extracted from the mold design data.

[0052] Regarding the openness of form: It is understandable that the compactness of a region's morphology measures the two-dimensional spatial form of a quantifiable gray-scale concave connected domain. Natural micropores form isotropic closed structures. Microcracks exhibit anisotropic elongated states. The compactness of the region's morphology can distinguish isotropic micropore noise.

[0053] First, calculate the gray-level indentation extraction threshold: ; In the formula, This represents the grayscale concavity extraction threshold. This represents the global grayscale mean of the initial image. This represents the global grayscale standard deviation of the initial image. This represents the deviation coefficient of the dark area.

[0054] An increase in the global grayscale standard deviation or the dark area deviation coefficient leads to a decrease in the grayscale depression extraction threshold of the dependent variable. This reflects a more stringent threshold definition, where only darker areas are extracted.

[0055] In this embodiment, the preferred range for the dark area deviation coefficient is 1.5 to 2.5. The dark area deviation coefficient is set to 2.0. When the dark area deviation coefficient is below 1.5, too many normal dark textures are incorrectly extracted. When the dark area deviation coefficient is above 2.5, some shallow cracks are missed.

[0056] Pixels in the initial image whose grayscale value is less than the grayscale depression extraction threshold are marked as depression pixels.

[0057] The eight-neighbor connectivity rule is used to cluster concave pixels to generate multiple concave connected regions. A minimum effective area threshold is set as follows: A concave connected region with a pixel count greater than or equal to the minimum effective area threshold is defined as an effective concave region.

[0058] For example, the effective recessed region refers to a set of spatially adjacent pixels with extremely low gray levels. In this embodiment, the preferred range for the minimum effective area threshold is 5 square pixels to 20 square pixels. In this embodiment, the minimum effective area threshold is set to 10 square pixels.

[0059] For any effective depression area The compactness of its regional shape is calculated according to the following formula: ; In the formula, Indicates the first The compactness of the regional morphology of an effective concave region characterizes the geometric closure and roundness of the entire connected domain. Indicates the first The actual pixel area of ​​each connected region reflects the coverage of the dark physical topography. Indicates the first The perimeter of the edge of a connected domain reflects the extension length of the physical shape boundary. This represents the minimum zero constant, which can be set to 0.0001.

[0060] An increase in the perimeter of the edge causes a quadratic increase in the denominator. This increase in the denominator leads to a sharp decrease in the compactness of the strain region. This reflects that when the defect region exhibits irregular branching or elongated characteristics, its degree of closure is low, thus clearly distinguishing it from regular circular pores.

[0061] For example, assume a standard micropore feature. The actual pixel area of ​​this micropore is 100, and the perimeter of its edge is 35.45 (close to the circumference of a circle). Assume the constant is 0. Substituting into the formula, the region morphological compactness is calculated to be equal to... The calculated result is close to 1.0. Assume a crack feature exists. Assume the actual pixel area of ​​the crack is 100. Assume the edge perimeter of the crack is 200. Substituting these values ​​into the formula, the region morphology compactness is calculated to be equal to... The calculated result is 0.0314. This verification clearly demonstrates that micropores and cracks produce a significant numerical distinction.

[0062] If coordinates The pixel at that location belongs to the first... If there are valid concave regions, then the region shape compactness corresponding to that pixel is set to the region shape compactness corresponding to that valid concave region. If the coordinates If a pixel does not belong to any valid recessed area, then the morphological compactness of the area corresponding to that pixel is 0.

[0063] Subtracting the regional shape compactness from 1 yields the shape openness.

[0064] Finally, defect response weights are constructed.

[0065] Using texture orientation deviation alone cannot distinguish between cracks with directional deviation features and micropores with complex edges. Using pixel-level morphological compactness alone cannot identify normal flow marks in non-recessed areas.

[0066] The two are fused to eliminate interference from normal textures. For any image point, the defect response weights are calculated: ; In the formula, Representing coordinates The defect response weight at the point represents the confidence level used to modulate the fusion operator. Representing coordinates Texture direction deviation at that location. Representing coordinates The pixel-level compactness of the shape.

[0067] The increased compactness of pixel-level shapes leads to greater openness of shapes. The decrease in morphological openness leads to a decrease in the weight of the dependent variable's defect response.

[0068] In real-world scenarios, this reflects a decrease in the confidence level of a target area as a defect when it exhibits rounded, closed hole characteristics.

[0069] S3: Combine the defect response weights of each pixel with the preset direction enhancement template to process the initial image, and define the defect boundary based on the processed image data to obtain the detection output result.

[0070] This step aims to enhance the edge characteristics of microcracks. This operation also suppresses normal flow marks parallel to the material flow direction.

[0071] The process of constructing a directional enhancement template includes: First, construct the edge highlighting calculation matrix.

[0072] The edge highlighting calculation matrix is ​​generated based on the following recursive formula: ; ; ; In the formula, This represents the initial weight of the zero-order recursion. Indicates the first Order recursive weight, This represents the recursive order variable. This represents the edge enhancement order parameter. and These represent the horizontal and vertical local coordinate variables of the local calculation window, respectively. The local coordinate variables represent the relative pixel offset from the center of the template. and These represent the absolute values ​​of the coordinates. The edge highlighting calculation matrix is ​​used to represent the edge.

[0073] In this embodiment, the edge enhancement order parameter ranges from 0.8 to 1.2, and in this embodiment, the parameter is set to 1.0. It is understood that when the edge enhancement order parameter is less than 0.8, the matrix's response weight to grayscale changes is weak, the high-frequency enhancement is insufficient, resulting in shallow micro-cracks with low contrast not being effectively highlighted. These micro-cracks are easily assimilated by background pixels during subsequent feature fusion, increasing the risk of missed detection.

[0074] When the edge enhancement order parameter is greater than 1.2, the high-frequency features are over-amplified. This not only exacerbates the inherent random pixel fluctuations of the sensor, but also incorrectly enhances the edges of normal natural micropores on the surface of powder metallurgy parts, causing the system to misjudge normal micropore structures as crack defects.

[0075] The radius of the local computation window is K. The unit of the local computation window radius is pixels. Its preferred range is 2 to 4, and it is set to 3 in this embodiment.

[0076] Subsequently, a direction-selective Gaussian template is constructed based on the edge highlighting calculation matrix. Specifically, it is calculated according to the following formula: ; In the formula, This represents a direction-selective Gaussian template, characterizing the comprehensive mathematical weights. and These represent the horizontal and vertical coordinates after coordinate rotation, respectively, and their calculation relationship is as follows: ,as well as Rotation operation makes The axis is parallel to the direction of the flow mark. This indicates the template direction parameter. It indicates the aspect ratio of space. This represents the standard deviation of a Gaussian distribution.

[0077] In this embodiment, the template direction parameter is set to the main process direction, which aligns the filtering characteristics with the flow direction. The preferred spatial aspect ratio is 0.5 to 0.9. In this embodiment, the spatial aspect ratio is set to 0.7. The preferred Gaussian distribution standard deviation is 1.5 to 2.5. In this embodiment, the Gaussian distribution standard deviation is set to 2.0, which is based on the typical scale of micropores in actual detection images.

[0078] because ,exist The exponential decay is slower in the direction (normal flow mark direction), forming a wider, smoother core, thus effectively filtering out parallel flow marks; The exponential decay is faster in the direction (perpendicular to the normal flow mark direction, i.e., the crack propagation direction), forming a narrower retention core, thus highlighting the edge features of microcracks. The directional filtering expression is multiplied element-wise with the aforementioned edge highlighting calculation matrix to ensure that the template can both filter out flow marks and highlight the edge features of microcracks.

[0079] Subsequently, the system performs zero-mean normalization on the direction-selective Gaussian template to eliminate the DC component and output the dynamic range of grayscale.

[0080] The direction-selective Gaussian template after zero-mean normalization is the direction-enhancing template.

[0081] The final output image data is calculated using the following formula: ; ; In the formula, Representing coordinates The final output image data, i.e., grayscale values. This represents the initial image. This represents the defect response weight. This represents the direction-selective Gaussian template after zero-mean normalization, also known as the direction-enhancing template. This indicates the initial retention amount.

[0082] The defect response weight approaches 0, causing the first weight to approach 0. The weights of the second convolution result approach 0. At this point, the final output image data degenerates into the initial image, reflecting that the system actively suppressed the high-frequency edge enhancement in harmless micropores and flat areas, preserving the background pixels intact and avoiding further amplification of noise.

[0083] The defect boundaries are defined in the final output image data to obtain the detection output results.

[0084] Specifically, the final output image data is extracted, its grayscale range is normalized, and then mapped to a preset grayscale range. (Otsu's method, an adaptive thresholding segmentation algorithm for finding the maximum inter-class variance) performs binarization on the final output image data. For example, The algorithm iteratively calculates the variance between the target and background at different grayscale thresholds, selecting the candidate grayscale threshold that maximizes the inter-class variance as the segmentation threshold. Binarization maps highlight regions to white and background regions to black. Highlighted connected components are extracted from the binarized image. The geometric area of ​​each highlighted connected component is calculated and compared with a preset noise area threshold. Residual noise with extremely small areas is removed, and the remaining highlighted connected components are output.

[0085] This application also discloses a non-destructive testing system for powder metallurgy parts based on intelligent vision, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the non-destructive testing method for powder metallurgy parts based on intelligent vision according to this application is implemented.

[0086] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0087] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A non-destructive testing method for defects in powder metallurgy parts based on intelligent vision, characterized in that, include: Acquire an initial image of the surface light intensity distribution of the powder metallurgy part; For any pixel in the initial image, construct the defect response weights; The initial image is processed by combining the defect response weights of each pixel with a preset direction enhancement template, and the defect boundaries are defined based on the processed image data to obtain the detection output result. The construction of defect response weights includes: A texture direction deviation is constructed to characterize the degree of anomalousness of a pixel deviating from the normal texture, and a shape compactness is constructed to characterize the degree of geometric closure of a local gray-level concave region; the texture direction deviation and the shape compactness are fused to obtain the defect response weight of each pixel; The texture direction deviation is determined based on the degree of gray-level change within a local window, the degree of gray-level change at the global maximum, the main local texture direction, and the main process direction preset by powder metallurgy. The greater the drastic change in grayscale within the local window, the greater the deviation of the texture direction; the greater the angle difference between the main direction of the local texture and the main direction of the process, the greater the deviation of the texture direction.

2. The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to claim 1, characterized in that, Acquire an initial image of the surface light intensity distribution of the powder metallurgy part, including: The original light intensity distribution data of the powder metallurgy part surface is collected; the original light intensity distribution data is processed by the local background difference algorithm to achieve light uniformity and obtain balanced light intensity distribution data. The uniform light intensity distribution data is spatially smoothed and denoised, and the processed data is mapped to the effective detection area to obtain the initial image.

3. The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to claim 1, characterized in that, The degree of grayscale change within the local window is calculated using a spatial differential operator, and the main direction of the local texture is obtained using a structural tensor analysis algorithm.

4. The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to claim 1, characterized in that, The process of constructing the aforementioned morphological compactness includes: Pixels in the initial image whose grayscale value is less than the set grayscale depression extraction threshold are marked as depression pixels; Cluster the concave pixels to generate multiple concave connected regions, and extract the concave connected regions that satisfy a preset area threshold as effective concave regions. Based on the actual pixel area and edge perimeter of the effective recessed region, the regional shape compactness of the effective recessed region is calculated, and the regional shape compactness is assigned to the corresponding pixel point to obtain the shape compactness of each pixel point; the regional shape compactness is positively correlated with the actual pixel area and negatively correlated with the edge perimeter.

5. The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to claim 4, characterized in that, The steps for obtaining the set gray-level concavity extraction threshold include: introducing a dark area deviation coefficient to modulate the global gray-level standard deviation of the initial image; and subtracting the modulated global gray-level standard deviation from the global gray-level mean of the initial image to determine the gray-level concavity extraction threshold.

6. The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to any one of claims 2-5, characterized in that, The defect response weights of each pixel are obtained by fusing the texture direction deviation and the shape compactness, including: The form openness is calculated based on the form compactness, wherein the greater the form compactness, the smaller the form openness; The product of the texture direction deviation and the shape openness is used as the defect response weight.

7. The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to claim 1, characterized in that, The construction process of the preset direction enhancement template includes: Recursive calculations are performed based on preset edge enhancement order parameters to obtain the recursive weights for each order. Based on the offset of each local coordinate within the preset local calculation window size, the weight value of the corresponding position is determined from the recursive weights of each order to construct the edge highlighting calculation matrix. The local coordinates are rotated so that the rotated coordinate axes are parallel to the flow mark direction. Based on the spatial aspect ratio and Gaussian distribution standard deviation, a direction-selective Gaussian template is constructed as the direction enhancement template, which is combined with the edge prominence calculation matrix.

8. The non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to claim 7, characterized in that, The initial image is processed by combining the defect response weights of each pixel with a preset orientation enhancement template, including: using the defect response weights as weight allocation coefficients, performing weighted fusion calculations on the original pixel values ​​of the initial image at the corresponding pixel points and the convolution calculation results of the orientation enhancement template to obtain processed image data.

9. A non-destructive testing system for defects in powder metallurgy parts based on intelligent vision, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the non-destructive testing method for defects in powder metallurgy parts based on intelligent vision according to any one of claims 1-8.