Energy absorption box defect detection method based on image processing

Through grayscale image processing, the defect degree value of the energy-absorbing box weld is calculated, which solves the problem that it is difficult to detect defects of the energy-absorbing box weld in the prior art, and ensures its absorption capacity during collision.

CN119151935AActive Publication Date: 2024-12-17WUJIANG CITY XINSHEN ALUMINUM TECH DEV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411648204.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2024-12-17
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect defects in the weld of the energy-absorbing box, making it difficult to ensure the energy-absorbing box's ability to absorb collision energy.

Method used

By obtaining the surface grayscale image of the energy-absorbing box weld, determine the standard deviation of the grayscale value in the edge pixel point and the minimum external rectangle, calculate the parameter value of the target edge line, and calculate the parameter value of the neighboring edge line, and calculate the welding at Defect degree value, if the threshold value exceeds, the prompt message will be output.

Benefits of technology

Effectively characterize the impact of defects in the weld on the structural strength of the energy-absorbing box, realize the detection of the defects of the energy-absorbing box, and ensure its absorption capacity during collision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151935A_ABST
    Figure CN119151935A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to an energy absorption box defect detection method based on image processing. The method comprises the following steps: acquiring a surface gray level image of a welding seam of a to-be-detected energy absorption box, and acquiring an edge line formed by connecting adjacent edge pixel points in the surface gray level image; determining a minimum enclosing rectangle of a target edge line in the plurality of edge lines, and determining a standard deviation of gray values of pixel points within the minimum enclosing rectangle; determining a first parameter value of the target edge line according to the standard deviation of the gray values of the pixel points within the minimum enclosing rectangle of the target edge line; and determining a second parameter value of the target edge line according to the first parameter value of the target edge line, the area of the minimum enclosing rectangle and the first parameter value of the reference edge line so as to obtain a defect degree value of the to-be-detected energy absorption box, and outputting prompt information under the condition that the defect degree value is greater than a preset threshold value. By means of the technical scheme, defect detection of the energy absorption box can be effectively achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image data processing, and in particular to an energy absorption box defect detection method based on image processing. Background Art

[0002] The energy absorption box is an important energy absorption device in the automobile bumper system. The energy absorption box can be installed inside the front bumper of the vehicle, at the front end of the front longitudinal beam and at the bottom structure of the vehicle. The energy absorption box is mainly used to absorb and disperse the energy of the collision when the vehicle collides, thereby protecting the body structure and reducing the damage to passengers caused by the collision. The existence of the energy absorption box improves the passive safety of the vehicle and can reduce the maintenance cost of the vehicle caused by the collision.

[0003] The energy absorption box can be welded by an energy absorption tube and a mounting plate. By performing defect detection on the weld of the energy absorption box, possible abnormalities in the weld of the energy absorption box can be discovered in time to ensure the energy absorption box's ability to absorb collision energy.

[0004] When performing defect detection on a weld, a Chinese patent application document with publication number CN117630014A provides a weld detection method, including: receiving image information of a component to be detected; the image information includes a plurality of pictures; receiving resolution information of the component, the resolution information including information characterizing the defect type and defect characteristics of the component; extracting image contour features and regional features of the picture; and determining a quality judgment result of the component based on the resolution information, the image contour features and the regional features.

[0005] In the related art, defects in welds are mainly detected through defect types and defect characteristic information. However, the characteristics of defects in welds are relatively diverse, and it is difficult to detect defects in welds through limited defect characteristic information. Therefore, it is difficult to effectively detect defects in energy absorption boxes. Summary of the invention

[0006] In order to overcome the problem that it is difficult to effectively detect defects of energy absorbing boxes in related technologies, the present application provides an energy absorbing box defect detection method based on image processing, including: obtaining a surface grayscale image of a weld of an energy absorbing box to be detected, and determining edge pixel points in the surface grayscale image to obtain an edge line formed by connecting adjacent edge pixel points; for a target edge line among multiple edge lines, determining a minimum circumscribed rectangle of the target edge line, and determining the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle; determining a first parameter value of the target edge line according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line, and the first parameter value is positively correlated with the standard deviation; determining a second parameter value of the target edge line according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle and the first parameter value of the reference edge line; the reference edge line is another edge line with the largest first parameter value within the neighborhood of the target edge line; taking the sum of the second parameter values ​​of all target edge lines in the grayscale image as the defect degree value of the weld of the energy absorbing box to be detected, so as to output a prompt message when the defect degree value is greater than a preset threshold; the prompt message is used to prompt that there is an abnormality in the welding of the energy absorbing box to be detected.

