A laser welding quality detection method for aluminum veneer processing
By utilizing the difference between the gradient direction and the welding movement direction, as well as the degree of grayscale value aggregation in the surface image of the welding area of aluminum single-panel, the defect severity value is calculated, and the segmentation threshold is adaptively adjusted. This solves the accuracy problem of aluminum single-panel welding quality inspection under multi-light conditions and achieves efficient identification of weld defects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG YINGJIWEI ALUMINUM BUILDING MATERIALS CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies are insufficient for effectively detecting welding quality during the processing of aluminum panels under diverse lighting conditions, especially defects such as cracks and porosity in the weld.
By acquiring surface images of the welding area of aluminum single-panel, the degree of suspicion is determined by the difference between the gradient direction of the target pixel and the welding movement direction. The degree of clustering is calculated by combining the gray value and the distance of the same pixel within the initial neighborhood. The product is used to obtain the degree of defect. The segmentation threshold is adaptively adjusted to identify defective pixels and realize welding quality detection.
Under diverse lighting conditions, it can accurately identify defects in aluminum single-panel welds, improve the accuracy and reliability of inspection results, and avoid misjudgment of welding quality.
Smart Images

Figure CN122243997A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quality inspection technology, and in particular to a laser welding quality inspection method for aluminum single-panel processing. Background Technology
[0002] Aluminum single-layer panels are made from pure aluminum or aluminum alloys through rolling and stretching processes. Aluminum single-layer panels can be used for exterior wall decoration, roofing materials, interior ceilings and partitions of buildings; in the manufacture of vehicles such as automobiles, ships and airplanes, aluminum single-layer panels can also be used for body, interior and structural components.
[0003] In applications such as vehicle manufacturing and building structures, aluminum panels can be welded to form a strong connection that meets mechanical performance requirements. However, the weld seam may produce defects such as cracks or pores, which can affect the appearance quality of the aluminum panel and even the structural strength of the aluminum panel after welding.
[0004] To achieve the inspection of welding quality of alloy sheet components such as aluminum single-layer panels, Chinese patent application CN118505698A provides a quality inspection method for intelligent welding production of alloy sheets. The method includes: acquiring a grayscale image of the alloy sheet welding, wherein the grayscale image contains several welding areas; obtaining the welding reflection regularity of each welding area by analyzing the pattern of concentrated reflective distribution within the welding areas; analyzing the texture distribution of pixels within the welding areas and combining it with the welding reflection regularity to obtain the weld edge membership degree of each welding area; comparing the grayscale differences between the welding area edges and the interior of the welding areas based on the welding reflection regularity, and analyzing the similarity between the texture edge direction and the reflective distribution direction within the welding areas to obtain the welding defect degree of each welding area; combining the welding defect degree with the weld edge membership degree to obtain the weld defect degree of the alloy sheet welding grayscale image; and performing quality inspection on the alloy sheet welding grayscale image based on the weld defect degree.
[0005] In related technologies, the welding quality of the welding area is detected based on the reflectivity of the welding area. However, reflectivity is easily limited by the lighting conditions of the welding environment, making it difficult to effectively detect the welding quality during the aluminum panel processing. Summary of the Invention
[0006] To overcome the difficulty in effectively detecting welding quality during aluminum panel processing in related technologies, this application provides a laser welding quality detection method for aluminum panel processing, comprising: acquiring a surface image of the welding area to be tested of the aluminum panel, and determining the suspicion value of the target pixel based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction; determining the aggregation value corresponding to the target pixel based on the distance between pixels with the same gray value as the target pixel in the initial neighborhood range, and using the product of the aggregation value and the suspicion value as the defect value of the target pixel; determining the target neighborhood side length corresponding to the target pixel based on the defect value of the target pixel, and comparing the target pixel with the target neighborhood range corresponding to the target neighborhood side length to determine the segmentation threshold corresponding to the target pixel; and using the segmentation threshold corresponding to the target pixel to determine whether the target pixel belongs to a defect pixel, so as to obtain the detection result of the welding quality of the welding area to be tested of the aluminum panel based on the area ratio or number of defect pixels in the surface image.
[0007] In this way, in the surface image of the welding area to be tested of the aluminum panel, the suspicion value of the target pixel is determined based on the difference between the gradient direction of the target pixel and the welding movement direction in the surface image; the aggregation value corresponding to the target pixel is determined based on the distance between pixels with the same gray value in the initial neighborhood of the target pixel; the product of the aggregation value and the suspicion value is used as the defect value of the target pixel, which can adaptively determine the segmentation threshold corresponding to the target pixel, thereby obtaining the detection result of the welding quality of the welding area to be tested of the aluminum panel.
[0008] Optionally, based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction, a suspicion value for the target pixel is determined, including: ,in, Let be the suspicion level value of the target pixel, N be the total number of pixels in the surface image, and n be the number of pixels in the surface image with the same grayscale value as the target pixel. The angle corresponding to the gradient direction of the target pixel. The angle corresponding to the welding movement direction. It is the largest angle between the gradient direction and the welding movement direction among different pixels in the surface image.
[0009] In this way, since there is a difference in the gradient direction between the pixels corresponding to defects and the pixels that are not defects in the surface image, the probability that the target pixel belongs to a defect in the weld can be characterized by the obtained suspicion value based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction.
[0010] Optionally, the aggregation degree value corresponding to the target pixel is determined based on the distance between pixels with the same gray value as the target pixel within the initial neighborhood of the target pixel, including: Where E is the clustering degree value corresponding to the target pixel, norm is the normalization function, and m is the number of pixels with the same gray value as the target pixel in the initial neighborhood. denoted as , where is the distance between the a-th pixel and the b-th pixel within the initial neighborhood of the target pixel, which have the same grayscale value as the target pixel. h is the number of pixels within the initial neighborhood of the target pixel.
[0011] In this way, the clustering degree value of the target pixel determined by the distance between pixels with the same gray value as the target pixel in the initial neighborhood of the target pixel, and the number of pixels with the same gray value as the target pixel in the initial neighborhood of the target pixel, can better reflect the clustering degree of pixels with the same gray value as the target pixel in the initial neighborhood of the target pixel, so as to filter out defects in the surface image that have a greater impact on the aluminum single panel.
[0012] Optionally, based on the defect severity value of the target pixel, the target neighborhood side length corresponding to the target pixel is determined, including: Where H is the side length of the target neighborhood corresponding to the target pixel, L is the preset initial neighborhood side length, and S is the defect degree value of the target pixel. This indicates rounding up to the nearest integer.
[0013] In this way, based on the defect severity value of the target pixel, the matching target neighborhood side length can be adaptively determined for the target pixel, which is convenient for balancing the identification efficiency and accuracy of surface defects in the weld of aluminum single panel.
[0014] Optionally, the target pixel is compared with the target neighborhood range corresponding to the side length of the target neighborhood to determine the segmentation threshold corresponding to the target pixel, including: for the target neighborhood range centered on the target pixel and with a side length equal to the side length of the target neighborhood, the average value and standard deviation of the gray values of the pixels within the target neighborhood range are determined; and the segmentation threshold corresponding to the target pixel is determined based on the average value and standard deviation of the gray values of the pixels within the target neighborhood range.
[0015] In this way, compared with the non-defect pixels in the weld of the aluminum panel, the grayscale features of the defect pixels in the weld of the aluminum panel are more diverse. By considering the grayscale average value and standard deviation in the neighborhood, the segmentation threshold can be adaptively adjusted to adapt to different image regions and defect features, and avoid missing the weld defects existing on the surface of the aluminum panel weld.
[0016] Optionally, the segmentation threshold corresponding to the target pixel is used to determine whether the target pixel belongs to a defective pixel, including: determining that the target pixel belongs to a defective pixel when the gray value of the target pixel is less than or equal to the corresponding segmentation threshold; or, determining that the target pixel belongs to a non-defective pixel when the gray value of the target pixel is greater than the corresponding segmentation threshold.
[0017] Optionally, the detection result of the welding quality of the welding area to be tested of the aluminum panel is obtained based on the area ratio or number of defect pixels in the surface image, including: if the area ratio of defect pixels in the surface image is greater than a preset ratio threshold, the detection result of the welding quality of the welding area to be tested of the aluminum panel is determined to be unqualified; or, if the number of defect pixels in the surface image is greater than a preset number threshold, the detection result of the welding quality of the welding area to be tested of the aluminum panel is determined to be unqualified.
[0018] Optionally, the surface image of the welded area to be tested of the aluminum panel is obtained by the following method: obtaining an initial image of the surface of the welded aluminum panel, and inputting the initial image into a pre-trained image segmentation model to obtain the surface image output by the image segmentation model; the surface image includes the image region where the welded area to be tested is located in the initial image; wherein, the image segmentation model is used to segment the image region where the welded area to be tested is located from the initial image.
[0019] Optionally, the image segmentation model is trained in the following way: acquiring multiple sample images of the surfaces of different welded aluminum panels, and acquiring mask images of the corresponding sample images; the multiple sample images correspond to different welded aluminum panels respectively; the pixel values of the pixels in the mask images other than the image area where the weld of the aluminum panel is located are 0; using the sample images as input to a pre-built network model, and using the mask images of the corresponding sample images as output to the network model, so as to complete the training of the network model using multiple sample images and multiple mask images; and using the trained network model as the image segmentation model.
[0020] Optionally, the pre-built network model can be any of the following: convolutional neural network, fully convolutional network, encoder-decoder structure, and region-based network.
[0021] The technical solutions provided by the embodiments of this application may include the following beneficial effects: In the surface image of the welding area to be tested of the aluminum single panel, the suspicion value of the target pixel is determined based on the difference between the gradient direction of the target pixel and the welding movement direction in the surface image; the aggregation value corresponding to the target pixel is determined based on the distance between pixels with the same gray value as the target pixel in the initial neighborhood range of the target pixel; by using the product of the aggregation value and the suspicion value as the defect value of the target pixel, the segmentation threshold corresponding to the target pixel can be adaptively determined, thereby obtaining a more accurate detection result of the welding quality of the welding area to be tested of the aluminum single panel.
[0022] Compared to detecting the welding quality of a welding area by measuring the reflectivity of the welding area, the defect degree value of the target pixel in this embodiment is determined based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction, as well as the distance between pixels with the same gray value in the initial neighborhood of the target pixel. This allows the welding quality detection result in this embodiment to avoid dependence on reflectivity, thereby enabling the detection of the welding quality of aluminum panels under more diverse lighting conditions.
[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0025] Figure 1 This is a flowchart illustrating a laser welding quality inspection method for aluminum single-panel processing according to an exemplary embodiment; Figure 2 This is a schematic diagram of the surface image of a weld seam of an aluminum panel according to an exemplary embodiment; Figure 3 This is a schematic diagram of the defect region in a surface image determined using a fixed neighborhood side length; Figure 4 This is a schematic diagram of the defect region in the surface image determined by the embodiments of this application. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0027] First, a brief introduction to the application scenarios of the embodiments of this application will be given. In the application scenarios of this application, during the welding process of aluminum single panels, thermal stress concentration may occur in the welded aluminum single panels due to rapid heat conduction, thereby causing cracks in the welded aluminum single panels; or, the gas generated during the welding process may not be discharged in time, thereby forming pores in the obtained weld. Therefore, it is necessary to inspect the welding quality of the welded aluminum single panels.
[0028] In related technologies, the welding quality of alloy components such as aluminum panels is mainly detected by the reflection of the welding area. This makes the detection of welding quality dependent on specific lighting conditions, making it difficult to obtain accurate detection results of welding quality under different lighting conditions.
[0029] To address the aforementioned technical problems, this application provides a method for inspecting the quality of laser welding used in aluminum panel processing. Figure 1 This is a flowchart illustrating a laser welding quality inspection method for aluminum panel processing according to an exemplary embodiment, such as... Figure 1 As shown, the method includes the following steps.
[0030] In step S101, a surface image of the welding area to be tested on the aluminum single plate is acquired, and the degree of suspicion of the target pixel is determined based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction.
[0031] When welding the boundary of two aluminum panels to connect them, multiple points at the junction of the two aluminum panels can be pre-fixed. For example, multiple points at the junction of the two aluminum panels can be pre-spot welded, and the welding gun of the welding equipment can be controlled to move along the junction of the two aluminum panels for welding.
[0032] For example, two aluminum panels to be welded can be placed horizontally, with the junction of the two panels positioned horizontally from left to right. The welding gun of the welding equipment can be controlled to weld along the junction of the two aluminum panels from left to right or from right to left, thereby achieving a welded connection between the two aluminum panels.
[0033] The two aluminum panels to be welded can be aluminum sheets of the same material and thickness, or the two aluminum panels to be welded can be two aluminum sheets of compatible material or thickness.
[0034] For a welded aluminum panel, an image acquisition device can be used to acquire a surface image of the welded area to be tested. By performing grayscale processing on the pixels in the surface image, the grayscale value of the pixels in the surface image can be obtained.
[0035] In one embodiment, the surface image of the welded area to be tested of the aluminum panel is obtained by: acquiring an initial image of the surface of the welded aluminum panel and inputting the initial image into a pre-trained image segmentation model to obtain the surface image output by the image segmentation model; the surface image includes the image region where the welded area to be tested is located in the initial image; wherein, the image segmentation model is used to segment the image region where the welded area to be tested is located from the initial image.
[0036] In this way, by inputting the initial image into a pre-trained image segmentation model to obtain the surface image output by the image segmentation model, the influence of areas outside the image area where the welding area to be tested is located in the initial image on the detection results can be avoided, and the computational load of welding quality detection can be reduced.
[0037] In one embodiment, an image segmentation model for segmenting the image region containing the welded area from an initial image can be trained as follows: acquiring multiple sample images of the surfaces of different welded aluminum panels and acquiring mask images corresponding to the sample images; the multiple sample images correspond to different welded aluminum panels respectively; the pixel values of pixels in the mask images other than the image region containing the weld of the aluminum panel are 0; using the sample images as input to a pre-built network model and using the mask images corresponding to the sample images as output to the network model, thereby training the network model using multiple sample images and multiple mask images; and using the trained network model as an image segmentation model.
[0038] The pre-built network model can be a convolutional neural network, a fully convolutional network, an encoder-decoder structure, or a region-based network, etc. The specific structure of the network model is not limited in the embodiments of this application.
[0039] Since there is usually a certain difference between the defects that may exist in the weld and the weld pool, and this difference may be manifested as a difference between the direction of feature change and the direction of welding movement; for example, when the welding movement direction is controlled to be horizontal from right to left, the welding movement direction is shown as horizontal in the surface image.
[0040] Defects in welds are usually manifested as an angle greater than a predetermined angle between the direction of feature change and the horizontal direction of the surface image. For example, defects in welds may manifest as a feature change in the vertical direction in the surface image. Therefore, the suspicion value of the target pixel can be determined based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction, so as to identify the pixel corresponding to the weld defect in the surface image.
[0041] In one embodiment, determining the suspicion level of a target pixel based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction includes: Where C is the suspicion level of the target pixel, N is the total number of pixels in the surface image, and n is the number of pixels in the surface image with the same grayscale value as the target pixel. The angle corresponding to the gradient direction of the target pixel. The angle corresponding to the welding movement direction. It is the largest angle between the gradient direction and the welding movement direction among different pixels in the surface image.
[0042] In the surface image of the weld to be tested on the aluminum single panel, there are fewer pixels corresponding to defects than pixels corresponding to non-defects such as molten pools. Moreover, the direction of feature change of pixels corresponding to defects differs more from the direction of welding movement than pixels corresponding to non-defects such as molten pools in the surface image. Therefore, based on the characteristics of pixels corresponding to defects in the surface image, it is possible to distinguish between pixels corresponding to defects and pixels corresponding to non-defects.
[0043] The target pixel can be any pixel in the surface image. By comparing the number of pixels in the surface image with the same gray value as the target pixel with the total number of pixels in the surface image, we can achieve both normalization of the number of pixels and reflect the universality of the gray level of the target pixel.
[0044] The higher the prevalence of the gray level of the target pixel, the more pixels in the surface image have the same gray value as the target pixel, and the more likely the target pixel is to correspond to non-defect parts such as the molten pool in the weld of the aluminum panel.
[0045] Conversely, the lower the prevalence of the gray level of the target pixel, the fewer pixels in the surface image have the same gray value as the target pixel, and the more likely the target pixel is to correspond to defects such as pores or cracks in the weld of the aluminum panel.
[0046] The gradient direction of a pixel can effectively reflect the direction of change in its grayscale features. When welding two aluminum panels at their junction along a straight line, the direction of change in the grayscale features of the non-defective parts of the weld is closer to the welding movement direction than the defective parts. Therefore, by comparing the angular difference between the gradient direction of the target pixel and the welding movement direction, it is possible to distinguish between defective and non-defective pixels in the weld of the aluminum panel, thus facilitating the inspection of the welding quality of the aluminum panel.
[0047] For example, when welding aluminum panels from right to left in a horizontal direction, the welding movement direction can be from right to left in a horizontal direction, and the direction from right to left in a horizontal direction can be taken as the direction where 0 degrees is located. For pixels in the surface image that correspond to non-defect parts such as the molten pool in the weld, the angle between the gradient direction of the pixel and the welding movement direction is usually within a certain range. For example, even if there are some textures in the weld obtained after welding, the angle between the direction of texture change of these textures and the welding movement direction is usually, for example, within 45 degrees.
[0048] For pixels in the surface image corresponding to defects such as cracks in the weld, the angle between the gradient direction of the pixel and the welding movement direction can reach 80 degrees or more. Here, compared to the non-defective parts of the weld, the grayscale features of the defective parts of the weld exhibit more diverse directions of change and usually differ more from the welding movement direction. Therefore, a larger suspicion value can be assigned to pixels with a higher probability of belonging to defects, or a smaller suspicion value can be assigned to pixels with a higher probability of belonging to non-defects.
[0049] In this way, since there is a difference in the gradient direction between the pixels corresponding to defects and the pixels that are not defects in the surface image, the probability that the target pixel belongs to a defect in the weld can be characterized by the obtained suspicion value based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction.
[0050] In step S102, the clustering degree value corresponding to the target pixel is determined based on the distance between pixels with the same gray value as the target pixel within the initial neighborhood range of the target pixel, and the product of the clustering degree value and the suspicion degree value is used as the defect degree value of the target pixel.
[0051] The aggregation value corresponding to the target pixel is used to characterize the aggregation degree between pixels with the same gray value as the target pixel within the initial neighborhood of the target pixel. Among the defects that may exist on the surface of the weld of aluminum single panel, the clustered defects have a greater impact on the appearance quality or structural strength of the aluminum single panel.
[0052] Alternatively, if there are clustered defects on the surface of the aluminum panel, there is a greater possibility of structural defects inside the aluminum panel. Therefore, it is more necessary to identify the clustered defects that may exist on the surface of the weld of the aluminum panel than the dispersed defects that exist on the surface of the weld.
[0053] Since the suspicion value of a target pixel is used to characterize the probability that the target pixel belongs to a defect in the weld in the feature change direction, and the defects with higher aggregation degree have a greater impact on the appearance quality or structural strength of the aluminum panel, the product of the aggregation degree value and the suspicion value is used as the defect degree value of the target pixel. The obtained defect degree value can simultaneously consider the anomaly of the pixel in the feature change direction and the aggregation of pixels at the same gray level. It is convenient to use the defect degree value to identify the more harmful defects on the surface of the weld of the aluminum panel, and can distinguish between defective pixels and non-defective pixels.
[0054] In one embodiment, determining the clustering degree value corresponding to the target pixel based on the distance between pixels with the same grayscale value as the target pixel within the initial neighborhood of the target pixel includes: Where E is the clustering degree value corresponding to the target pixel, norm is the normalization function, and m is the number of pixels with the same gray value as the target pixel in the initial neighborhood. denoted as , where is the distance between the a-th pixel and the b-th pixel within the initial neighborhood of the target pixel, which have the same grayscale value as the target pixel. h is the number of pixels within the initial neighborhood of the target pixel.
[0055] The initial neighborhood range is determined based on a preset initial neighborhood side length, and the size of the initial neighborhood range is equal to the square of the initial neighborhood side length; for example, the initial neighborhood side length can be any integer in the range of 5 to 7; when the preset initial neighborhood side length is 7, the size of the initial neighborhood range of the target pixel is equal to 7×7.
[0056] For example, within a 7×7 neighborhood of the target pixel, including 48 other pixels besides the target pixel, the distance between pixels whose grayscale value is equal to that of the target pixel can be determined.
[0057] If, based on the grayscale value equal to the distance between the target pixel and other pixels, it is determined that pixels with grayscale values equal to the target pixel are relatively clustered within the initial neighborhood, then it at least indicates that there are no minor dispersion defects within the initial neighborhood of the target pixel.
[0058] By comparing the number of pixels with the same gray value as the target pixel within the initial neighborhood of the target pixel with the total number of pixels within the initial neighborhood, the percentage of pixels with the same gray value within the initial neighborhood of the target pixel is obtained. This allows the aggregation degree value to further reflect the aggregation degree of pixels with the same gray value as the target pixel within the initial neighborhood of the target pixel.
[0059] In this way, the clustering degree value of the target pixel determined by the distance between pixels with the same gray value as the target pixel in the initial neighborhood of the target pixel, and the number of pixels with the same gray value as the target pixel in the initial neighborhood of the target pixel, can better reflect the clustering degree of pixels with the same gray value as the target pixel in the initial neighborhood of the target pixel, so as to filter out defects in the surface image that have a greater impact on the aluminum single panel.
[0060] Since the clustering degree value of the target pixel is used to characterize the clustering degree of pixels with the same gray value as the target pixel in the initial neighborhood of the target pixel, and the suspicion degree value of the target pixel can reflect the probability that there is an anomaly in the gradient direction of the target pixel, the product of the clustering degree value and the suspicion degree value is used as the defect degree value of the target pixel. Compared with the non-defect pixels on the surface of the aluminum panel, it can determine a larger defect degree value for clustered defects such as cracks or pores on the surface of the aluminum panel, thereby achieving effective identification of defects that have a greater impact on the appearance quality or structural strength of the aluminum panel.
[0061] In step S103, the target neighborhood side length corresponding to the target pixel is determined based on the defect degree value of the target pixel, and the target pixel is compared with the target neighborhood range corresponding to the target neighborhood side length to determine the segmentation threshold corresponding to the target pixel.
[0062] Based on the defect severity value of the target pixel, the side length of the target neighborhood corresponding to the target pixel can be determined. For example, the side length of the target neighborhood corresponding to the target pixel can be positively correlated with the defect severity value of the target pixel. The larger the defect severity value of the target pixel, the higher the probability that the initial neighborhood range where the target pixel is located belongs to the surface defect of the aluminum single panel.
[0063] The larger the defect severity value of the target pixel, the more accurate the identification of surface defects in the aluminum panel can be. This allows for a larger determination of whether the target pixel is a defect, thus avoiding the omission of defects in the surface image of the aluminum panel.
[0064] By comparing the target pixel with the target neighborhood range corresponding to the target neighborhood side length, a matching segmentation threshold can be determined for the target pixel; different segmentation thresholds are determined for different pixels in the surface image of the weld seam of the aluminum single panel, so as to achieve targeted segmentation of different pixels in the surface image of the weld seam of the aluminum single panel.
[0065] In one embodiment, determining the target neighborhood side length corresponding to the target pixel based on the defect severity value of the target pixel includes: Where H is the side length of the target neighborhood corresponding to the target pixel, L is the preset initial neighborhood side length, and S is the defect degree value of the target pixel. This indicates rounding up to the nearest integer.
[0066] The side length of the target neighborhood corresponding to the target pixel is used to determine the segmentation threshold corresponding to the target pixel. For example, the larger the side length of the target neighborhood corresponding to the target pixel, the larger the neighborhood range used to determine the segmentation threshold corresponding to the target pixel, and the more accurately it can be determined whether the target pixel belongs to the defective pixel.
[0067] The higher the defect level value of the target pixel, the greater the probability that the target pixel belongs to the surface defect of the weld of the aluminum single plate. In order to more accurately determine whether the target pixel belongs to the defect pixel, the side length of the target neighborhood corresponding to the target pixel can be increased.
[0068] Conversely, the smaller the defect severity value of the target pixel, the lower the probability that the target pixel belongs to the surface defect of the weld of the aluminum panel, or the less the defect at the location of the target pixel has on the surface appearance or structural strength of the aluminum panel. This can reduce the side length of the target neighborhood corresponding to the target pixel, thereby reducing the amount of computation in the process of determining the segmentation threshold of the target pixel.
[0069] In this way, based on the defect severity value of the target pixel, the matching target neighborhood side length can be adaptively determined for the target pixel, which is convenient for balancing the identification efficiency and accuracy of surface defects in the weld of aluminum single panel.
[0070] In one embodiment, comparing the target pixel with the target neighborhood range corresponding to the target neighborhood side length to determine the segmentation threshold corresponding to the target pixel includes: for the target neighborhood range centered on the target pixel and with a side length equal to the target neighborhood side length, determining the average value and standard deviation of the gray values of the pixels within the target neighborhood range; and determining the segmentation threshold corresponding to the target pixel based on the average value and standard deviation of the gray values of the pixels within the target neighborhood range.
[0071] The standard deviation of the gray values of pixels within the target neighborhood of a target pixel can characterize the degree of difference in gray values among pixels within the target neighborhood of a target pixel. The larger the standard deviation of the gray values of pixels within the target neighborhood of a target pixel, the more likely there are pixels corresponding to weld defects within the target neighborhood of the target pixel. A smaller segmentation threshold can be determined based on the average gray values of pixels within the target neighborhood to achieve the segmentation of defect pixels with smaller gray values.
[0072] Compared to non-defect pixels in the weld seam of aluminum composite panels, defect pixels in the weld seam of aluminum composite panels have more diverse grayscale features. By considering the average grayscale value and standard deviation in the neighborhood, the segmentation threshold can be adaptively adjusted to adapt to different image regions and defect features, avoiding the omission of weld seam defects on the surface of the aluminum composite panel weld seam.
[0073] In the surface image of the weld, the gray value of the pixel corresponding to the defect is smaller. Based on the average value and standard deviation of the gray value of the pixel in the target neighborhood, adaptive thresholding algorithms such as the Niblack algorithm and the Sauvola algorithm can be used to determine the threshold. Among them, when the average value of the gray value of the pixel in the target neighborhood is the same, the segmentation threshold of the target pixel is negatively correlated with the standard deviation of the gray value of the pixel in the target neighborhood.
[0074] For example, T = p + k × f, where T is the segmentation threshold corresponding to the target pixel, p is the average gray value of the pixels in the target neighborhood, k is a preset coefficient, and f is the standard deviation of the gray values of the pixels in the target neighborhood. The value of k can be set according to actual needs. For example, to avoid misjudging non-defect pixels with larger gray values in the surface image as defect pixels, k can be set in the range of -0.5 to -0.2.
[0075] In step S104, the segmentation threshold corresponding to the target pixel is used to determine whether the target pixel belongs to the defect pixel, so as to obtain the detection result of the welding quality of the welding area to be tested of the aluminum single plate according to the area ratio or number of defect pixels in the surface image.
[0076] In the surface image of the weld seam of aluminum single panel, the gray values of defective pixels such as cracks or pores in the weld seam are smaller than those of non-defect pixels such as molten pools. Therefore, the target pixel can be compared with the corresponding segmentation threshold to determine whether the target pixel belongs to the defect pixel, so as to process aluminum single panels with a greater impact of defects.
[0077] In one embodiment, determining whether a target pixel belongs to a defective pixel using the segmentation threshold corresponding to the target pixel includes: determining that the target pixel belongs to a defective pixel when the gray value of the target pixel is less than or equal to the corresponding segmentation threshold; or determining that the target pixel belongs to a non-defective pixel when the gray value of the target pixel is greater than the corresponding segmentation threshold.
[0078] In this way, based on the grayscale characteristics of the molten pool of aluminum alloy and defects in the weld seam of the aluminum panel, it is possible to distinguish between defective and non-defective pixels in the surface image of the weld seam of the aluminum panel, so as to obtain the inspection results of the welding quality of the weld seam of the aluminum panel.
[0079] Figure 2 This is a schematic diagram of the surface image of the weld seam of the aluminum single panel in the embodiments of this application, such as... Figure 2 As shown, there are some scratches and porosity and other weld defects on the right side of the surface image of the aluminum panel weld. By using a fixed neighborhood side length, the segmentation threshold corresponding to the pixel in the surface image can be determined, thereby obtaining the defect area in the surface image of the aluminum panel weld.
[0080] Figure 3 This is a schematic diagram of a defect region in a surface image determined using a fixed neighborhood side length, such as... Figure 3 As shown, Figure 2 Some of the weld defects are in Figure 3 This is reflected in the middle, and Figure 2 Another part of the weld defects were not found in Figure 3 This is reflected in, therefore, in Figure 3 Among the obtained weld defect detection results, there are... Figure 2 The omission of weld defects in the process resulted in an inaccurate identification of weld defects in aluminum panels.
[0081] Figure 4 This is a schematic diagram of the defect area in the surface image determined by the embodiments of this application. The laser welding quality inspection method for aluminum single-panel processing in the embodiments of this application is used, such as... Figure 4 As shown, compared to the defect region in the surface image determined using a fixed neighborhood side length, Figure 2 The defects that exist in Figure 4 This allows for a more complete understanding and provides more accurate detection results for weld defects in aluminum panels, thus enabling better quality inspection of laser welding of aluminum panels.
[0082] In one embodiment, the detection result of the welding quality of the welding area to be tested of the aluminum panel is obtained based on the area ratio or number of defect pixels in the surface image, including: if the area ratio of defect pixels in the surface image is greater than a preset ratio threshold, the detection result of the welding quality of the welding area to be tested of the aluminum panel is determined to be unqualified; or, if the number of defect pixels in the surface image is greater than a preset number threshold, the detection result of the welding quality of the welding area to be tested of the aluminum panel is determined to be unqualified.
[0083] For example, the preset ratio threshold can be between 1% and 4%. If the area ratio of defect pixels in the surface image is greater than the preset ratio threshold, it indicates that the defects in the weld of the aluminum panel have a certain impact on the appearance quality or structural strength of the welded aluminum panel. It can be determined that the welding quality of the welded area of the aluminum panel is unqualified, which facilitates the processing of aluminum panels with unqualified test results.
[0084] The number of defect pixels in the surface image reflects the area occupied by the defect in the weld. In this embodiment, the detection is mainly aimed at defects with a certain degree of aggregation. Defects with aggregation have a greater impact on the appearance quality or structural strength of the aluminum panel. Therefore, when the number of defect pixels in the surface image is greater than the preset threshold, the appearance quality or structural strength of the aluminum panel has been greatly affected. It can be determined that the detection result of the welding quality of the welded area to be tested of the aluminum panel is unqualified, which facilitates the processing of aluminum panels with unqualified detection results.
[0085] The preset quantity threshold can be set according to the actual situation of the aluminum panel or the sensitivity requirements of the detection. For example, the preset quantity threshold can be equal to the number of pixels in the surface image corresponding to 1% to 4% of the total area of the aluminum panel.
[0086] In one embodiment, the detection result of the welding quality of the welding area to be tested of the aluminum panel is obtained based on the area ratio or number of defect pixels in the surface image, including: determining that the detection result of the welding quality of the welding area to be tested of the aluminum panel is qualified when the area ratio of defect pixels in the surface image is less than or equal to a preset ratio threshold; or, determining that the detection result of the welding quality of the welding area to be tested of the aluminum panel is qualified when the number of defect pixels in the surface image is less than or equal to a preset number threshold.
[0087] If the welding quality of the welded area of the aluminum panel is found to be qualified, the aluminum panel can then be cooled and packaged after cooling.
[0088] The laser welding quality inspection method for aluminum single-panel processing provided in this application embodiment determines the suspicion level of a target pixel in the surface image of the weld area to be tested. This suspicion level is determined based on the difference between the gradient direction of the target pixel and the welding movement direction in the surface image. The aggregation level of the target pixel is determined based on the distance between pixels with the same gray value in the initial neighborhood of the target pixel. The product of the aggregation level and the suspicion level is used as the defect level of the target pixel. This allows for the adaptive determination of the segmentation threshold corresponding to the target pixel, thereby obtaining a more accurate detection result for the welding quality of the weld area to be tested in the aluminum single-panel.
[0089] Compared to detecting the welding quality of a welding area by measuring the reflectivity of the welding area, the defect degree value of the target pixel in this embodiment is determined based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction, as well as the distance between pixels with the same gray value in the initial neighborhood of the target pixel. This allows the welding quality detection result in this embodiment to avoid dependence on reflectivity, thereby enabling the detection of the welding quality of aluminum panels under more diverse lighting conditions.
[0090] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.
[0091] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for inspecting the quality of laser welding used in aluminum single-panel processing, characterized in that, include: Acquire a surface image of the welding area to be tested on the aluminum panel, and determine the degree of suspicion of the target pixel based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction. Based on the distance between pixels with the same gray value as the target pixel within the initial neighborhood of the target pixel, the clustering degree value corresponding to the target pixel is determined, and the product of the clustering degree value and the suspicion degree value is used as the defect degree value of the target pixel. Based on the defect severity value of the target pixel, determine the target neighborhood side length corresponding to the target pixel, and compare the target pixel with the target neighborhood range corresponding to the target neighborhood side length to determine the segmentation threshold corresponding to the target pixel. By using the segmentation threshold corresponding to the target pixel, it is determined whether the target pixel belongs to the defect pixel. Based on the area ratio or number of defect pixels in the surface image, the detection result of the welding quality of the welding area to be tested on the aluminum single panel can be obtained.
2. The laser welding quality inspection method for aluminum single-panel processing according to claim 1, characterized in that, Based on the difference between the gradient direction of the target pixel in the surface image and the welding movement direction, the suspicion level value of the target pixel is determined, including: ,in, Let be the suspicion level value of the target pixel, N be the total number of pixels in the surface image, and n be the number of pixels in the surface image with the same grayscale value as the target pixel. The angle corresponding to the gradient direction of the target pixel. The angle corresponding to the welding movement direction. It is the largest angle between the gradient direction and the welding movement direction among different pixels in the surface image.
3. The laser welding quality inspection method for aluminum single-panel processing according to claim 1, characterized in that, Based on the distance between pixels with the same grayscale value as the target pixel within its initial neighborhood, the clustering degree value corresponding to the target pixel is determined, including: Where E is the clustering degree value corresponding to the target pixel, norm is the normalization function, and m is the number of pixels with the same gray value as the target pixel in the initial neighborhood. denoted as , where is the distance between the a-th pixel and the b-th pixel within the initial neighborhood of the target pixel, which have the same grayscale value as the target pixel. h is the number of pixels within the initial neighborhood of the target pixel.
4. The laser welding quality inspection method for aluminum single-panel processing according to claim 1, characterized in that, Based on the defect severity value of the target pixel, determine the target neighborhood side length corresponding to the target pixel, including: Where H is the side length of the target neighborhood corresponding to the target pixel, L is the preset initial neighborhood side length, and S is the defect degree value of the target pixel. This indicates rounding up to the nearest integer.
5. The laser welding quality inspection method for aluminum single-panel processing according to claim 1, characterized in that, The segmentation threshold corresponding to the target pixel is determined by comparing it with the target neighborhood range corresponding to the side length of the target neighborhood, including: For a target neighborhood range centered on the target pixel and with a side length equal to the side length of the target neighborhood, determine the average and standard deviation of the gray values of the pixels within the target neighborhood range; The segmentation threshold corresponding to the target pixel is determined based on the average and standard deviation of the gray values of the pixels within the target neighborhood.
6. The laser welding quality inspection method for aluminum single-panel processing according to claim 1, characterized in that, Using the segmentation threshold corresponding to the target pixel, determine whether the target pixel belongs to the defective pixel, including: If the gray value of the target pixel is less than or equal to the corresponding segmentation threshold, the target pixel is determined to be a defective pixel. Alternatively, if the grayscale value of the target pixel is greater than the corresponding segmentation threshold, the target pixel is determined to be a non-defective pixel.
7. The laser welding quality inspection method for aluminum single-panel processing according to claim 1, characterized in that, Based on the area ratio or number of defect pixels in the surface image, the inspection results of the welding quality of the welded area to be tested on the aluminum panel are obtained, including: If the area ratio of defective pixels in the surface image is greater than a preset ratio threshold, the test result of the welding quality of the welded area to be tested in the aluminum panel is determined to be unqualified. Alternatively, if the number of defective pixels in the surface image exceeds a preset threshold, the weld quality of the tested welding area of the aluminum panel is determined to be unqualified.
8. The laser welding quality inspection method for aluminum single-panel processing according to claim 1, characterized in that, The surface image of the welded area to be tested on the aluminum panel was obtained in the following way: An initial image of the surface of the welded aluminum panel is acquired and input into a pre-trained image segmentation model to obtain the surface image output by the image segmentation model; the surface image includes the image region where the welded area to be tested is located in the initial image; The image segmentation model is used to segment the image region containing the welding area to be tested from the initial image.
9. The laser welding quality inspection method for aluminum single-panel processing according to claim 8, characterized in that, The image segmentation model is trained in the following way: Multiple sample images of the surfaces of different welded aluminum panels are acquired, and corresponding mask images are acquired. The multiple sample images correspond to different welded aluminum panels. The pixel values of the mask images are 0 except for the image area where the weld of the aluminum panel is located. The sample images are used as input to a pre-built network model, and the mask images of the corresponding sample images are used as output to train the network model using multiple sample images and multiple mask images. The trained network model is used as an image segmentation model.
10. The laser welding quality inspection method for aluminum single-panel processing according to claim 9, characterized in that, The pre-built network model can be any of the following: convolutional neural network, fully convolutional network, encoder-decoder structure, and region-based network.