A comprehensive evaluation method and system for welding quality
By extracting the gradient and grayscale characteristics of the defect area in the ultrasonic image of the welded joint, and filtering is performed in combination with the defect type adaptive window, the problem of unclear ultrasonic image affecting welding quality evaluation is solved, and the efficiency and accuracy of welding quality detection are improved.
Patent Information
- Application Number
- CN202510192299.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-02-21
AI Technical Summary
Due to the propagation characteristics of sound waves in the material or the interface, the ultrasound image is unclear, which affects the evaluation of welding quality.
By obtaining the ultrasonic image of the welded joint for contour detection, the gradient characteristics and grayscale characteristics of the defect area are extracted, the feature vector is constructed, and the adaptive window shape and size of the defect type are combined for bilateral filtering, defect information is extracted, and welding quality is comprehensively evaluated.
It improves the efficiency and quality of defect detection of welded joints, enhances the clarity of ultrasonic images, accurately distinguishes and identifys defect types, and improves the accuracy and reliability of welding quality evaluation.
Smart Images

Figure CN119672025B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing. More specifically, the present invention relates to a comprehensive evaluation method and system for welding quality. Background Art
[0002] Welding technology is a processing technology that joins metal or non-metal materials into one body and is applied to various fields such as automobile manufacturing, aerospace, large industrial plants, high-rise buildings, and bridges. With the development of modern architecture and manufacturing, the demand for welding technology is increasing continuously, and the requirements for welding quality are also rising day by day. The quality of welding directly affects the service life and safety of the entire workpiece. By developing a comprehensive evaluation method and system for welding quality, a comprehensive and quantitative evaluation of welding quality can be achieved, so as to more accurately evaluate the welding quality level, help to detect welding quality problems in time, and take corresponding measures for improvement, thereby improving welding quality.
[0003] The existing Chinese patent application document with the publication number CN112756768A discloses a welding quality evaluation method and system based on ultrasonic image feature fusion, which relates to the technical field of welding quality detection. It can obtain three-dimensional information of internal defects of the welding joint through B-scan and C-scan images of ultrasonic detection, and fuse multiple defect feature quantities through information entropy to achieve a comprehensive characterization of welding quality. The evaluation information is comprehensive and highly accurate. The method includes: S1. Perform ultrasonic detection on the backfill friction stir spot welding joint, and collect the B-scan image and C-scan image of the welding area; S2. Analyze and process the obtained B-scan image and C-scan image, extract the effective information in the image and the defect features inside the solder joint, and form a three-dimensional information characterization of welding quality; S3. Use information entropy to assign different weight coefficients to the feature quantities in the three-dimensional information characterization, and then fuse them into a comprehensive index as the evaluation result. The technical solution provided by the present invention is applicable to the process of welding quality evaluation.
[0004] This application document obtains three-dimensional information of internal defects of the welding joint through B-scan and C-scan images of ultrasonic detection, and uses information entropy to perform weighted fusion on multiple defect feature quantities, so as to achieve a comprehensive and accurate comprehensive characterization of welding quality, significantly improving the accuracy and reliability of welding quality evaluation. However, at present, due to the propagation characteristics of sound waves in materials or multiple scattering occurring at the interface, the collected ultrasonic images may be unclear, affecting the extraction of defect information of the welding joint, and further affecting the evaluation of its welding quality. Summary of the Invention
[0005] To solve the problem that the collected ultrasonic images may be unclear due to the propagation characteristics of sound waves in materials or multiple scattering occurring at the interface, affecting the evaluation of welding quality, the present invention provides solutions in the following aspects.
[0006] In a first aspect, a comprehensive evaluation method for welding quality includes: obtaining an ultrasonic image of a welded joint and performing contour detection to extract the defective area of the welded joint; calculating the gradient feature and gray-scale feature of the pixel points in the defective area, and constructing a feature vector of the target pixel points in the defective area, and using the feature vector as the manifestation degree of the defective area; obtaining the edge information of the defective area for determining the defect type, where the defect type includes: crack and bubble, setting the window shape and size according to the defect type, performing bilateral filtering processing and extracting defect information, and comprehensively evaluating the welding quality; wherein, the window shape includes: in response to the defect type being a crack, the window of the defective area is preset to a rectangle, and in response to the defect type being a bubble, the window of the defective area is preset to a square; the size of the rectangular window satisfies the following polynomial: ; ; In the formula, represents the length of the th pixel point window, represents the length of the defective area, represents the width of the defective area, represents the manifestation degree of the th pixel point in the crack area with respect to the defect, represents the width of the th pixel point window in the crack area, represents the exponential function with as the base, represents the ceiling function; the width of the square window satisfies the following relational expression: ; In the formula, represents the width of the th pixel point window, represents the manifestation degree of the th pixel point in the crack area with respect to the defect, represents the exponential function with as the base, represents the ceiling function.
[0007] The effect is that: by combining contour detection, gradient feature and gray-scale feature, the characteristics of the defective area can be described more comprehensively. Especially for the two common defect types of crack and bubble, by analyzing their different geometric and texture features, the defect types can be distinguished and identified more accurately. By calculating the gradient feature and gray-scale feature of the pixel points in the defective area, and adapting the window shape and size according to the defect type, the defect information can be extracted more efficiently, making the filtering process more conform to the actual shape of the defect, so that while retaining the defect details, the unnecessary calculation amount is reduced, and the efficiency of defect information extraction is improved.
[0008] Preferably, the gradient feature includes:
[0009] Taking any pixel point in the defect area as the target pixel point, calculate the sum of the squared differences between the gradient magnitudes and gradient directions of the target pixel point and each pixel point in its eight-neighborhood, and take the mean value of the sum of the square roots of the sum of the squared differences as the gradient feature of the target pixel point.
[0010] Its effect is that by calculating the differences between the gradient magnitudes and gradient directions of the target pixel point and each pixel point in its eight-neighborhood, the edges and structural changes within the defect area can be effectively highlighted. Since cracks usually exhibit significant changes in the gradient direction and magnitude, the defect features become more prominent, thereby improving the accuracy of defect detection. This method is more sensitive to defects with complex shapes (such as cracks) because cracks usually exhibit significant local changes in the gradient magnitude and direction.
[0011] Preferably, the gradient feature further includes:
[0012] Taking any pixel point in the defect area as the target pixel point, calculate the difference between the gradient magnitude of the target pixel point and the average value of the gradient magnitudes of all pixel points in the neighborhood to obtain the difference in gradient magnitude, and calculate the difference between the gradient direction of the target pixel point and the average value of the gradient directions of all pixel points in the neighborhood to obtain the difference in gradient direction;
[0013] Take the square root of the sum of the squared differences in gradient magnitude and the squared differences in gradient direction as the gradient feature of the target pixel point.
[0014] Its effect is that by calculating the difference between the target pixel point and the neighborhood average value, it directly reflects the overall characteristics of the target pixel point relative to its neighborhood. The calculation process is simple and more efficient, suitable for large-scale image processing and real-time detection. This method is more applicable to bubble defects with regular shapes because the gradient changes of regular defects are relatively uniform, and the characteristics can be better reflected by the difference from the neighborhood average value.
[0015] Preferably, the gray-scale feature includes:
[0016] Taking any pixel point in the defect area as the target pixel point, calculate the difference between the gray-scale value of the target pixel point and the gray-scale mean value in the defect area, and divide the difference by the absolute value of the difference between the maximum and minimum gray-scale values in the defect area as the gray-scale feature of the target pixel point.
[0017] Its effect is that through normalization processing, the difference between the gray-scale value of the target pixel point and the gray-scale mean value in the defect area is standardized, making it unaffected by the specific gray-scale range, enhancing the robustness to noise, and effectively highlighting the significant features within the defect area.
[0018] Preferably, the gray-scale feature further includes:
[0019] Taking any pixel point in the defect area as the target pixel point, calculate the difference between the gray value of the target pixel point and the gray variance in the defect area, and divide the difference by the absolute value of the difference between the maximum and minimum gray values in the defect area as the gray feature of the target pixel point.
[0020] Preferably, the obtaining of the edge information of the defect area for determining the defect type includes:
[0021] Obtain the length and width of the defect area, where the length is the maximum distance between the pixel points at both ends in the horizontal direction of the defect area, and the width is the maximum distance between the pixel points at both ends in the vertical direction of the defect area. According to the difference between the pixel point length and width, obtain the morphological form of the defect area;
[0022] Compare the absolute difference between the length and width of the defect area with a preset parameter. In response to the absolute difference being greater than or equal to the preset parameter, the length-width difference of the defect area is large, and it is judged as a crack. Otherwise, the length-width difference is small, and it is judged as a bubble.
[0023] The effect is that: The judgment method based on the length-width difference can effectively distinguish cracks and bubbles, reducing misjudgment caused by similar shapes. Cracks and bubbles have different impacts in welding quality assessment, which is beneficial to better evaluate welding quality.
[0024] Preferably, the obtaining of the edge information of the defect area for determining the defect type further includes:
[0025] Based on contour detection, extract the boundary of the defect area, calculate the boundary curvature of each pixel point on the boundary, and judge the defect type according to the statistical characteristics of the boundary curvature. Calculate the average value and standard deviation of the boundary curvature respectively, and compare the average value and standard deviation of the boundary curvature with the corresponding preset parameters. In response to both the average value and the standard deviation being greater than or equal to the corresponding preset parameters, the curvature feature of the defect area conforms to that of a crack, and it is judged as a crack. Otherwise, it is judged as a bubble.
[0026] In a second aspect, a comprehensive welding quality evaluation system includes: a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned comprehensive welding quality evaluation method is implemented.
[0027] The present invention has the following effects:
[0028] 1. The present invention selects a suitable window shape and size according to the defect type, can effectively retain the detailed information of the defect, while removing noise and blurring. The adaptive filtering strategy significantly enhances the clarity of the ultrasonic image, making the defect information easier to be extracted and analyzed, thereby improving the efficiency and quality of defect detection of the welded joint.
[0029] 2. By combining gradient features and grayscale features, the present invention analyzes the degree of manifestation of pixels in the defect area towards the defect. For the two common defect types of cracks and bubbles, by analyzing their different geometric and texture features, the defect types can be more accurately distinguished and identified. This method of multi-feature fusion significantly improves the accuracy and reliability of defect detection, thereby providing a more precise basis for welding quality evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] By referring to the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present invention will become readily understandable. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0031] Figure 1 is a flowchart of the method of steps S1 - S3 in a comprehensive welding quality evaluation method according to an embodiment of the present invention.
[0032] Figure 2 is a structural block diagram of a comprehensive welding quality evaluation system according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0034] The following will describe in detail the specific embodiments of the present invention with reference to the accompanying drawings.
[0035] Referring to Figure 1 , a comprehensive welding quality evaluation method includes steps S1 - S3, specifically as follows:
[0036] Specific implementation scenario: Three-dimensional information of internal defects of a welded joint is obtained through B-scan and C-scan images of ultrasonic testing. When evaluating the welding quality, the clarity of the defect area is very important, which is related to the subsequent evaluation of welding quality. When collecting images of the welded joint area using ultrasonic waves, the sound waves may undergo multiple scattering in the material or at the interface, which may cause the collected ultrasonic images to be unclear, affecting the extraction of defect information of the welded joint and further affecting the evaluation of its welding quality. Therefore, it is necessary to perform filtering processing on the images of the welded joint area collected by ultrasonic waves to improve the manifestation of the defect area, which is helpful for the subsequent evaluation of welding quality.
[0037] S1: Obtain the ultrasonic image of the welded joint and perform contour detection to extract the defective area of the welded joint.
[0038] In this embodiment, Canny edge detection is used for contour detection. This technology is well-known in the art and will not be described in detail.
[0039] It should be noted that in the defective area, due to the physical property differences between the defect and the surrounding normal tissues, significant changes in image brightness often occur. Such changes are manifested as an increase in gradient values on the gradient map. That is to say, the gradient feature can capture the edge information of the defect and is of great significance for identifying the contour and shape of the defect. At the same time, there are often differences in the gray values between the defective area and the surrounding normal tissues. The gray feature can be used as a supplement to the gradient feature to jointly analyze the degree of manifestation of the pixel point to the defect.
[0040] S2: Calculate the gradient feature and gray feature of the pixel points in the defective area, and construct the feature vector of the target pixel points in the defective area. Use the feature vector as the degree of manifestation of the defective area.
[0041] Embodiment 1:
[0042] Obtaining the degree of manifestation of the defective area includes:
[0043] Taking any pixel point in the defective area as the target pixel point, calculate the sum of the squared differences between the gradient magnitude and gradient direction of the target pixel point and each pixel point in its eight-neighborhood respectively. Take the mean value of the sum of the square roots of the sum of the squared differences as the gradient feature of the target pixel point;
[0044] Specifically, the gradient feature of the target pixel point satisfies the following relational expression:
[0045] ;
[0046] In the formula, represents the gradient feature of the th pixel point, represents the gradient magnitude of the th pixel point in the defective area, represents the gradient magnitude of the th pixel point in the neighborhood of the th pixel point in the defective area, represents the gradient direction of the th pixel point in the defective area, represents the gradient direction of the th pixel point in the neighborhood of the th pixel point in the defective area.
[0047] That is to say, represents the th pixel point and the neighborhood The difference in the degree of intensity change of a pixel. The greater the difference in the gradient magnitude, the greater the difference in the degree of intensity change; Denote the th pixel and the th pixel in the neighborhood in terms of the difference in the direction of intensity change. The greater the difference in the gradient direction, the greater the difference in the direction of intensity change.
[0048] Taking any pixel in the defect area as the target pixel, calculate the difference between the gray value of the target pixel and the gray mean value in the defect area, and divide the difference by the absolute value of the difference between the maximum and minimum gray values in the defect area as the gray feature of the target pixel;
[0049] Specifically, the gray feature of the target pixel satisfies the following relational expression:
[0050] ;
[0051] In the formula, Denote the th pixel's gray feature, Denote the gray value of the th pixel in the defect area, Denote the gray mean value in the defect area, Denote the maximum gray value in the defect area, Denote the minimum gray value in the defect area.
[0052] That is to say, The role of is to normalize the difference to the range of . This makes the gray features of the pixels in different defect areas comparable and not affected by the specific gray value range. The larger the gray feature , the greater the difference between the gray value of the
[0053] Construct the feature vector of the target pixel in the defect area with the gradient feature and the gray feature as the manifestation degree of the defect area.
[0054] Specifically, the manifestation degree of the defect satisfies the following relational expression:
[0055] ;
[0056] In the formula, Denote the th pixel's defect manifestation degree, Denote the The feature vector of a pixel point represents the gradient feature of the th pixel point within the defect area, represents the gray-scale feature of the th pixel point within the defect area, represents the modulus of the vector.
[0057] That is to say, the greater the gradient feature of the th pixel point within the defect area, the more drastic the brightness change of this pixel point, which is very likely to be the edge or internal area of the defect, and the more obvious the manifestation of the defect; the greater the gray-scale feature of the th pixel point within the defect area, the more significant the difference in the brightness level of this pixel point from the defect area, and the greater the influence of the defect, and the longer and greater the degree of manifestation of the defect, that is, the greater the modulus of the feature vector composed of the gray-scale feature and the gradient feature of this pixel point, the greater the degree of manifestation of this pixel point to the defect.
[0058] In addition, Embodiment 2 further includes:
[0059] Taking any pixel point in the defect area as the target pixel point, calculate the difference between the gradient magnitude of the target pixel point and the average value of the gradient magnitudes of all pixel points in the neighborhood to obtain the difference in gradient magnitude, and calculate the difference between the gradient direction of the target pixel point and the average value of the gradient directions of all pixel points in the neighborhood to obtain the difference in gradient direction;
[0060] Take the square root of the sum of the squares of the difference in gradient magnitude and the difference in gradient direction as the gradient feature of the target pixel point.
[0061] Specifically, the gradient feature of the target pixel point satisfies the following relational expression:
[0062] ;
[0063] In the formula, represents the gradient feature of the th pixel point, represents the gradient magnitude of the th pixel point within the defect area, represents the gradient magnitude of the th pixel point in the neighborhood of the th pixel point within the defect area, represents the gradient direction of the th pixel point within the defect area, represents the gradient direction of the th pixel point in the neighborhood of the th pixel point within the defect area.
[0064] Taking any pixel point in the defect area as the target pixel point, calculate the difference between the gray value of the target pixel point and the gray variance of the defect area, and divide the difference by the absolute value of the difference between the maximum and minimum gray values in the defect area as the gray feature of the target pixel point.
[0065] Specifically, the gray feature of the target pixel point satisfies the following relational expression:
[0066] ;
[0067] In the formula, represents the gray feature of the th pixel point, represents the gray value of the th pixel point in the defect area, represents the gray variance in the defect area, represents the maximum gray value in the defect area, represents the minimum gray value in the defect area.
[0068] Among them, the difference between Example 2 and Example 1 lies in: the calculation methods of the gradient feature and the gray feature. The calculation of the gradient feature in Example 1 is more sensitive to defects with complex shapes, such as cracks, because cracks usually show significant local changes in the gradient magnitude and direction, while the calculation of the gradient feature in Example 2 is more applicable to bubble defects with regular shapes, because the gradient changes of regular defects are relatively uniform, and their characteristics can be better reflected by the difference from the neighborhood average value. For complex defects such as cracks, although they can also be detected, they may not be as sensitive as Example 1, and can be selected according to specific situations to achieve better detection effects.
[0069] Furthermore, the common defects in the welding process are cracks and bubbles. Different defects have different morphological manifestations, and the required window shapes are also different. The information of the defect morphology helps to determine the appropriate filtering window shape and size. Cracks usually appear as slender linear shapes, while bubbles may appear as circular or oval shapes. For crack defects, using a rectangular filtering window can better cover the extension direction of the crack, so as to capture crack information more accurately; for bubble defects, using a square filtering window may be more appropriate, because bubbles usually appear as relatively regular circular or oval shapes.
[0070] S3: Obtain the edge information of the defect area for determining the defect type, where the defect type includes: cracks and bubbles. Set the window shape and size according to the defect type, perform bilateral filtering processing and extract defect information, and comprehensively evaluate the welding quality.
[0071] In this embodiment, bilateral filtering is a well-known technique in the art and will not be described in detail. The ultrasonic images of the welded joints are filtered, and a filtering model is trained. The trained model is installed in the welding quality evaluation system to improve the evaluation effect.
[0072] Specifically, after bilateral filtering, defect information is extracted, multiple defect feature quantities are fused, and the steps for comprehensively evaluating the welding quality are referred to: there are detailed steps in the invention of a welding quality evaluation method and system based on ultrasonic image feature fusion with the publication number CN112756768B, which will not be described in detail. The present invention mainly filters the ultrasonic images for different defect types and adaptively adjusts the window size. The specific steps are as follows:
[0073] Obtain the length and width of the defect area. Among them, the length is the maximum value of the distance between the pixel points at both ends in the horizontal direction of the defect area, and the width is the maximum value of the distance between the pixel points at both ends in the vertical direction of the defect area. According to the difference between the pixel point length and width, obtain the morphological manifestation of the defect area;
[0074] Compare the absolute difference between the length and width of the defect area with a preset parameter. In response to the absolute difference being greater than or equal to the preset parameter, the difference between the length and width of the defect area is large, and it is judged as a crack. Otherwise, the difference between the length and width is small, and it is judged as a bubble.
[0075] Specifically, the defect type satisfies the following relational expression:
[0076] ;
[0077] In the formula, represents the defect type, represents the length of the defect area, represents the width of the defect area, represents the preset parameter.
[0078] That is to say, in this embodiment , when the difference between the length and width of the defect area exceeds the preset parameter more, it is considered that the difference between the length and width of the defect area is large, then the morphological manifestation of the defect area is more likely to be rectangular, and the possibility that the defect belongs to a crack is greater; otherwise, when the difference between the length and width of the defect area does not exceed the preset parameter more, it is considered that the difference between the length and width of the defect area is small, then the morphological manifestation of the defect area is more likely to be square, and the possibility that the defect belongs to a bubble is greater.
[0079] In addition, in another embodiment, it further includes:
[0080] Based on contour detection, extract the boundary of the defect area, calculate the boundary curvature of each pixel point on the boundary, and judge the defect type according to the statistical characteristics of the boundary curvature. Calculate the average value and standard deviation of the boundary curvature respectively, and compare the average value and standard deviation of the boundary curvature with the corresponding preset parameters. In response to both the average value and the standard deviation being greater than or equal to the corresponding preset parameters, the curvature characteristics of the defect area match those of a crack, and it is judged as a crack; otherwise, it is judged as a bubble.
[0081] Exemplarily, the preset parameters are 0.1 and 0.05 respectively; the average curvature reflects the overall bending degree of the boundary. A higher average curvature indicates a more complex boundary, such as a crack; the standard deviation of curvature reflects the degree of change in the boundary curvature. A higher standard deviation indicates a larger change in the boundary curvature, such as a crack.
[0082] Characteristics of cracks: Cracks are usually formed by stress concentration or defect expansion inside the material. Their boundary shapes are relatively complex and may include bends in multiple directions, sharp turning points, and irregular shapes. Consequently, the curvature varies greatly at different positions. The tip or turning point of a crack usually has a higher curvature, while the straight part of the crack has a lower curvature.
[0083] Characteristics of bubbles: Bubbles are usually formed by gas or liquid inclusions inside the material. Their boundary shapes are relatively regular, usually close to circular or elliptical, and thus the overall curvature is lower.
[0084] Among them, the window shape includes: In response to the defect type being a crack, the window of the defect area is preset as a rectangle; in response to the defect type being a bubble, the window of the defect area is preset as a square.
[0085] The size of the rectangular window satisfies the following relational expression:
[0086] ; ;
[0087] In the formula, represents the length of the th pixel point window, represents the length of the defect area, represents the width of the defect area, represents the degree of manifestation of the th pixel point on the defect in the crack area, represents the width of the th pixel point window in the crack area, represents the exponential function with as the base, represents the ceiling function;
[0088] That is to say, the The greater the degree of defect manifestation of a pixel, the smaller the required window. is the normalization process. is the difference in length and width of the defect area. The greater the difference, the more obvious the rectangular feature of the window, and the greater the impact on the window length setting of this pixel. When the length of the defect area is greater than the width, the window of this pixel should also conform to this feature to ensure that the remaining pixels within the pixel window also belong to the defect area. Therefore, the length of the pixel window should also be greater than the width. At this time, the width of the pixel window is half of the length. Conversely, the width of the pixel window is twice the length.
[0089] The width of the square window satisfies the following relationship:
[0090] ;
[0091] In the formula, represents the width of the th pixel window. is the degree of defect manifestation of the th pixel in the crack area. represents the exponential function with as the base. represents the ceiling function.
[0092] That is to say, the greater the degree of defect manifestation of the th pixel in the bubble area, the smaller the required window.
[0093] The present invention also provides a comprehensive welding quality evaluation system. As Figure 2 shown, the system includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, a comprehensive welding quality evaluation method according to the first aspect of the present invention is implemented.
[0094] The system also includes other components well-known to those skilled in the art such as a communication bus and a communication interface. Their settings and functions are known in the art, so they will not be described in detail here.
[0095] In the present invention, the foregoing memory may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, the computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as, resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc., or any other medium that can be used to store the required information and can be accessed by an application program, module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device. Any application or module described in the present invention may be implemented by computer-readable / executable instructions stored or otherwise held by such a computer-readable medium.
[0096] In the description of this specification, "a plurality of" and "several" mean at least two, for example, two, three, or more, etc., unless otherwise specifically and clearly defined.
[0097] Although this specification has shown and described multiple embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, alterations, and alternative ways without departing from the spirit and scope of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.
Claims
1. A comprehensive evaluation method for welding quality, characterized in that: include: Obtain ultrasonic images of welded joints and perform contour detection to extract defective areas of welded joints; Calculate the gradient features and grayscale features of the pixels in the defect area, and construct the feature vector of the target pixel in the defect area, and use the feature vector as the representation degree of the defect area; Obtain edge information of the defect area to determine the defect type, wherein the defect type includes: cracks and bubbles, set the window shape and size according to the defect type, perform bilateral filtering and extract defect information, and conduct a comprehensive evaluation of the welding quality; wherein the window shape includes: in response to the defect type being a crack, the window of the defect area is preset to a rectangle, and in response to the defect type being a bubble, the window of the defect area is preset to a square; the rectangular window size satisfies the following polynomial: ; ; In the formula, Indicates The length of the pixel window, represents the length of the defect area, represents the width of the defect area, Indicates the crack area The degree to which each pixel represents a defect. Indicates the crack area The width of the window in pixels. Indicates The exponential function with base , represents the ceiling function; The square window width satisfies the following relationship: ; In the formula, Indicates The width of the window is pixels. Indicates the crack area The degree to which each pixel represents a defect. Indicates The exponential function with base , represents the ceiling function; The obtaining edge information of the defect area to determine the defect type includes: Obtain the length and width of the defect area, where the length is the maximum value of the distance between the two ends of the pixel points in the horizontal direction of the defect area, and the width is the maximum value of the distance between the two ends of the pixel points in the vertical direction of the defect area. According to the difference between the length and width of the pixel points, obtain the appearance of the defect area; The absolute difference between the length and width of the defect area is compared with the preset parameters. If the absolute difference is greater than or equal to the preset parameters, the length and width difference of the defect area is large and it is judged to be a crack. Otherwise, the length and width difference is small and it is judged to be a bubble.
2. A comprehensive evaluation method for welding quality according to claim 1, characterized in that: The gradient features include: Taking any pixel in the defect area as the target pixel, the sum of square differences between the gradient magnitude and gradient direction of the target pixel and each pixel in the eight neighborhoods is calculated respectively, and the mean of the square root of the sum of square differences is taken as the gradient feature of the target pixel.
3. A comprehensive evaluation method for welding quality according to claim 1, characterized in that: The gradient features also include: Taking any pixel in the defect area as the target pixel, the difference between the gradient magnitude of the target pixel and the average value of the gradient magnitudes of all pixels in the neighborhood is calculated to obtain the difference in gradient magnitudes, and the difference between the gradient direction of the target pixel and the average value of the gradient directions of all pixels in the neighborhood is calculated to obtain the difference in gradient directions; The square root of the sum of the squares of the difference in gradient magnitude and the difference in gradient direction is taken as the gradient feature of the target pixel.
4. A comprehensive evaluation method for welding quality according to claim 1, characterized in that: The grayscale features include: Taking any pixel in the defect area as the target pixel, the difference between the grayscale value of the target pixel and the grayscale mean in the defect area is calculated, and the difference is divided by the absolute value of the difference between the maximum and minimum grayscale values in the defect area as the grayscale feature of the target pixel.
5. A comprehensive evaluation method for welding quality according to claim 1, characterized in that: The grayscale features also include: Taking any pixel in the defect area as the target pixel, the difference between the grayscale value of the target pixel and the grayscale variance in the defect area is calculated, and the difference is divided by the absolute value of the difference between the maximum and minimum grayscale values in the defect area as the grayscale feature of the target pixel.
6. A comprehensive evaluation method for welding quality according to claim 1, characterized in that: The step of obtaining edge information of the defect area for determining the defect type further includes: Based on contour detection, the boundary of the defective area is extracted, the boundary curvature of each pixel on the boundary is calculated, the defect type is judged according to the statistical characteristics of the boundary curvature, the average value and standard deviation of the boundary curvature are calculated respectively, and the average value and standard deviation of the boundary curvature are compared with the corresponding preset parameters respectively. In response to the average value and standard deviation being greater than or equal to the corresponding preset parameters, the curvature characteristics of the defective area are consistent with the crack and it is judged to be a crack. Otherwise, it is judged to be a bubble.
7. A welding quality comprehensive evaluation system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the comprehensive evaluation method for welding quality according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Welding quality evaluation method and system based on ultrasonic image feature fusion
CN112756768A
A welding quality evaluation method and system based on ultrasonic image feature fusion
CN112756768B
Transmission shaft part defect detection method and system based on image processing
CN118552549A
Bearing defect detection method and system based on computer vision
CN118799706A