[0007] In this way, the second parameter value of the target edge line is determined according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle and the first parameter value of the reference edge line; the reference edge line is the other edge line with the largest first parameter value within the neighborhood of the target edge line, and the first parameter value is determined according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line. The first parameter value can characterize the probability that the edge line is located in the pit of the weld. When there are other edge lines with a high probability of being located in the pit within the neighborhood of the edge line with a high probability of being located in the pit, it means that there is a high probability of dense pits in the weld of the energy absorption box, which makes the impact on the structural strength of the energy absorption box greater. Therefore, the defect degree value of the weld of the energy absorption box to be detected can effectively characterize the impact of the defects in the weld on the structural strength of the energy absorption box, and can effectively realize the defect detection of the energy absorption box.

[0008] Optionally, determining the first parameter value of the target edge line according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line includes: , where p is the first parameter value of the target edge line, exp is an exponential function with a natural constant as the base, r is the shape parameter of the minimum circumscribed rectangle of the target edge line, norm is a normalization function, v is the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line; f is the third parameter value of the target edge line, and the third parameter value is used to characterize the probability that the target edge line is located at the weld.

[0009] In this way, by combining the shape parameters of the minimum circumscribed rectangle of the target edge line according to the shape parameters of the minimum circumscribed rectangle of the target edge line and the variance of the grayscale values ​​of the pixels within the minimum circumscribed rectangle to obtain the first parameter value of the target edge line, it is helpful to determine the degree of influence of the concave hole defect in the surface grayscale image on the energy absorption box through the first parameter value.

[0010] Optionally, the third parameter value of the target edge line is determined by: , where f is the third parameter value of the target edge line, To obtain the minimum value, is the number of pixels in the surface grayscale image that are located at the same horizontal position as the center of the minimum circumscribed rectangle of the target edge line, W is the width of the surface grayscale image, is the number of pixels in the surface grayscale image that are located at the same vertical position as the center of the minimum circumscribed rectangle of the target edge line, H is the height of the surface grayscale image, is the number of edge lines in the cluster where the target edge line is located after clustering the edge lines in the surface grayscale image. is the number of all edge lines in the surface grayscale image.

[0011] In this way, since there are more edge lines in the weld area of ​​the surface grayscale image and the edge lines in the weld area are more concentrated, the probability that the target edge line is located in the weld of the surface grayscale image can be effectively characterized by the determined third parameter value of the target edge line.

[0012] Optionally, the third parameter value of the target edge line is determined in the following manner: performing a closure detection on the target edge line to determine whether the target edge line is closed; when the target edge line is closed, using a first preset positive number as the third parameter value of the target edge line; when the target edge line is not closed, using a second preset positive number as the third parameter value of the target edge line, the second preset positive number being smaller than the first preset positive number.

[0013] Optionally, the shape parameters of the minimum circumscribed rectangle of the target edge line are determined by: determining the aspect ratio and height-to-width ratio of the minimum circumscribed rectangle of the target edge line; and taking the largest of the aspect ratio and the height-to-width ratio as the shape parameters.

[0014] In this way, by determining the aspect ratio and height-to-width ratio of the minimum circumscribed rectangle of the target edge line and taking the largest of the aspect ratio and the height-to-width ratio as the shape parameter, the shape parameter can be used to better characterize the shape of the minimum circumscribed rectangle of the target edge line, thereby characterizing the shape of the target edge line.

[0015] Optionally, determining the second parameter value of the target edge line according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle, and the first parameter value of the reference edge line includes: , M is the second parameter value of the target edge line, p is the first parameter value of the target edge line, norm is the normalization function, m is the area of ​​the minimum circumscribed rectangle of the target edge line, and t is the first parameter value of the reference edge line of the target edge line.

[0016] Optionally, the surface grayscale image of the weld of the energy absorption box to be inspected is obtained in the following manner: obtaining an initial grayscale image of the weld of the energy absorption box to be inspected; inputting the initial grayscale image into a pre-trained image segmentation model to obtain a surface grayscale image of the weld output by the image segmentation model; the image segmentation model is used to set the pixel values ​​of other pixel points in the initial grayscale image except the image area where the weld is located to 0.

[0017] Optionally, the energy absorption box to be inspected is fixed on a fixing mechanism, and the method further includes: when the defect degree value is less than or equal to a preset threshold value, controlling the moving mechanism to remove the energy absorption box to be inspected from the fixing mechanism, and controlling the moving mechanism to place the next energy absorption box to be inspected on the fixing mechanism, so as to perform defect detection on the next energy absorption box to be inspected.

