Lap joint type welding seam detection method based on Sigmoid bilinear function
By fitting laser stripe feature points using the Sigmoid bilinear function, the process of lap weld detection is simplified, solving the problems of complex algorithms and high computational load in existing technologies, and achieving efficient weld position calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV OF SCI & TECH
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies require complex algorithm combinations and high computational loads when detecting lap welds, especially when the laser stripe segments are inclined and interconnected, making it difficult to accurately calculate the weld position.
A method based on the Sigmoid bilinear function is adopted to extract the feature points of the laser stripes through nonlinear least squares fitting, fit a one-dimensional curve, and use its parameters to calculate the weld position, which simplifies the detection steps and reduces the amount of calculation.
It reduces the computational complexity and workload of lap weld inspection, and enables simple and efficient weld location calculation.
Smart Images

Figure CN122066686A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automated welding technology, specifically relating to a method for detecting lap welds based on the Sigmoid bilinear function. Background Technology
[0002] Lap welding is a process in which two metal plates (i.e., the upper metal plate A and the lower metal plate B) are partially overlapped and welded along the edge of the overlapping area. Therefore, the edge of the overlapping area of these two metal plates is the location of the lap weld. Figure 2 As shown. During automated lap welding, firstly, a laser line emitter built into the laser vision sensor is used to emit a laser line onto the metal plate (the laser line direction should be as perpendicular as possible to the normal direction of the edge of the overlapping area of the metal plate). Simultaneously, the camera built into the laser vision sensor captures an image of the overlapping area of the metal plate, i.e., a laser stripe image (e.g., ...). Figure 3 As shown in the image, metal plate A and metal plate B correspond to two staggered white laser stripes. Then, using image processing methods, these two laser stripe segments are detected in the laser stripe image, and the position of the weld is detected using the positional relationship of these two laser stripe segments.
[0003] The existing solutions have the following problems and drawbacks: they require detecting the specific positions of the two laser stripe segments corresponding to the upper and lower metal plates in the two-dimensional image, determining the start and end positions of these two laser stripe segments, and then calculating the weld position using the relative positional relationship between the start and end points of the laser stripe segments. This usually requires a combination of multiple complex algorithms, especially when the two laser stripe segments are significantly inclined and interconnected, such as... Figure 3 As shown, inspecting welds will be more difficult, and may even require the use of computationally complex and computationally intensive methods such as deep neural networks. Summary of the Invention
[0004] To address the aforementioned problems in existing technologies, this invention proposes a method for detecting lap welds based on the Sigmoid bilinear function. This method is rationally designed, overcomes the shortcomings of existing technologies, and achieves good results.
[0005] To achieve the above objectives, the present invention adopts the following solution: The lap weld detection method based on the Sigmoid bilinear function includes the following steps: Step 1: After preprocessing the input laser stripe image, extract the feature points of the laser stripes; Step 2: The laser stripes of the lap weld are presented as two staggered laser stripe segments and an intermediate transition laser stripe connecting them. Based on the Sigmoid bilinear function, nonlinear least squares fitting is performed using the feature points to obtain a one-dimensional curve passing through the two staggered laser stripe segments. The parameters of the fitted curve are used to obtain the straight lines L and R representing the laser stripe segments on the left and right sides, respectively, and the midpoint P of the transition curve Q connecting these two lines. Step 3: Select the feature points near the midpoint P, and use these feature points to fit a straight line S to characterize the intermediate transition laser stripe; Step 4: Calculate the intersection points of line S with line L and line R respectively, and take the intersection point with the larger y-axis coordinate as the final weld position detection result.
[0006] Furthermore, in step 1, the preprocessing operation includes grayscale and binarization processing, so that white dots in the binarized image correspond to laser stripes and black dots correspond to the image background; The minimum row coordinate method is used to extract the feature points of laser stripes from the binary image. Specifically, the white point with the smallest row coordinate value in each column of the image is taken as the feature point of that column. The feature point is regarded as a point in the xy coordinate system, where the column coordinate is the x-axis coordinate and the row coordinate is the y-axis coordinate.
[0007] Furthermore, in step 2, the expression for the sigmoid bilinear function Z is: ; in, , For the standard Sigmoid function Horizontal translation and horizontal scaling are used to achieve a smooth transition connection between line L and line R; and These are the slope and intercept of the line L, respectively; and Let be the slope and intercept of the line R, respectively; k is a parameter reflecting the inclination direction and steepness of the transition connection; x0 is the x-axis coordinate of the midpoint of the transition connection; parameters k, x0, ... , , and The values are all determined by the nonlinear least squares fitting, without the need for manual setting; After determining the parameters through the fitting process, the following results are obtained: and Let L be the slope and intercept of the straight line, which fits the laser stripe segment on the left; obtain the values of L and L respectively. and Let R be the slope and intercept of the straight line that fits the laser stripe segment on the right; the Sigmoid bilinear function fits the transition curve located in the transition region between the two laser stripe segments. To obtain the transition curve The midpoint P is given by coordinates (x0, Z(x0)).
[0008] Further, step 3 specifically includes: selecting feature points whose x-axis coordinates satisfy the condition (x0 - d) < x < (x0 + d) as feature points near the midpoint P, where d is a positive number; Using the selected feature points, a straight line S is obtained through linear fitting. The straight line S is used to characterize the intermediate transition laser stripe connecting the beginning and end of two laser stripe segments.
[0009] Furthermore, step 4 specifically includes: calculating the intersection point of line S and line L. Its coordinates are ; Calculate the intersection point of line S and line R. Its coordinates are ;Compare and The size of the intersection point with the larger y-axis coordinate is used as the weld inspection result. .
[0010] The beneficial technical effects of this invention are as follows: The detection method proposed in this invention does not require determining the specific positions of the two laser stripe segments. It only uses a sigmoid bilinear function to fit a one-dimensional curve that passes through the two laser stripe segments. Furthermore, the parameters of this function provide the main positional information of the two laser stripe segments and the positional information of the transition zone between them. Using this positional information, the coordinates of the weld can be calculated. Therefore, compared with existing technologies, this invention is simpler, has fewer calculation steps, and requires less computation, significantly reducing the computational complexity and workload of lap weld detection methods. Attached Figure Description
[0011] Figure 1 This is a flowchart of the lap weld detection method based on the Sigmoid bilinear function in this invention.
[0012] Figure 2 This is a schematic diagram of the lap weld in this invention.
[0013] Figure 3 This is the input image used in this invention.
[0014] Figure 4 This is the binarized image in this invention.
[0015] Figure 5 This is an image showing the location of feature points in this invention.
[0016] Figure 6 This is a curve diagram showing the location of feature points in this invention; Among them, (a) is the feature point position curve; (b) is the feature point position curve after local magnification.
[0017] Figure 7 The one-dimensional curve in this invention The fitting results are shown in the figure. Where (a) is a one-dimensional curve plotted in the xy coordinate system. (b) is a one-dimensional curve drawn on the input image. .
[0018] Figure 8 The function in this invention The shape of the curve and and A diagram illustrating the relationship between them.
[0019] Figure 9 This is a graph showing the fitting result of the straight line L in this invention; Wherein, (a) is the line L drawn in the xy coordinate system; (b) is the line L drawn on the input image.
[0020] Figure 10 The figure shows the fitting result of the straight line R in this invention; Wherein, (a) is the line R drawn in the xy coordinate system; (b) is the line R drawn on the input image.
[0021] Figure 11 Transition curve in this invention The fitting results and The location of the midpoint P; Wherein, (a) is the transition curve plotted in the xy coordinate system. (a) and its midpoint P; (b) is the transition curve drawn on the input image. and its midpoint P.
[0022] Figure 12 This is a graph showing the fitting result of the straight line S in this invention; Wherein, (a) is the line S drawn in the xy coordinate system; (b) is the line S drawn on the input image.
[0023] Figure 13 The figure shows the fitting result of the straight line S when there is no connection between the two laser stripe segments; Wherein, (a) is the input image; (b) is the line S drawn in the xy coordinate system; and (c) is the line S drawn on the input image.
[0024] Figure 14 This is a diagram showing the weld inspection results in this invention.
[0025] Figure 15 Example 1 shows the results of other detection results using the method of the present invention; (a) is the input image; (b) is a magnified view of the weld area; and (c) is the weld inspection result. Position coordinates on the input image.
[0026] Figure 16 Example 2 shows the results of other detection results using the method of the present invention; (a) is the input image; (b) is a magnified view of the weld area; and (c) is the weld inspection result. Position coordinates on the input image. Detailed Implementation
[0027] The specific embodiments of the present invention will be further described below with reference to specific examples: In the laser stripe image of the lap weld seam acquired by the laser vision sensor, the two overlapping metal plates appear as two staggered white laser stripe lines, such as... Figure 3 As shown in the figure. The proposed lap weld detection method based on the Sigmoid bilinear function performs binarization processing on the input laser stripe image, extracts the feature points of the laser stripes (hereinafter referred to as feature points, and each column of the image has at most one feature point), and uses the column coordinates and row coordinates of these feature points as the x-axis coordinates and y-axis coordinates, respectively. A one-dimensional curve that can pass through two laser stripe segments that are staggered left and right is fitted using the Sigmoid bilinear function. On this basis, the position coordinates of the weld on the laser stripe image are calculated by further utilizing the parameters of the Sigmoid bilinear function and combining the geometric characteristics of the laser stripes at the weld.
[0028] like Figure 1 As shown, the method specifically includes the following steps: Step 1: Process the input laser stripe image ( Figure 3 After preprocessing, feature points of the laser stripes are extracted; Specifically, the preprocessing operation includes sequential grayscale and binarization, so that white dots in the binarized image correspond to laser stripes, and black dots correspond to the image background, such as... Figure 4 As shown; The minimum row coordinate method is used to extract feature points of laser stripes from a binary image. Specifically, the white point with the smallest row coordinate value in each column of the image is taken as the feature point of that column. These feature points are considered as points in an xy coordinate system, where the column coordinates are used as the x-axis coordinates and the row coordinates as the y-axis coordinates. Figure 5 and Figure 6 As shown in (a) and (b).
[0029] Step 2: The laser stripes of the lap weld consist of two staggered laser stripe segments and an intermediate transition laser stripe connecting them. Based on the Sigmoid bilinear function shown in formula (1), a nonlinear least squares fitting is performed using feature points to obtain a one-dimensional curve passing through the two staggered laser stripe segments. ,like Figure 7 As shown in (a) and (b), where the red line is a one-dimensional curve. ; and by using the parameters of the fitted curve, the straight lines L and R representing the laser stripe segments on the left and right sides, and the midpoint P of the transition curve Q connecting these two straight lines are obtained respectively. The expression for the sigmoid bilinear function Z used is: (1) in, , For the standard Sigmoid function Horizontal translation and horizontal scaling are used to achieve a smooth transition connection between line L and line R; and These are the slope and intercept of the line L, respectively; and Here, represents the slope and intercept of the line R, respectively; k is a parameter reflecting the inclination direction and steepness of the transition connection; the larger the absolute value of this value, the steeper the transition connection, and vice versa; x0 is the x-axis coordinate of the midpoint of the transition connection, a function... The shape of the curve and The relationship between x and x0 is as follows Figure 8 As shown; parameters k, x0, , , and The values are all determined by the nonlinear least squares fitting, without the need for manual setting; After determining the parameters through the fitting process, the following results are obtained: and Let L be the slope and intercept of the straight line, which fits the laser stripe segment on the left, as shown. Figure 9 As shown in (a) and (b), where the red line is the straight line L; obtain respectively with and Let R be the slope and intercept of the straight line that fits the laser stripe segment on the right, as shown below. Figure 10 As shown in (a) and (b), where the red line is the straight line R; the Sigmoid bilinear function fits the transition curve located in the transition region between the two laser stripe segments (denoted as H). To obtain the transition curve Let P be the midpoint of H, with coordinates (x0, Z(x0)), and P is also approximately the midpoint of H, as shown below. Figure 11 As shown in (a) and (b), the red line is the transition curve. The green dot is P.
[0030] Step 3: In the middle of the transition zone H, the two laser stripe segments are connected end-to-end by a straight intermediate transition laser stripe, and the intersection of this intermediate transition laser stripe and the lower laser stripe segment is the location of the weld. Figure 2 and Figure 3 As shown, therefore, based on the midpoint P, neighboring feature points are selected, and a straight line S is obtained by fitting these feature points to characterize the intermediate transition laser stripe. and Let S be the intercept and slope of line S, respectively. Figure 12 As shown in (a) and (b), the red line is the straight line S; The method for selecting feature points near P is as follows: Select feature points whose x-axis coordinates satisfy the condition (x0 - d) < x < (x0 + d) as feature points near the midpoint P, where d is a positive number and its value should be as small as possible to avoid excessive deviation in the fitting result when fitting the intermediate transition laser stripe with the straight line S due to selecting too many points outside the laser stripe transition area. You can let d = 5. Furthermore, even if the two laser stripe segments are not connected end to end, such as Figure 13 As shown in (a), this method can also be used to fit a straight line S, and the straight line S can still connect the beginning and end of the two laser stripe segments, as shown in (a). Figure 13 As shown in (b) and (c), the red line is the straight line S.
[0031] Step 4: Calculate the intersection points of line S with line L and line R respectively. Let the intersection point of line S and line L be denoted as . Its coordinates are Let the intersection of line S and line R be . Its coordinates are ,Compare and The size of the intersection points is used, and the points with larger y-axis coordinates are taken as the final weld inspection results. .
[0032] contrast Figure 2 , Figure 3 , Figure 9 , Figure 10 and Figure 12 It can be seen that, in and In the image, points with smaller y-axis coordinates are located higher up, corresponding to... Figure 2 The turning point of the laser line on the left and top. Points with larger y-axis coordinates are located lower in the input image, corresponding to... Figure 2 The turning point of the laser line on the right side and below. This point represents the weld inspection result. ,therefore, yes and The point with the larger y-axis coordinate, such as Figure 14 As shown, the orange line represents the straight line S, and the green dots represent... Its location coordinates are (504, 435), and the red dot is... Its position coordinates are (514, 446), therefore These are the weld inspection results. .
[0033] like Figure 15 (a)~(c) and Figure 16 As shown in (a) to (c), two other examples of detection results using the method of the present invention are given. Figure 15 In (c), the orange line is the straight line S, and the green point is... Its location coordinates are (272, 449), and the red dot is... Its position coordinates are (282, 484), therefore These are the weld inspection results. ; Figure 16 In (c), the orange line is the straight line S, and the green point is... Its location coordinates are (314, 405), and the red dot is... Its position coordinates are (307, 448), therefore These are the weld inspection results. .
[0034] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A method for detecting lap welds based on the Sigmoid bilinear function, characterized in that, Includes the following steps: Step 1: After preprocessing the input laser stripe image, extract the feature points of the laser stripes; Step 2: The laser stripes of the lap weld are presented as two staggered laser stripe segments and an intermediate transition laser stripe connecting them. Based on the Sigmoid bilinear function, nonlinear least squares fitting is performed using the feature points to obtain a one-dimensional curve passing through the two staggered laser stripe segments. The parameters of the fitted curve are used to obtain the straight lines L and R representing the laser stripe segments on the left and right sides, respectively, and the midpoint P of the transition curve Q connecting these two lines. Step 3: Select the feature points near the midpoint P, and use these feature points to fit a straight line S to characterize the intermediate transition laser stripe; Step 4: Calculate the intersection points of line S with line L and line R respectively, and take the intersection point with the larger y-axis coordinate as the final weld position detection result.
2. The lap weld detection method based on the Sigmoid bilinear function according to claim 1, characterized in that, In step 1, the preprocessing operation includes grayscale and binarization processing, so that white points in the binarized image correspond to laser stripes and black points correspond to the image background. The minimum row coordinate method is used to extract the feature points of laser stripes from the binary image. Specifically, the white point with the smallest row coordinate value in each column of the image is taken as the feature point of that column. The feature point is regarded as a point in the xy coordinate system, where the column coordinate is the x-axis coordinate and the row coordinate is the y-axis coordinate.
3. The lap weld detection method based on the Sigmoid bilinear function according to claim 1, characterized in that, In step 2, the expression for the sigmoid bilinear function Z is: ; in, , For the standard Sigmoid function Horizontal translation and horizontal scaling are used to achieve a smooth transition connection between line L and line R; and These are the slope and intercept of the line L, respectively; and Let be the slope and intercept of the line R, respectively; k is a parameter reflecting the inclination direction and steepness of the transition connection; x0 is the x-axis coordinate of the midpoint of the transition connection; parameters k, x0, ... , , and The values are all determined by the nonlinear least squares fitting, without the need for manual setting; After determining the parameters through the fitting process, the results are obtained respectively using... and Let L be the slope and intercept of the straight line, which fits the laser stripe segment on the left; obtain the values of L and L respectively. and Let R be the slope and intercept of the straight line that fits the laser stripe segment on the right; the Sigmoid bilinear function fits the transition curve located in the transition region between the two laser stripe segments. To obtain the transition curve The midpoint P is given by coordinates (x0, Z(x0)).
4. The lap weld detection method based on the Sigmoid bilinear function according to claim 3, characterized in that, Step 3 specifically includes: selecting feature points whose x-axis coordinates satisfy the condition (x0 - d) < x < (x0 + d) as feature points near the midpoint P, where d is a positive number; Using the selected feature points, a straight line S is obtained through linear fitting. The straight line S is used to characterize the intermediate transition laser stripe connecting the beginning and end of two laser stripe segments.
5. The lap weld detection method based on the Sigmoid bilinear function according to claim 1, characterized in that, Step 4 specifically includes: calculating the intersection point of line S and line L. Its coordinates are ; Calculate the intersection point of line S and line R. Its coordinates are ;Compare and The size of the intersection point with the larger y-axis coordinate is taken as the weld inspection result. .