Laser powder bed forming defect identification method based on mask segmentation optimization
By adopting a mask segmentation optimization method in laser powder bed technology, combining grayscale symbiosis matrix and Canny edge detection, dynamically adjusting the segmentation threshold of defect areas, solving the shortcomings of LPBF defect identification technology in real time, adaptability and accuracy, achieving high-precision defect identification and classification, and improving the reliability of the manufacturing process and product quality.
Patent Information
- Application Number
- CN202510296896.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Current laser powder bed (LPBF) defect identification technology has shortcomings in real-time, adaptability and accuracy, and it is difficult to meet the needs of high-quality additive manufacturing.
Using a mask segmentation optimization method, texture features are calculated through grayscale symbiosis matrix, edge features are extracted, and combined with region morphology analysis, the segmentation threshold of defect areas is dynamically adjusted to generate defect area masks, and then defect area masks are identified and classified.
The accuracy of identifying different defects is improved, and the defect area is accurately extracted under different processing conditions is achieved, which significantly improves the reliability of the manufacturing process and product quality.
Smart Images

Figure CN120147744A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of laser powder bed technology, and in particular to a method for identifying defects in laser powder bed forming based on mask segmentation optimization. Background Art
[0002] With the development of additive manufacturing technology, the laser powder bed fusion process, as a method for manufacturing metal parts with high precision and high complexity, has been widely used in the fields of aerospace, medical, and automotive. The LPBF process realizes melting and solidification by scanning metal powder layer by layer with a laser beam, and finally forms a complex three-dimensional structure. However, due to the influence of material properties, process parameter control, and environmental factors, various defects are prone to occur during the LPBF process. Defects such as pores, lack of fusion, cracks, and abnormal melt pools will reduce the mechanical properties of the workpiece and even lead to part scrapping. Therefore, how to effectively identify and evaluate the defects in the LPBF process has become a technical problem to be solved urgently in this field.
[0003] Currently, the identification of LPBF defects mainly relies on two methods: offline detection and online monitoring. Offline detection usually includes X-ray tomography, optical microscope analysis, and metallographic detection methods. Although it can provide high-precision defect information, it has limitations such as long detection cycle, high cost, and inability to achieve real-time monitoring, making it difficult to meet the requirements of industrial production. In addition, offline detection is a post-analysis method and cannot dynamically intervene in defects during the manufacturing process, resulting in defect accumulation and affecting the quality of the final part.
[0004] In contrast, online monitoring technology can detect defects early by using high-speed imaging, thermal radiation measurement, or acoustic emission sensors to obtain LPBF process information in real time. However, the existing online monitoring methods still have the following problems: First, the traditional defect identification method based on threshold setting relies on fixed image or signal features and is difficult to adapt to changes in different materials, process parameters, and environmental conditions, resulting in insufficient identification accuracy; Second, the existing defect detection methods based on machine learning or deep learning usually require a large amount of labeled data for training. However, the defect types in the LPBF process are complex, and the cost of data collection and labeling is high, which restricts the generalization ability of the algorithm; Finally, most online monitoring systems can only identify the presence or absence of defects and cannot effectively segment and classify defects, making it difficult to provide fine-grained defect information to support further quality control and optimization.
[0005] In summary, the current LPBF defect identification technology still has many deficiencies in terms of real-time performance, adaptability, and accuracy, and it is difficult to meet the requirements of high-quality additive manufacturing. Therefore, there is an urgent need for a method based on advanced image processing and intelligent analysis technology to achieve high-precision identification, classification, and evaluation of defects in the LPBF process, so as to improve the reliability of the manufacturing process and the quality of products. Summary of the Invention
[0006] An object of the present invention is to propose a method for identifying defects in laser powder bed forming based on mask segmentation optimization. The present invention calculates texture features through a gray-level co-occurrence matrix, extracts edge features through Canny edge detection, and comprehensively judges the type of defects by combining regional morphology analysis, thereby improving the recognition accuracy of different defects.
[0007] A method for identifying defects in laser powder bed forming based on mask segmentation optimization according to an embodiment of the present invention includes the following steps:
[0008] S1. Use an imaging device to collect image data of the forming area in the laser powder bed forming process in real time;
[0009] S2. Remove noise, perform illumination equalization, adjust contrast, and enhance edges on the collected image data to obtain preprocessed image data;
[0010] S3. Extract key features in the image by using a multi-scale feature extraction method based on the preprocessed image data. The key features cover image texture, edge information, and regional shape features;
[0011] S4. Input the preprocessed image data and the key features into a dynamic mask segmentation algorithm optimized based on an adaptive threshold. The dynamic mask segmentation algorithm automatically adjusts the segmentation threshold according to the local features of the defect area in the image and generates a corresponding defect area mask;
[0012] S5. Extract features of the defect area based on the generated defect area mask, and extract geometric features, texture features, and optical features covering the defect area;
[0013] S6. Classify and evaluate the extracted defect area features to determine the type and severity of the defects and form a defect recognition result.
[0014] Optionally, S1 includes the following steps:
[0015] S11. Use an industrial camera or an infrared camera as the imaging device to obtain image data of the forming area in the laser powder bed forming process in real time. The sampling frequency of the imaging device is set to f s , and the sampling frequency depends on the ratio of the laser scanning speed v l to the forming layer thickness h l ;
[0016] S12. Set the optical parameters of the imaging device, including exposure time, gain, and resolution, where the exposure time is adaptively adjusted according to the brightness of the molten pool;
[0017] S13. Multispectral information of the laser powder bed forming area is obtained by using multi-channel spectral imaging technology, including the visible light band and the infrared band. The visible light band is used to capture the surface features of the powder bed, and the infrared band is used to detect the molten pool temperature distribution and abnormal areas;
[0018] S14. During the image acquisition process, synchronous calibration is carried out in combination with the laser scanning trajectory P(x, y, t), and the spatial coordinates (x, y) and time t information of the forming area are recorded;
[0019] S15. An image data buffer pool D is established based on the collected image data c , and a sliding window mechanism is used to dynamically store the image data, and the window size W is set s :
[0020] D c ={I t |t∈[t - W s ,t]}
[0021] where I t is the image data collected at time t, and W s is the sliding window length.
[0022] Optionally, the S2 includes the following steps:
[0023] S21. The collected image data I t is denoised, and the Gaussian filtering method is used to smooth the random noise in the image data to obtain the filtered image data I′ t ;
[0024] S22. The denoised image data I′ t is subjected to illumination equalization processing, and the contrast of the image data is enhanced based on the histogram equalization method:
[0025]
[0026] where L is the gray level of the image data, M×N is the size of the image data, h(i) is the cumulative distribution function at gray level i, the identifiability of the defect area is optimized, and I″ t is the equalized image data;
[0027] S23. The Laplacian enhancement method is used to perform edge enhancement on the equalized image data I″ t , the gradient response of the image data is calculated and enhanced transformation is carried out, and the global contrast C g and local contrast C l (x, y) of the edge-enhanced image data I″′ t are calculated;
[0028] S25. Adjust the adaptive parameters of the image data according to the calculation results. If C g or C l (x,y) is lower than the set threshold T c , then adaptively adjust the illumination equalization parameter L and the edge enhancement coefficient λ until the following conditions are met:
[0029] C g ≥T c , C l (x,y)≥T c ;
[0030] S26. Finally, obtain the preprocessed image data
[0031] Optionally, the S3 includes the following steps:
[0032] S31. Perform multi-scale feature extraction based on the preprocessed image data to construct a multi-scale feature set F that includes image texture, edge information, and regional shape features t :
[0033] F t ={F texture , F edge , F shape};
[0034] Among them, F texture is the image texture feature, F edge is the edge feature, and F shape is the regional shape feature;
[0035] S32. Use the gray-level co-occurrence matrix method to calculate the angular second moment, contrast, correlation, and entropy, and extract the image texture feature F texture :
[0036]
[0037] Among them, P(i,j) is the element value of the gray-level co-occurrence matrix, μ i , μ j and σ i , σ j are the row and column means and standard deviations respectively;
[0038] S33. Use the Canny edge detection method to perform Gaussian smoothing on the image data calculate the gradient magnitude G(x,y) and the direction angle θ(x,y), and calculate the edge feature F edge :
[0039]
[0040] Among them, and respectively represent the gradients of the image data in the x and y directions;
[0041] S34. Calculate the region shape feature F shape , including area A, perimeter P, compactness C, and moment invariant η pq ;
[0042] S35. Construct the final multi-scale feature matrix F t , adopt the weight optimization strategy W f to calculate the contribution degrees of different features in defect recognition, and finally obtain the optimized multi-scale feature matrix:
[0043]
[0044] Among them, W f is the optimized feature weight matrix:
[0045]
[0046] Among them, w k represents the weight factor of different feature categories, and Sim(F k , F ref ) is the similarity function between the extracted feature F k and the reference defect sample feature F ref .
[0047] Optionally, the S4 includes the following steps:
[0048] S41. Define the local energy function E(T) that fuses the image data and multi-scale feature information, which is used to describe the deviation between the preprocessed image data and the local threshold T(x, y), extract the multi-scale feature and the similarity with the preset reference defect feature F ref , as well as the smoothness of the threshold in the spatial domain. The local energy function E(T) is:
[0049]
[0050] Among them, Ω represents the pixel set of the image data , β 1 , β 2 and β 3 are weight coefficients, is the feature vector extracted by at the pixel (x, y), F ref is the preset reference defect feature vector, and ‖·‖ represents the Euclidean norm, is the gradient of the local threshold T(x, y);
[0051] S42. Use the gradient descent method to iteratively optimize the energy function E(T), update the local threshold T(x, y), and obtain the optimal local threshold T * (x, y);
[0052] S43. According to the optimal local threshold T * (x, y), perform preliminary segmentation on the preprocessed image data to generate a preliminary defect region mask M d (x, y), which is defined as follows:
[0053]
[0054] where M d (x, y) = 1 indicates that the pixel point (x, y) belongs to the defect region;
[0055] S44. Perform morphological adaptive correction on the preliminary defect region mask M d (x, y), combine the regional connectivity C conn and the regional shape feature F shape , and use a classification function to determine the defect type, forming the corresponding defect region mask M final .
[0056] Optionally, S42 includes the following steps:
[0057] S421. Calculate the gradient descent direction based on the local energy function E(T), and calculate the partial derivative of the local threshold T(x, y):
[0058]
[0059] where represents the Laplacian smoothing term of the local threshold T(x, y);
[0060] S422. Perform adaptive learning rate optimization in the gradient direction to update the local threshold T(x, y):
[0061]
[0062] where η n is the adaptive learning rate for the nth iteration;
[0063] S423. Use the momentum acceleration mechanism to improve the optimization efficiency of gradient descent, define the momentum term v n and correct the local threshold update method:
[0064]
[0065] T (n+2) (x, y) = T (n+1) (x, y) - v n ;
[0066] Among them, γ is the momentum factor, which controls the contribution degree of historical gradients;
[0067] S424. Set the convergence criterion. If the change of the local threshold meets the following conditions, terminate the iteration to obtain the optimal local threshold T * (x, y):
[0068]
[0069] Among them, Ω is the set of pixels in the image region, ∈ is the preset convergence threshold, which ensures that the local threshold optimization converges to a stable state, and finally obtains the optimized optimal local threshold T * (x, y)
[0070] Optionally, the S45 includes the following steps:
[0071] S451. Perform morphological adaptive correction on the preliminary defect connected region mask M d (x, y). For each connected region calculate its area A i and perimeter P i , and define the connectivity index C conn (R i ):
[0072]
[0073] S452. Calculate the compactness C i of the connected region R i :
[0074]
[0075] S453. Extract the shape feature vector F shape (R i ) and introduce the preset reference defect shape feature vector F ref-shape . Use cosine similarity to quantify the shape similarity of the connected region:
[0076]
[0077] Among them, "·" represents vector dot product, and ‖·‖ represents the Euclidean norm;
[0078] S454. Construct the classification score S(R i ):
[0079]
[0080] Among them, ω 1 、ω 2 and ω 3 are weight factors, T c is the connectivity threshold, used to measure the ratio of the connected region to the largest connected region, and T′ c is the compactness threshold. In an ideal state, the compactness of a perfectly connected region is 1;
[0081] S455. Define the classification function g(R i ):
[0082]
[0083] Among them, τ is the preset determination threshold. When g(R i ) = 1, the connected region R i is determined to be a defective connected region;
[0084] S456. Merge all the determined defective connected regions R i to form the corresponding defect region mask M final (x, y):
[0085]
[0086] Optionally, the S6 includes the following steps:
[0087] S61. Extract the geometric features, texture features, optical features, and shape features of the defect region according to the final defect region mask M final (x, y) to construct a defect feature matrix;
[0088] S62. Compare according to the parameters of the defect feature matrix and combine the known defect types in the defect feature library to classify the defects into the following types:
[0089] Pore defect, internal or surface holes caused by incomplete melting of the powder or insufficient discharge of gas, manifested as a compactness higher than the threshold, a boundary complexity lower than the threshold, and an area lower than the threshold;
[0090] Incomplete fusion defect, local insufficient welding caused by insufficient laser power, too fast scanning speed, or uneven powder laying, manifested as a compactness lower than the threshold, a boundary complexity higher than the threshold, and distributed along the scanning path;
[0091] Molten pool abnormal defect, uneven molten pool size, droplet accumulation or depression caused by excessive energy input or powder splashing, manifested as an emissivity higher than the threshold, an abnormal thermal radiation value higher than the threshold, and an irregular shape;
[0092] Crack defects, cracks caused by rapid cooling or residual stress, are characterized by a length-width ratio higher than a threshold value, an edge gradient higher than a threshold value, and mostly show a linear distribution.
[0093] S63. Classify the severity of the defect based on the area of the defect, the edge gradient, and the thermal anomaly characteristics of the molten pool:
[0094] Low-risk defects, where the defect area is less than the set threshold value and the boundary is smooth.
[0095] Medium-risk defects, where the defect area is close to the critical value and the boundary is complex.
[0096] High-risk defects, where the defect area exceeds the set threshold value, and the boundary is complex or shows a linear crack pattern.
[0097] The beneficial effects of the present invention are as follows:
[0098] (1) The present invention adopts a dynamic mask segmentation algorithm based on adaptive threshold optimization, and adaptively optimizes the defect area through a local energy function, which can dynamically adjust the segmentation threshold of the defect area, enabling accurate identification of different types of defects. The adaptive optimization mechanism can automatically adjust the local threshold to ensure accurate extraction of the defect area under different processing conditions.
[0099] (2) The present invention adopts a multi-scale feature extraction method. By combining image texture features, edge information, and regional shape features, a high-dimensional feature matrix is constructed to improve the recognition ability for different types of defects. The texture features are calculated through the gray-level co-occurrence matrix, the edge features are extracted by Canny edge detection, and the defect type is comprehensively judged by combining regional morphology analysis, improving the recognition accuracy for different defects. Introducing a feature weight optimization strategy makes the features with high correlation contribute more to defect classification.
[0100] (3) After the defect area is segmented, the present invention further adopts a morphological adaptive correction method. By calculating the geometric features and morphological indexes of the defect, the defect classification result is optimized, which can more accurately distinguish different types of defects and improve the recognition ability for tiny defects. The morphological adaptive correction mechanism can perform joint analysis using the defect morphology and thermal radiation features, significantly improving the classification accuracy. Description of the Drawings
[0101] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0102] Figure 1 It is a flowchart of a method for identifying laser powder bed forming defects based on mask segmentation optimization proposed by the present invention. Detailed implementation mode
[0103] Now, the present invention will be further described in detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.
[0104] Reference Figure 1 , a method for identifying defects in laser powder bed forming based on mask segmentation optimization, comprising the following steps:
[0105] S1. Use an imaging device to collect image data of the forming area in the laser powder bed forming process in real time;
[0106] S2. Perform noise removal, illumination equalization, contrast adjustment, and edge enhancement on the collected image data to obtain preprocessed image data;
[0107] S3. Extract key features in the image using a multi-scale feature extraction method based on the preprocessed image data. The key features cover image texture, edge information, and regional shape features;
[0108] S4. Input the preprocessed image data and key features into a dynamic mask segmentation algorithm based on adaptive threshold optimization. The dynamic mask segmentation algorithm automatically adjusts the segmentation threshold according to the local features of the defect area in the image and generates a corresponding defect area mask;
[0109] S5. Extract features of the defect area based on the generated defect area mask, and extract geometric features, texture features, and optical features covering the defect area;
[0110] S6. Classify and evaluate the extracted defect area features to determine the type and severity of the defect and form a defect recognition result.
[0111] In this implementation mode, S1 includes the following steps:
[0112] S11. Use an industrial camera or an infrared camera as the imaging device to obtain image data of the forming area in the laser powder bed forming process in real time. The sampling frequency of the imaging device is set to f s , and the sampling frequency depends on the ratio of the laser scanning speed v l to the forming layer thickness h l ;
[0113] S12. Set the optical parameters of the imaging device, including exposure time, gain, and resolution, where the exposure time is adaptively adjusted according to the brightness of the molten pool;
[0114] S13. The multi-channel spectral imaging technology is adopted to obtain the multi-spectral information of the laser powder bed forming area, including the visible light band and the infrared band. The visible light band is used to capture the surface features of the powder bed, and the infrared band is used to detect the molten pool temperature distribution and abnormal areas.
[0115] S14. During the image acquisition process, synchronous calibration is carried out in combination with the laser scanning trajectory P(x, y, t), and the spatial coordinates (x, y) and time t information of the forming area are recorded.
[0116] S15. An image data buffer pool D is established based on the collected image data. c , and the sliding window mechanism is used to dynamically store the image data, and the window size W is set. s :
[0117] D c = {I t | t ∈ [t - W s , t]}
[0118] where I t is the image data collected at time t, and W s is the sliding window length.
[0119] In this embodiment, S2 includes the following steps:
[0120] S21. The collected image data I t is denoised, and the Gaussian filtering method is used to smooth the random noise in the image data to obtain the filtered image data I'. t ;
[0121] S22. The denoised image data I' t is subjected to illumination equalization processing, and the histogram equalization method is used to enhance the image data contrast:
[0122]
[0123] where L is the gray level of the image data, M×N is the image data size, h(i) is the cumulative distribution function at gray level i, the identifiability of the defect area is optimized, and I″ t is the equalized image data;
[0124] S23. The Laplacian enhancement method is used to perform edge enhancement on the equalized image data I″ t , calculate the gradient response of the image data and perform enhancement transformation, and calculate the global contrast C t and the local contrast C l (x, y) of the edge-enhanced image data I″′ g ;
[0125] S25. Adjust the adaptive parameters of the image data according to the calculation results. If C g or C l (x, y) is lower than the set threshold T c , then adaptively adjust the illumination equalization parameter L and the edge enhancement coefficient λ until the following conditions are met:
[0126] C g ≥T c , C l (x, y)≥T c ;
[0127] S26. Finally, obtain the preprocessed image data
[0128] In this embodiment, S3 includes the following steps:
[0129] S31. Extract multi-scale features based on the preprocessed image data to construct a multi-scale feature set F that includes image texture, edge information, and regional shape features t :
[0130] F t ={F texture , F edge , F shape};
[0131] Among them, F texture is the image texture feature, F edge is the edge feature, and F shape is the regional shape feature;
[0132] S32. Use the gray-level co-occurrence matrix method to calculate the angular second moment, contrast, correlation, and entropy, and extract the image texture feature F texture :
[0133]
[0134] Among them, P(i, j) is the element value of the gray-level co-occurrence matrix, and μ i , μ j and σ i , σ j are the row and column means and standard deviations respectively;
[0135] S33. Use the Canny edge detection method to perform Gaussian smoothing on the image data calculate the gradient magnitude G(x, y) and the direction angle θ(x, y), and calculate the edge feature F edge :
[0136]
[0137] Among them, and respectively represent the gradients of the image data in the x and y directions;
[0138] S34. Calculate the regional shape feature F shape , including the area A, perimeter P, compactness C, and moment invariant η pq ;
[0139] S35. Construct the final multi-scale feature matrix F t , adopt the weight optimization strategy W f to calculate the contribution degrees of different features in defect recognition, and finally obtain the optimized multi-scale feature matrix:
[0140]
[0141] Among them, W f is the optimized feature weight matrix:
[0142]
[0143] Among them, w k represents the weight factor of different feature categories, and Sim(F k , F ref ) is the similarity function between the extracted feature F k and the reference defect sample feature F ref .
[0144] In this embodiment, S4 includes the following steps:
[0145] S41. Define the local energy function E(T) that fuses the image data and multi-scale feature information, which is used to describe the deviation between the preprocessed image data and the local threshold T(x, y), extract the multi-scale feature and the similarity with the preset reference defect feature F ref , as well as the smoothness of the threshold in the spatial domain. The local energy function E(T) is:
[0146]
[0147] Among them, Ω represents the pixel set of the image data , β 1 , β 2 and β 3 are weight coefficients, is the feature vector extracted at the pixel (x, y) by , F ref is the preset reference defect feature vector, and ‖·‖ represents the Euclidean norm, is the gradient of the local threshold T(x, y);
[0148] S42. Use the gradient descent method to iteratively optimize the energy function E(T), update the local threshold T(x, y), and obtain the optimal local threshold T * (x, y);
[0149] S43. According to the optimal local threshold T * (x, y), perform preliminary segmentation on the preprocessed image data to generate a preliminary defect region mask M d (x, y), which is defined as follows:
[0150]
[0151] where M d (x, y) = 1 indicates that the pixel point (x, y) belongs to the defect region;
[0152] S44. Perform morphological adaptive correction on the preliminary defect region mask M d (x, y), combine the regional connectivity C conn and the regional shape feature F shape , and use a classification function to determine the defect type, forming the corresponding defect region mask M final .
[0153] In this embodiment, S42 includes the following steps:
[0154] S421. Calculate the gradient descent direction based on the local energy function E(T), and calculate the partial derivative of the local threshold T(x, y):
[0155]
[0156] where represents the Laplacian smoothing term of the local threshold T(x, y);
[0157] S422. Perform adaptive learning rate optimization in the gradient direction to update the local threshold T(x, y):
[0158]
[0159] where η n is the adaptive learning rate for the nth iteration;
[0160] S423. Use the momentum acceleration mechanism to improve the optimization efficiency of gradient descent, define the momentum term v n and correct the local threshold update method:
[0161]
[0162] T (n+2) (x, y) = T (n+1) (x, y) - v n ;
[0163] Among them, γ is the momentum factor, which controls the contribution degree of historical gradients;
[0164] S424. Set the convergence criterion. If the change of the local threshold meets the following conditions, terminate the iteration and obtain the optimal local threshold T * (x, y):
[0165]
[0166] Among them, Ω is the set of pixels in the image region, ∈ is the preset convergence threshold, which ensures that the local threshold optimization converges to a stable state, and finally obtains the optimized optimal local threshold T * (x, y)
[0167] In this embodiment, S45 includes the following steps:
[0168] S451. Perform morphological adaptive correction on the preliminary defect connected region mask M d (x, y), and for each connected region calculate its area A i and perimeter P i , and define the connectivity index C conn (R i ):
[0169]
[0170] S452. Calculate the compactness C i of the connected region R i :
[0171]
[0172] S453. Extract the shape feature vector F shape (R i ) and introduce the preset reference defect shape feature vector F ref-shape , and use the cosine similarity to quantify the shape similarity of the connected region:
[0173]
[0174] Among them, "·" represents the dot product of vectors, and ‖·‖ represents the Euclidean norm;
[0175] S454. Construct the classification score S(R i ):
[0176]
[0177] Among them, ω 1 、ω 2 and ω 3 are weight factors, T c is the connectivity threshold, which is used to measure the ratio of the connected region to the largest connected region, and T′ c is the compactness threshold. In the ideal state, the compactness of a perfectly connected region is 1;
[0178] S455. Define the classification function g(R i ):
[0179]
[0180] Among them, τ is the preset determination threshold. When g(R i ) = 1, the connected region R i is determined to be a defective connected region;
[0181] S456. Merge all the connected regions R i determined to be defective to form the corresponding defect region mask M final (x, y):
[0182]
[0183] In this embodiment, S6 includes the following steps:
[0184] S61. Extract the geometric features, texture features, optical features, and shape features of the defect region according to the final defect region mask M final (x, y) to construct a defect feature matrix;
[0185] S62. Compare according to the parameters of the defect feature matrix and combine the known defect types in the defect feature library to classify the defects into the following types:
[0186] Pore defect, internal or surface holes caused by incomplete melting of the powder or insufficient discharge of gas, manifested as a compactness higher than the threshold, a boundary complexity lower than the threshold, and an area lower than the threshold;
[0187] Incomplete fusion defect, local insufficient welding caused by insufficient laser power, too fast scanning speed, or uneven powder laying, manifested as a compactness lower than the threshold, a boundary complexity higher than the threshold, and distributed along the scanning path;
[0188] Molten pool anomaly defect, uneven molten pool size, droplet accumulation or depression caused by excessive energy input or powder splashing, manifested as an emissivity higher than the threshold, an abnormal thermal radiation value higher than the threshold, and an irregular shape;
[0189] Crack defects, cracks caused by rapid cooling or residual stress, are characterized by a length-width ratio higher than a threshold value, an edge gradient higher than a threshold value, and mostly linear distribution.
[0190] S63. Classify the severity of the defects according to the area of the defects, the edge gradient, and the thermal anomaly characteristics of the molten pool:
[0191] Low-risk defects, with the defect area smaller than the set threshold value and smooth boundaries.
[0192] Medium-risk defects, with the defect area close to the critical value and complex boundaries.
[0193] High-risk defects, with the defect area exceeding the set threshold value, complex boundaries or linear crack patterns.
[0194] Example 1:
[0195] At 2:00 p.m. on May 10, 2024, in a certain aviation manufacturing laboratory, the research team was manufacturing titanium alloy aeroengine blades using the laser powder bed fusion (LPBF) process. During the processing, the real-time monitoring system collected abnormal optical and thermal radiation data, and there were lack of fusion and porosity defects. If the defects were not discovered and controlled in time, it would lead to a shortened fatigue life of the blades and even catastrophic failure during flight. Therefore, the research team decided to use the method of the present invention to perform real-time defect identification and evaluation on this batch of parts to ensure product quality.
[0196] When processing the 35th layer (thickness 20 μm) in LPBF, the infrared camera of the real-time monitoring system recorded an abnormal decrease in the molten pool temperature along the scanning path (lower than 1520 °C, the normal range is 1600 °C ± 50 °C), indicating the occurrence of lack of fusion defects. At the same time, the industrial high-speed camera captured a low light reflectivity on the surface of the powder layer in some areas, meaning there was local insufficient melting. The system immediately started the defect identification algorithm based on mask segmentation optimization to analyze the real-time collected image data.
[0197] Timestamp: May 10, 2024 14:17:45; Equipment: EOS M290 laser powder bed fusion equipment; Powder material: Ti-6Al-4V; Forming layer: the 35th layer; Laser power: 285 W; Scanning speed: 950 mm / s; Powder layer thickness: 20 μm; Monitoring tools: high-speed camera (1000 fps), infrared thermal imager (sampling rate 500 Hz); Detected defect types: lack of fusion, porosity; Coordinates of the abnormal area: X = 12.45 mm, Y = 8.67 mm.
[0198] In the detection results of the system, the defect probability calculated by the adaptive dynamic mask segmentation algorithm for this abnormal area exceeds 92%, which is much higher than the average defect probability (3%) of the normal area. For further confirmation, the system performed multi-scale feature extraction and analysis on the abnormal area, and calculated the key parameters of texture features, edge gradients, and shape features:
[0199] Edge gradient of the molten pool area: 12.7 for the abnormal area (normal range: 7 - 9); Area compactness: 0.46 for the abnormal area (normal range: 0.8 - 1.0); Average pore size: 245μm (normal range: ≤50μm);
[0200] After completing the feature analysis, the system identified the current defect types as lack of fusion and porosity defects through a defect classification model based on feature weighting. Since these defects have a serious impact on the mechanical properties of the blade, the system immediately sent a warning message to the process engineer's terminal:
[0201] Alarm level: High; Defect location: X = 12.45mm, Y = 8.67mm; Defect type: Lack of fusion (primary) + Porosity (secondary); Defect severity: Critical (≥200μm pores); Recommended measures: Increase the laser power to 310W and reduce the scanning speed to 900mm / s.
[0202] After receiving the alarm, the engineer immediately adjusted the laser power and scanning speed, and performed additional laser remelting on this area in the subsequent layer. After that, the system continued to monitor this area and found that the molten pool temperature returned to the normal range (1605℃), and the defect risk was significantly reduced, finally ensuring that the part quality met the standards.
[0203] To verify the effectiveness of the method of the present invention, the research team compared the defect detection performance of the traditional method and the method of the present invention under the same manufacturing conditions. The data is as follows:
[0204]
[0205] It can be seen from the comparison data that the method of the present invention has increased the recognition accuracy of lack of fusion defects by 20%, reduced the false judgment rate by 75%, and at the same time increased the recognition speed by more than 3 times. Especially in the detection limit of micro-defects, the method of the present invention can detect pores as small as 35μm, while the detection limit of the traditional method is 120μm, showing a great precision advantage.
[0206] In the subsequent two months, the research team actually applied the method of the present invention in the production line, continuously monitored more than 3000 LPBF-manufactured titanium alloy parts, and compared with the production batches using the traditional method, and obtained the following statistical data:
[0207] Overall defect incidence decreased: 8.2% → 2.4%; average part scrap rate decreased: 5.1% → 1.7%; quality compliance rate increased: 89% → 97%; manual inspection time shortened: 50% (from 30 min per piece to 15 min).
[0208] At an aeroengine part quality review meeting, the engineer demonstrated the differences in mechanical properties between the blades produced by the method of the present invention and those produced by the traditional method. The experimental data showed that the average life of the blades using the method of the present invention increased by 22% and the fracture toughness increased by 18% in the fatigue test, thus proving that the method of the present invention not only improved the detection accuracy, but also directly improved the final quality and reliability of the product.
[0209] This embodiment shows that the method of the present invention has significant advantages in LPBF defect identification and quality control. Through adaptive dynamic mask segmentation, feature weighted optimization and real-time warning system, the present invention realizes more accurate and faster defect detection, effectively reduces the defect incidence, improves the manufacturing quality, and provides a highly valuable solution for the high-precision manufacturing fields of aerospace and high-end medical devices.
[0210] The present invention adopts a dynamic mask segmentation algorithm based on adaptive threshold optimization, and adaptively optimizes the defect area through a local energy function, which can dynamically adjust the segmentation threshold of the defect area, so that different types of defects can be accurately identified. The adaptive optimization mechanism can automatically adjust the local threshold to ensure accurate extraction of the defect area under different processing conditions.
[0211] The present invention adopts a multi-scale feature extraction method. By combining image texture features, edge information and regional shape features, a high-dimensional feature matrix is constructed to improve the recognition ability of different types of defects. The texture features are calculated by the gray-level co-occurrence matrix, the edge features are extracted by Canny edge detection, and the defect types are comprehensively judged by combining regional morphology analysis, improving the recognition accuracy of different defects. Introducing a feature weight optimization strategy makes the features with high correlation contribute more to defect classification.
[0212] After the defect area is segmented, the present invention further adopts a morphological adaptive correction method. By calculating the geometric features and morphological indexes of the defects, the defect classification results can be optimized to more accurately distinguish different types of defects and improve the recognition ability of micro-defects. The morphological adaptive correction mechanism can perform joint analysis using the defect morphology and thermal radiation features, significantly improving the classification accuracy.
[0213] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent substitutions or changes should be covered within the protection scope of the present invention.
Claims
1. A laser powder bed forming defect recognition method based on mask segmentation optimization, characterized in that: The steps include: S1. Using imaging equipment to collect image data of the forming area in the laser powder bed forming process in real time; S2. Perform noise removal, illumination balance, contrast adjustment and edge enhancement on the collected image data to obtain preprocessed image data; S3. Based on the preprocessed image data, a multi-scale feature extraction method is used to extract the key features in the image. The key features include image texture, edge information and regional shape features; S4. Inputting the preprocessed image data and the key features into a dynamic mask segmentation algorithm based on adaptive threshold optimization, the dynamic mask segmentation algorithm automatically adjusts the segmentation threshold according to the local features of the defect area in the image, and generates a corresponding defect area mask; S5. Extracting features of the defect area based on the generated defect area mask, extracting geometric features, texture features and optical features covering the defect area; S6. Classify and evaluate the extracted defect area features, determine the type and severity of the defects, and form a defect identification result.
2. The laser powder bed forming defect recognition method based on mask segmentation optimization according to claim 1 is characterized in that: The S1 comprises the following steps: S11. Use an industrial camera or infrared camera as an imaging device to obtain real-time image data of the forming area in the laser powder bed forming process. The sampling frequency of the imaging device is set to f s , the sampling frequency depends on the laser scanning speed v l With the thickness of the forming layer h l The ratio of S12. Setting the optical parameters of the imaging device, including exposure time, gain and resolution, wherein the exposure time is adaptively adjusted according to the brightness of the molten pool; S13. Use multi-channel spectral imaging technology to obtain multi-spectral information of the laser powder bed forming area, including visible light band and infrared band. The visible light band is used to capture the surface characteristics of the powder bed, and the infrared band is used to detect the temperature distribution of the molten pool and abnormal areas; S14. During the image acquisition process, the laser scanning trajectory P (x, y, t) is combined for synchronous calibration to record the spatial coordinates (x, y) and time t information of the forming area; S15. Establishing an image data buffer pool D based on the collected image data c , the sliding window mechanism is used to dynamically store the image data, and the window size W is set s : D c ={I t ∣t∈[t-W s ,t]} Among them, I t is the image data collected at time t, W s is the sliding window length.
3. The laser powder bed forming defect recognition method based on mask segmentation optimization according to claim 1 is characterized in that: The S2 comprises the following steps: S21. The collected image data I t To remove noise, the Gaussian filtering method is used to smooth the random noise in the image data to obtain the filtered image data I t ′; S22. Image data after noise removal I t ′ Perform illumination equalization processing and enhance the contrast of image data based on the histogram equalization method: Where L is the number of gray levels of the image data, M×N is the image data size, h(i) is the cumulative distribution function at gray level i, and optimizes the identifiability of the defect area. t ″ is the image data after equalization; S23. Using Laplace enhancement method to equalize the image data I t ″Perform edge enhancement and calculate the gradient response of image data And perform enhancement transformation, and calculate the edge enhanced image data I t The global contrast C of ″′ g and local contrast C l (x,y); S25. Adaptively adjust the image data parameters according to the calculation results. If C g or C l (x,y) is lower than the set threshold T c , then the illumination balance parameter L and edge enhancement coefficient λ are adaptively adjusted until the following is satisfied: C g ≥T c ,C l (x,y)≥T c ; S26. Finally obtain the preprocessed image data .
4. The laser powder bed forming defect recognition method based on mask segmentation optimization according to claim 3 is characterized in that: The S3 comprises the following steps: S31. Based on the preprocessed image data Perform multi-scale feature extraction and construct a multi-scale feature set F containing image texture, edge information and regional shape features t : F t ={F texture ,F edge ,F shape }; Among them, F texture is the image texture feature, F edge is the edge feature, F shape is the regional shape feature; S32. Use the gray level co-occurrence matrix method to calculate the angular second moment, contrast, correlation and entropy to extract the image texture feature F texture : Among them, P(i,j) is the element value of the gray level co-occurrence matrix, μ i , μ j and σ i , σ j are the row and column means and standard deviations respectively; S33. Use Canny edge detection method to detect image data Perform Gaussian smoothing, calculate the gradient amplitude G(x,y) and direction angle θ(x,y), and calculate the edge feature F edge : in, and Represent the gradient of the image data in the x and y directions respectively; S34. Calculate the regional shape feature F shape , including area A, perimeter P, compactness C and moment invariant η pq ; S35. Construct the final multi-scale feature matrix F based on the extracted features t , using the weight optimization strategy W f Calculate the contribution of different features in defect recognition and finally obtain the optimized multi-scale feature matrix: Among them, W f is the optimized feature weight matrix: Among them, w k Represents the weight factors of different feature categories, Sim(F k ,F ref ) is the extracted feature F k Compared with the reference defect sample feature F ref The similarity function of .
5. The laser powder bed forming defect recognition method based on mask segmentation optimization according to claim 1 is characterized in that: The S4 comprises the following steps: S41. Define the local energy function E(T) that fuses image data and multi-scale feature information to describe the preprocessed image data Deviation from the local threshold T(x,y), extracting multi-scale features Compared with the preset reference defect feature F ref The similarity of and the smoothness of the threshold in the spatial domain, the local energy function E(T) is: Where Ω represents the image data A set of pixels, β1, β2 and β3 are weight coefficients, is the pixel at (x,y) The extracted feature vector, F ref is the preset reference defect feature vector, ‖·‖ represents the Euclidean norm, is the gradient of the local threshold T(x,y); S42. Use the gradient descent method to iteratively optimize the energy function E(T), update the local threshold T(x, y), and obtain the optimal local threshold T * (x,y); S43. According to the optimal local threshold T * (x,y) pairs of preprocessed image data Perform preliminary segmentation and generate a preliminary defect area mask M d (x,y), defined as follows: Among them, M d (x,y)=1 means that the pixel (x,y) belongs to the defect area; S44. Preliminary defect area mask M d (x,y) is morphologically adaptively modified, combined with regional connectivity C conn and regional shape characteristics F shape , the classification function is used to determine the defect type and form the corresponding defect area mask M final .
6. The laser powder bed forming defect recognition method based on mask segmentation optimization according to claim 1 is characterized in that: The S42 comprises the following steps: S421. Calculate the gradient descent direction according to the local energy function E(T), and calculate the partial derivative of the local threshold T(x, y): in, represents the Laplace smoothing term of the local threshold T(x,y); S422. Perform adaptive learning rate optimization in the gradient direction and update the local threshold T(x,y): Among them, η n is the adaptive learning rate for the nth iteration; S423. Use momentum acceleration mechanism to improve the optimization efficiency of gradient descent and define momentum term v n And correct the local threshold update method: T (n+2) (x,y)=T (n+1) (x,y)-v n ; Among them, γ is the momentum factor, which controls the contribution of historical gradient; S424. Set the convergence criteria. If the local threshold value changes to meet the following conditions, terminate the iteration and obtain the optimal local threshold value T * (x,y): Among them, Ω is the pixel set of the image area, ∈ is the preset convergence threshold, which ensures that the local threshold optimization converges to a stable state, and finally obtains the optimized optimal local threshold T * (x,y).
7. The laser powder bed forming defect recognition method based on mask segmentation optimization according to claim 1 is characterized in that: The S45 comprises the following steps: S451. Mask M of the initial defect connected region d (x,y) performs morphological adaptive correction for each connected area Calculate its area A i With perimeter P i , and define the connectivity index C of the connected area conn (R i ): S452. Calculate the connected area R i Firmness C i : S453. Extract the shape feature vector F of the connected area shape (R i ) and introduce the preset reference defect shape feature vector F ref-shape , use cosine similarity to quantify the shape similarity of connected regions: Among them, "·" represents vector dot product, ‖·‖ represents Euclidean norm; S454. Constructing the connected region classification score S(R i ): Among them, ω1, ω2 and ω3 are weight factors, T c is the connectivity threshold, which is used to measure the ratio of the connected area to the maximum connected area. c ′ is the compactness threshold. Ideally, the compactness of a perfectly connected region is 1; S455. Define the classification function g(R i ): Among them, τ is the preset judgment threshold, satisfying g(R i )=1 when the connected region R i It is judged as a defective connected area; S456. Connect all the connected regions R determined to be defects i Merge to generate the corresponding defect area mask M final (x,y): .
8. The laser powder bed forming defect recognition method based on mask segmentation optimization according to claim 1 is characterized in that: The S6 comprises the following steps: S61. Based on the final defect area mask M final (x, y) Extract the geometric features, texture features, optical features and shape features of the defect area and construct a defect feature matrix; S62. According to the parameters of the defect feature matrix, the defects are compared with the known defect types in the defect feature library and classified into the following types: Porosity defects are internal or surface holes caused by incomplete melting of the powder or insufficient gas discharge, which are manifested as a compactness above the threshold, a boundary complexity below the threshold, and an area below the threshold; Unfused defects are caused by insufficient local fusion due to insufficient laser power, too fast scanning speed or uneven powder layering, which are manifested as compactness below the threshold, boundary complexity above the threshold and distribution along the scanning path; Abnormal molten pool defects, uneven molten pool size, droplet accumulation or depression caused by excessive energy input or powder splashing, manifested as emissivity above the threshold, abnormal thermal radiation value above the threshold, and irregular shape; Crack defects, cracks caused by rapid cooling or residual stress, are characterized by length and width above the threshold, edge gradient above the threshold, and are mostly distributed linearly; S63. The severity of defects is graded based on the defect area, edge gradient and thermal anomaly characteristics of the molten pool: Low-risk defects, where the defect area is smaller than the set threshold and the boundary is smooth; Medium-risk defects, the defect area is close to the critical value, and the boundary is complex; High-risk defects, the defect area exceeds the set threshold, the boundaries are complex or the crack morphology is linear.
Citation Information
Cited By
Titanium alloy forming defect detection method and system
CN120852877A
Antenna phase shifter surface defect detection method and system
CN120948550A
A method and system for detecting surface defects of an antenna phase shifter
CN120948550B
Mechanical arm execution control method for industrial production
CN121083670A
Defect detection method for automobile metal accessory mold
CN121280334A