[0018] In this way, when the defect degree value is less than or equal to the preset threshold value, it means that the structural strength of the energy absorption box to be detected is affected to a small extent, and the energy absorption box to be detected can reach the expected structural strength. By controlling the moving mechanism to remove the energy absorption box to be detected from the fixed mechanism, and controlling the moving mechanism to place the next energy absorption box to be detected on the fixed mechanism, so as to perform defect detection on the next energy absorption box to be detected, continuous detection of multiple energy absorption boxes to be detected can be achieved.

[0019] The technical solution provided by the embodiments of the present application may include the following beneficial effects: determining the second parameter value of the target edge line according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle and the first parameter value of the reference edge line; the reference edge line is the other edge line with the largest first parameter value within the neighborhood of the target edge line, and the first parameter value is determined according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line, the first parameter value can characterize the probability that the edge line is located in the pit of the weld, and when there are other edge lines with a high probability of being located in the pit within the neighborhood of the edge line with a high probability of being located in the pit, it indicates that there is a high probability of dense pits in the weld of the energy absorption box, which has a greater impact on the structural strength of the energy absorption box. Therefore, the defect degree value of the weld of the energy absorption box to be detected can effectively characterize the impact of the defects in the weld on the structural strength of the energy absorption box, and can effectively realize defect detection of the energy absorption box.

[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0022] Figure 1 The figure is a flow chart of a method for detecting defects of energy absorption boxes based on image processing according to an exemplary embodiment. DETAILED DESCRIPTION

[0023] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0024] First, the application scenario of the embodiment of the present application is briefly introduced. In the application scenario of the present application, defect detection of the weld can be performed to achieve defect detection of the product connected by welding. The energy absorption box can be welded by an energy absorption tube and a mounting plate.

[0025] When performing defect detection on welds, the related technology mainly detects defects such as scratches that may exist on the surface of the welds. The energy absorption box is mainly used to absorb collision energy when a vehicle is hit, so as to reduce the impact of the collision on the vehicle body. Therefore, when the welds of the energy absorption box are inspected, the surface scratches of the welds have a smaller impact on the energy absorption box, and the related technology finds it difficult to achieve effective detection of defects in the energy absorption box.

[0026] In view of the above technical problems, the present application provides an energy absorption box defect detection method based on image processing. Figure 1 is a flow chart of a method for detecting energy absorption box defects based on image processing according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.

[0027] In step S101, a surface grayscale image of a weld of an energy absorbing box to be inspected is obtained, and edge pixel points in the surface grayscale image are determined to obtain an edge line formed by connecting adjacent edge pixel points.

[0028] The surface image of the weld of the energy absorbing box to be inspected can be acquired by an image acquisition device, and the surface image of the weld is grayed to obtain a surface gray image of the weld.

[0029] In one embodiment, a surface grayscale image of a weld of an energy absorption box to be inspected is obtained by: obtaining an initial grayscale image of a weld of the energy absorption box to be inspected; inputting the initial grayscale image into a pre-trained image segmentation model to obtain a surface grayscale image of the weld output by the image segmentation model; the image segmentation model is used to set the pixel values ​​of other pixel points in the initial grayscale image except for the image area where the weld is located to 0.

[0030] For example, the pixel values ​​of other pixel points in the initial grayscale image of the welding point of the energy absorption box except the image area where the weld is located can be marked as 0 to obtain a weld mask image corresponding to the initial grayscale image; the initial grayscale image of the welding point of the energy absorption box is used as the input of the pre-constructed network model, and the weld mask image corresponding to the initial grayscale image is used as the output of the network model, so as to realize the training of the network model, and the trained network model is used as the image segmentation model.

[0031] In this way, by inputting the initial grayscale image into the pre-trained image segmentation model, the influence of other areas other than the weld of the energy absorption box on the defect detection of the energy absorption box can be minimized, thereby obtaining a more accurate defect detection result for the energy absorption box.

[0032] Compared with defects such as scratches on the surface of the weld, the pits on the weld surface will directly affect the energy absorption capacity of the energy absorption box when it is hit. The pits usually have a certain grayscale difference from other surrounding areas in the surface grayscale image, which makes the pits have certain edge features in the surface image. Therefore, by determining the edge pixels in the surface grayscale image, it is helpful to determine the pits in the surface grayscale image, thereby determining the degree of influence of the pits in the weld on the structural strength of the energy absorption box, so as to better realize the defect detection of the energy absorption box.

[0033] Edge detection can be performed on the surface grayscale image to obtain edge pixels in the surface grayscale image. The image operator for edge detection can be an operator such as a Sobel operator, a Prewitt operator, a Canny operator, and a Laplacian operator. The embodiment of the present application does not limit the operator used for edge detection. The gradient value of the pixel point in the grayscale image can be obtained through the edge detection operator, so that the pixel point with a gradient value greater than a preset gradient threshold is regarded as an edge pixel point.

[0034] If the gradient value of a pixel point is greater than the preset gradient threshold, it means that the grayscale value difference between the pixel point and other adjacent pixels is large, and the surface of the weld usually appears as relatively continuous pixels. Therefore, the edge pixels in the surface grayscale image can be effectively determined based on the gradient value of the pixel point. The preset gradient threshold can be set in advance according to actual needs. For example, the preset gradient threshold can be between 10 and 20.

[0035] Adjacent edge pixel points can form an edge line. In the weld of the energy absorption box, for example, the weld between the energy absorption tube of the energy absorption box and the mounting plate, there is a certain degree of difference in the grayscale value between the area with the pit defect and other surrounding areas, so that the edge line of the pit area of ​​the weld of the energy absorption box corresponds to the edge line in the surface grayscale image.

[0036] In step S102 , for a target edge line among the plurality of edge lines, a minimum bounding rectangle of the target edge line is determined, and a standard deviation of the grayscale values ​​of the pixels within the minimum bounding rectangle is determined.

[0037] After the energy absorbing tube and the mounting plate are welded to obtain the energy absorbing box, the solubility of the gases (such as hydrogen and nitrogen) at the high temperature of the welding part of the energy absorbing box will increase in the molten pool metal. As the molten pool cools, the solubility of these gases will decrease. If the gases fail to escape from the molten pool in time, pores will be formed on the surface of the weld, affecting the energy absorbing box's ability to absorb collision energy.

[0038] The pores on the surface of the weld are usually circular or elliptical. Therefore, by determining the minimum circumscribed rectangle of the target edge line, it is helpful to determine the shape characteristics of the actual corresponding position of the target edge line in the energy absorption box, thereby determining whether the target edge line is a pit or pore on the surface of the energy absorption box.

[0039] For example, when the minimum circumscribed rectangle appears as a long and narrow rectangle, the probability that the defect at the position corresponding to the target edge line in the energy absorption box is a pit or a pore is low; when the minimum circumscribed rectangle appears in the positive direction, the target edge line has a higher probability of being a pore defect on the weld surface of the energy absorption box.

[0040] Due to the existence of pores or pits on the weld surface, the light reflection ability at the pores or pits changes, so that the pixel value at the pores or pits in the surface grayscale image changes; if the target edge line is located at the pore or pit, in the minimum circumscribed rectangle of the target edge line, due to the simultaneous existence of pore defects and other areas except the pore defects, or the simultaneous existence of pit defects and other areas except the pit defects, the number of types of pixel values ​​of each pixel point in the minimum circumscribed rectangle of the edge line is richer, and the degree of difference of the pixel values ​​of each pixel point in the minimum circumscribed rectangle of the edge line is increased.

[0041] For the pixels within the minimum circumscribed rectangle of the target edge line, the larger the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle, the greater the probability that the area within the target edge line is located at a pit defect or a pore.

[0042] Alternatively, as the depth of the pit defect or the porosity defect increases, the change in the pixel value of the pixel points in the area within the target edge line increases, while the grayscale value of the pixel points outside the target edge line and within the minimum circumscribed rectangle is close to the overall grayscale value of the weld area, so that the deeper the pit defect or porosity in the area within the target edge line, the greater the standard deviation of the grayscale value of the pixel points within the minimum circumscribed rectangle. Therefore, the greater the standard deviation of the grayscale value of the pixel points within the minimum circumscribed rectangle, the deeper the pit defect or porosity in the area within the target edge line.

[0043] In step S103, a first parameter value of the target edge line is determined according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line.

[0044] The first parameter value is positively correlated with the standard deviation, that is, the larger the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line, the larger the first parameter value of the target edge line; or, the smaller the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line, the smaller the first parameter value of the target edge line.

[0045] In one embodiment, determining the first parameter value of the target edge line according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line includes: , where p is the first parameter value of the target edge line, exp is an exponential function with a natural constant as the base, r is the shape parameter of the minimum circumscribed rectangle of the target edge line, norm is a normalization function, v is the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line; f is the third parameter value of the target edge line, and the third parameter value is used to characterize the probability that the target edge line is located at the weld.

[0046] r is the shape parameter of the minimum circumscribed rectangle of the target edge line. By comparing the shape parameter of the minimum circumscribed rectangle of the target edge line with 1, since the pores or pits in the weld are usually circular or elliptical, the closer the shape parameter of the minimum circumscribed rectangle of the target edge line is to 1, the higher the probability that the target edge line is a pit or pore in the weld compared to the scratches or convex marks in the weld.

[0047] The surface grayscale image may include the edge of the weld, or may include other areas outside the weld, such as areas on a mounting plate or an energy absorbing tube. In order to facilitate the determination of defects in the weld, the third parameter value of the target edge line can be determined. The third parameter value is used to characterize the probability that the target edge line is located in the weld. There is a difference in shape or color between the weld and other areas except the weld. Therefore, the third parameter value of the target edge line can be determined based on the color characteristics or shape characteristics of the target edge line.

[0048] Since the light reflection ability of the pores or concave holes in the weld is different from that of the normal area in the weld, when the target edge line is a pit or pore defect in the weld, the contrast of the grayscale value of the pixel points within the minimum circumscribed rectangle of the target edge line becomes larger, and the shape of the target edge line is close to a circle or an ellipse.

[0049] In this way, by combining the shape parameters of the minimum circumscribed rectangle of the target edge line according to the shape parameters of the minimum circumscribed rectangle of the target edge line and the variance of the grayscale values ​​of the pixels within the minimum circumscribed rectangle to obtain the first parameter value of the target edge line, it is helpful to determine the degree of influence of the concave hole defect in the surface grayscale image on the energy absorption box through the first parameter value.

[0050] In one embodiment, the shape parameters of the minimum circumscribed rectangle of the target edge line are determined by: determining the aspect ratio and height-to-width ratio of the minimum circumscribed rectangle of the target edge line; and taking the largest of the aspect ratio and the height-to-width ratio as the shape parameters.

[0051] If the target edge line is a weld edge, scratch or convex mark in the weld, the minimum circumscribed rectangle of the target edge line is a long and narrow rectangle, and the maximum of the aspect ratio and the height-to-width ratio of the minimum circumscribed rectangle is large, for example, the maximum of the aspect ratio and the height-to-width ratio is greater than 3; if the target edge line is a pit or pore in the weld, since the shape of the pit or pore is close to a circle or an ellipse, the minimum circumscribed rectangle of the target edge line is a square or other rectangle close to a square, so that the maximum of the aspect ratio and the height-to-width ratio of the minimum circumscribed rectangle is small, for example, the maximum of the aspect ratio and the height-to-width ratio is between 1 and 1.5.

[0052] The aspect ratio of the minimum enclosing rectangle is the ratio of the width to the height of the minimum enclosing rectangle; the height-to-width ratio of the minimum enclosing rectangle is the ratio of the height to the width of the minimum enclosing rectangle.

[0053] In this way, by determining the aspect ratio and height-to-width ratio of the minimum circumscribed rectangle of the target edge line and taking the largest of the aspect ratio and the height-to-width ratio as the shape parameter, the shape parameter can be used to better characterize the shape of the minimum circumscribed rectangle of the target edge line, thereby characterizing the shape of the target edge line.

[0054] In one embodiment, the third parameter value of the target edge line is determined by: , where f is the third parameter value of the target edge line, To obtain the minimum value, is the number of pixels in the surface grayscale image that are located at the same horizontal position as the center of the minimum circumscribed rectangle of the target edge line, W is the width of the surface grayscale image, is the number of pixels in the surface grayscale image that are located at the same vertical position as the center of the minimum circumscribed rectangle of the target edge line, H is the height of the surface grayscale image, is the number of edge lines in the cluster where the target edge line is located after clustering the edge lines in the surface grayscale image. is the number of all edge lines in the surface grayscale image.

[0055] The edge lines in the surface grayscale image can be clustered. Compared with the boundaries of the weld and other areas except the weld in the surface grayscale image, the texture in the weld area is richer, so there are more edge lines in the weld area in the surface grayscale image. Therefore, the clusters obtained after clustering are mainly located in the weld area in the surface grayscale image. Therefore, the larger the ratio of the number of edge lines in the cluster where the target edge line is located to the number of all edge lines in the surface grayscale image after clustering, the more likely the target edge line is to be located in the weld of the energy absorption box.

[0056] Compared with the edge line located at the weld in the surface grayscale image, the edge lines in other areas outside the weld in the surface grayscale image are more isolated, and the number of pixels in the surface grayscale image that are located at the same horizontal position as the center of the minimum circumscribed rectangle of the target edge line is smaller, or the number of pixels in the surface grayscale image that are located at the same vertical position as the center of the minimum circumscribed rectangle of the target edge line is smaller. Therefore, the number of pixels in the surface grayscale image that are located at the same vertical position as the center of the minimum circumscribed rectangle of the target edge line and the number of pixels in the surface grayscale image that are located at the same horizontal position as the center of the minimum circumscribed rectangle of the target edge line can effectively be used to screen the edge line located at the weld in the surface grayscale image.

[0057] In this way, since there are more edge lines in the weld area of ​​the surface grayscale image and the edge lines in the weld area are more concentrated, the probability that the target edge line is located in the weld of the surface grayscale image can be effectively characterized by the determined third parameter value of the target edge line.

[0058] In another embodiment, the third parameter value of the target edge line can also be determined in the following manner: perform a closure detection on the target edge line to determine whether the target edge line is closed; when the target edge line is closed, use a first preset positive number as the third parameter value of the target edge line; when the target edge line is not closed, use a second preset positive number as the third parameter value of the target edge line, and the second preset positive number is smaller than the first preset positive number.

[0059] Since the scratches or convex marks in the weld of the energy absorption box appear as non-closed edge lines, and the pores or pits in the weld appear as circular or elliptical areas, the edge lines of the pores or pits appear as closed edge lines. Therefore, the probability that the closed target edge line is a pit or pore defect in the weld of the energy absorption box is greater.

[0060] Moreover, for other areas other than the weld of the surface grayscale image, the edge lines also mainly appear as non-closed, for example, appear as vertical or horizontal edge lines. Therefore, by determining whether the target edge line is closed, it is possible to distinguish between the pits and other parts except the pits in the surface grayscale image. The third parameter value of the target edge line can effectively characterize the probability that the target edge line is located in the weld of the surface grayscale image.

[0061] Among them, the first preset positive number can be 1, and the second preset positive number can be 0.01, 0.02, 0.03 and other positive numbers less than 1, so as to assign a higher value to the third parameter value of the target edge line when the target edge line is closed, and assign a lower value to the third parameter value of the target edge line when the target edge line is not closed.

[0062] In step S104, a second parameter value of the target edge line is determined according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle, and the first parameter value of the reference edge line.

[0063] The reference edge line is the other edge line with the largest first parameter value within the neighborhood of the target edge line. Since the edge line with a larger first parameter value is more likely to be a pit in the weld, and the pits or pore defects that may exist in the energy absorption box have a greater impact on the structural strength of the energy absorption box, if there are other edge lines with larger first parameter values ​​within the neighborhood of the target edge line, it means that the structural strength of the energy absorption box near the target edge line is greatly affected.

[0064] Therefore, the second parameter value of the target edge line is determined based on the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle and the first parameter value of the reference edge line. The second parameter value of the target edge line can characterize the extent to which the structural strength of the energy absorption box at the target edge is affected.

[0065] In one embodiment, determining the second parameter value of the target edge line according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle, and the first parameter value of the reference edge line includes: , M is the second parameter value of the target edge line, p is the first parameter value of the target edge line, exp is an exponential function with a natural constant as the base, norm is a normalization function, m is the area of ​​the minimum circumscribed rectangle of the target edge line, and t is the first parameter value of the reference edge line of the target edge line.

[0066] For pits of the same depth in the weld, the larger the area of ​​the pit, the greater the impact on the structural strength of the energy absorption box; for pits of the same area, the greater the depth of the pit, the greater the impact on the structural strength of the energy absorption box, and the first parameter value of the target edge line can characterize the probability that the target edge line is located in the pit; or, in the case where the target edge line is located in the pit, the first parameter value of the target edge line can characterize the depth of the pit where the target edge line is located.

[0067] At the same time, the distance between the pit defects in the weld will also affect the degree of influence on the structural strength of the energy absorption box. Compared with the presence of other pits around the pit, the impact on the structural strength of the energy absorption box is greater when there are no other pits around the pit.

[0068] In this way, the second parameter value of the target edge line is determined by the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle and the first parameter value of the reference edge line. The second parameter value can characterize the degree of influence of the position of the target edge line on the structural strength of the energy absorption box.

[0069] In step S105, the sum of the second parameter values ​​of all target edge lines in the grayscale image is used as the defect level value of the weld of the energy absorption box to be detected, so as to output a prompt message when the defect level value is greater than a preset threshold.

[0070] The prompt information is used to indicate that there is an abnormality in the welding of the energy absorption box to be tested. When the defect degree value is greater than the preset threshold, it means that the structural strength of the energy absorption box is greatly affected. After the energy absorption box is installed on the vehicle, it will be difficult to achieve the ideal absorption effect of the collision energy. By indicating that there is an abnormality in the welding of the energy absorption box to be tested, the defective energy absorption box can be prevented from being installed on the vehicle.

[0071] Through the energy absorption box defect detection method based on image processing provided by the embodiment of the present application, the second parameter value of the target edge line is determined according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle and the first parameter value of the reference edge line; the reference edge line is the other edge line with the largest first parameter value within the neighborhood of the target edge line, and the first parameter value is determined according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line. The first parameter value can characterize the probability that the edge line is located in the pit of the weld. When there are other edge lines with a high probability of being located in the pit within the neighborhood of the edge line with a high probability of being located in the pit, it means that there is a high probability of dense pits in the weld of the energy absorption box, which makes the structural strength of the energy absorption box have a large impact. Therefore, the defect degree value of the weld of the energy absorption box to be detected can effectively characterize the impact of the defects in the weld on the structural strength of the energy absorption box, and can effectively realize the defect detection of the energy absorption box.

[0072] In one embodiment, the energy absorption box to be inspected is fixed on a fixing mechanism, and when the defect degree value is less than or equal to a preset threshold value, the moving mechanism can be controlled to remove the energy absorption box to be inspected from the fixing mechanism, and the moving mechanism can be controlled to place the next energy absorption box to be inspected on the fixing mechanism to perform defect detection on the next energy absorption box to be inspected.

[0073] In this way, when the defect degree value is less than or equal to the preset threshold value, it means that the structural strength of the energy absorption box to be detected is affected to a small extent, and the energy absorption box to be detected can reach the expected structural strength. By controlling the moving mechanism to remove the energy absorption box to be detected from the fixed mechanism, and controlling the moving mechanism to place the next energy absorption box to be detected on the fixed mechanism, so as to perform defect detection on the next energy absorption box to be detected, continuous detection of multiple energy absorption boxes to be detected can be achieved.

[0074] For example, the fixing mechanism may be a device provided with a clamp, which clamps the energy absorption box to be inspected so that the image acquisition device can acquire the surface image of the welding part of the energy absorption box to be inspected. The fixing mechanism, the moving mechanism and the device for inspecting the energy absorption box may be communicatively connected so that control instructions can be transmitted between different devices.

[0075] The moving mechanism may be a movable robot with a mechanical arm, for example, a movable robot that has pre-completed hand-eye calibration, so as to achieve movement of the energy absorbing box to be detected in space.

[0076] Hand-eye calibration refers to the calibration of the correspondence between the image coordinate system and the spatial coordinate system, so that the robot can determine the actual position of the target object in the image coordinate system in the spatial coordinate system through the captured image, thereby facilitating the robot to move the target object to the position in the spatial coordinate system.

[0077] It should be understood that the features of some embodiments of the various applications described herein may be combined with each other unless specifically stated otherwise.

[0078] Although terms such as "first", "second", and "third" may be used herein to describe various components, parts, regions, layers, or sections, these components, parts, regions, layers, or sections are not limited to these terms. Instead, these terms are only used to distinguish one component, part, region, layer, or section from another component, part, region, layer, or section. Therefore, without departing from the teachings of the examples described herein, the first component, part, region, layer, or section mentioned in the examples may also be referred to as the second component, part, region, layer, or section.

[0079] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description herein, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0080] In addition, the word "exemplary" is used herein to mean serving as an example, instance, or diagram. Any aspect or design described herein as "exemplary" is not necessarily to be understood as being advantageous over other aspects or designs. Instead, the use of the word exemplary is intended to present concepts in a concrete manner. As used herein, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or".

[0081] Likewise, although the present application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding this specification and the accompanying drawings. With particular regard to the various functions performed by the components (e.g., elements, resources, etc.) described above, unless otherwise noted, the terms used to describe such components are intended to correspond to any component (functionally equivalent) that performs the specific functions of the described components, even if not structurally equivalent to the disclosed structures.

[0082] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application, and the specification and embodiments are only considered as exemplary.

[0083] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A method for detecting energy absorption box defects based on image processing. It is characterized in that include: Acquire a surface grayscale image of the weld of the energy absorption box to be inspected, and determine edge pixel points in the surface grayscale image to obtain an edge line formed by connecting adjacent edge pixel points; For a target edge line among the multiple edge lines, determining a minimum circumscribed rectangle of the target edge line, and determining a standard deviation of grayscale values ​​of pixels within the minimum circumscribed rectangle; Determine a first parameter value of the target edge line according to a standard deviation of grayscale values ​​of pixels within a minimum circumscribed rectangle of the target edge line, wherein the first parameter value is positively correlated with the standard deviation; Determine a second parameter value of the target edge line according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle, and the first parameter value of the reference edge line; The reference edge line is another edge line with the largest first parameter value within the neighborhood of the target edge line; The sum of the second parameter values ​​of all target edge lines in the grayscale image is used as the defect degree value of the welding part of the energy absorption box to be detected, so as to output a prompt message when the defect degree value is greater than a preset threshold value; The prompt information is used to prompt that there is an abnormality in the welding of the energy absorption box to be tested.

2. According to the image processing-based energy absorption box defect detection method of claim 1, It is characterized in that Determining a first parameter value of the target edge line according to the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line includes: , where p is the first parameter value of the target edge line, exp is an exponential function with a natural constant as the base, r is the shape parameter of the minimum circumscribed rectangle of the target edge line, norm is a normalization function, v is the standard deviation of the grayscale values ​​of the pixels within the minimum circumscribed rectangle of the target edge line; f is the third parameter value of the target edge line, and the third parameter value is used to characterize the probability that the target edge line is located at the weld.

3. The energy absorption box defect detection method based on image processing according to claim 2, It is characterized in that The third parameter value of the target edge line is determined by: , where f is the third parameter value of the target edge line, To obtain the minimum value, is the number of pixels in the surface grayscale image that are located at the same horizontal position as the center of the minimum circumscribed rectangle of the target edge line, W is the width of the surface grayscale image, is the number of pixels in the surface grayscale image that are located at the same vertical position as the center of the minimum circumscribed rectangle of the target edge line, H is the height of the surface grayscale image, is the number of edge lines in the cluster where the target edge line is located after clustering the edge lines in the surface grayscale image. is the number of all edge lines in the surface grayscale image.

4. The method for detecting energy absorption box defects based on image processing according to claim 2, It is characterized in that The third parameter value of the target edge line is determined by: Performing a closure check on the target edge line to determine whether the target edge line is closed; When the target edge line is closed, the first preset positive number is used as the third parameter value of the target edge line; When the target edge line is not closed, a second preset positive number is used as the third parameter value of the target edge line, and the second preset positive number is smaller than the first preset positive number.

5. The method for detecting energy absorption box defects based on image processing according to claim 2, It is characterized in that The shape parameters of the minimum circumscribed rectangle of the target edge line are determined in the following way: Determine the aspect ratio and height-to-width ratio of the minimum circumscribed rectangle of the target edge line; The maximum of the aspect ratio and the height-to-width ratio is used as the shape parameter.

6. The method for detecting energy absorption box defects based on image processing according to claim 1, It is characterized in that Determining a second parameter value of the target edge line according to the first parameter value of the target edge line, the area of ​​the minimum circumscribed rectangle, and the first parameter value of the reference edge line includes: , M is the second parameter value of the target edge line, p is the first parameter value of the target edge line, norm is the normalization function, m is the area of ​​the minimum circumscribed rectangle of the target edge line, and t is the first parameter value of the reference edge line of the target edge line.

7. The method for detecting energy absorption box defects based on image processing according to claim 1, It is characterized in that The surface grayscale image of the weld of the energy absorption box to be inspected is obtained by: Acquire an initial grayscale image of the welding portion of the energy absorption box to be inspected; The initial grayscale image is input into a pre-trained image segmentation model to obtain a surface grayscale image of the weld output by the image segmentation model; the image segmentation model is used to set the pixel values ​​of other pixel points in the initial grayscale image except the image area where the weld is located to 0.

8. The method for detecting defects of energy absorption boxes based on image processing according to any one of claims 1 to 7, It is characterized in that The energy absorption box to be detected is fixed on a fixing mechanism, and the method further includes: When the defect degree value is less than or equal to the preset threshold, the mobile mechanism is controlled to remove the energy absorption box to be detected from the fixed mechanism, and the mobile mechanism is controlled to place the next energy absorption box to be detected on the fixed mechanism to perform defect detection on the next energy absorption box to be detected.

Citation Information

Patent Citations

  • Concrete curing quality analysis method based on visual inspection

    CN115908411A

  • Case stamping quality detection method

    CN117764990A

  • Visual inspection method for surface defects of injection mold

    CN118071753A

  • Metal forging surface defect detection method based on image processing

    CN118096739A

  • Device for evaluating edge defects in a silicon wafer and method therof

    US20230289949A1