Method for calculating height of welding spot based on laser image

By calculating the height of the welding joints using a line laser and a two-dimensional camera, the problem of welding wire colliding welding joints during welding is solved, real-time posture adjustment of the welding gun is realized, and welding efficiency and quality are improved.

CN119478029APending Publication Date: 2025-02-18SHANGHAI ZHIYIN AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411493740.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

During the welding process, the prior art cannot obtain the height information of the welding joint, which causes the welding gun to be unable to adjust the position and angle in real time, causing the problem of welding wire colliding with the welding joint.

Method used

By using a line laser and a two-dimensional camera to obtain a two-dimensional image of the solder joint, combined with the Steger algorithm to identify the midpoint of the arc-shaped part of the laser line, calculate the height of the solder joint, and transfer the height to the welding gun, adjust its position to bypass it Solder joints.

Benefits of technology

It is realized that the welding joint height is calculated through laser images without adding hardware and changing the original workflow, so that the welding wire does not collide with the welding joints, and improves welding efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478029A_ABST
    Figure CN119478029A_ABST
Patent Text Reader

Abstract

The invention provides a method for calculating the height of a welding spot based on a laser image, and relates to the technical field of automatic welding, and the method comprises the following steps: S1, emitting laser rays towards the welding spot by using a line laser, and photographing the laser rays and the welding spot by using a two-dimensional camera; s2, the picture obtained in the step S1 is transmitted to a controller, the controller processes the received picture and calculates the height of the welding spot, and the calculated height of the welding spot is transmitted to a welding gun; s3, the welding gun receives the height of the welding spot calculated in the S2, the pose is adjusted according to the received height of the welding spot so as to bypass the welding spot, the height of the welding spot is calculated through a two-dimensional camera and a line laser existing in a workstation on the basis that hardware and an original working process are not increased, cost is saved, and implementation is easy; and the position and angle of the welding gun are adjusted in real time according to the height of the welding spot, so that the welding wire does not collide with the welding spot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of automated welding, and in particular to a method for calculating welding point height based on laser images. Background Art

[0002] During the welding process, the parts to be welded are generally connected through welds to form a workpiece. Although the weld is only a few millimeters high, it will affect the passage of the welding gun and cause the welding wire to hit the weld. Currently, the laser image only has a two-dimensional image of the weld and does not contain height information. The trajectory extracted from the CAD drawing by offline programming does not contain the height information of the weld. Therefore, how to obtain the height of the weld and adjust the position and angle of the welding gun in real time according to the height of the weld so that the welding wire does not hit the weld has become an urgent problem to be solved. Summary of the invention

[0003] The present invention discloses a method for calculating weld spot height based on laser images, which solves the problem that the weld spot height information cannot be obtained through laser images, so that the welding gun cannot adjust the position and angle in real time according to the weld spot height, resulting in the welding wire colliding with the weld spot. Without adding hardware and the original work process, the weld spot height is calculated through laser images, so that the welding wire does not collide with the weld spot.

[0004] To achieve the above object, the technical solution of the present invention is specifically implemented as follows:

[0005] The present invention discloses a method for calculating the height of a welding spot based on a laser image, comprising the following steps:

[0006] S1: Use a line laser to emit a laser line toward the welding point, and use a two-dimensional camera to take pictures of the laser line and the welding point;

[0007] S2: The photo acquired by S1 is transmitted to the controller, the controller processes the received photo and calculates the height of the welding spot, and transmits the calculated height of the welding spot to the welding gun;

[0008] S3: The welding gun receives the weld spot height calculated by S2 and adjusts its posture according to the received weld spot height to bypass the weld spot.

[0009] Furthermore, the specific implementation of step S2 includes:

[0010] S21: using the Steger algorithm to identify the midpoint P of the arc portion of the laser line from the photo, and recording the pixel coordinates P(u,v) of point P, where u and v are the pixel coordinate values ​​of P;

[0011] S22: Convert the pixel coordinates P(u,v) of point P to the world coordinates P(Z W ,Y W ,Z W );

[0012] S23: Every time the line laser moves forward one step, the two-dimensional camera takes a photo, identifies the points P1 and P2 of the two laser lines in the photo taken at the current position and the photo taken at the previous position adjacent to the current position, and calculates the distance L between P1 and P2;

[0013] S24: Calculate the height of the solder joint using the distance L between P1 and P2.

[0014] Furthermore, the specific implementation of step S21 is as follows:

[0015] Traverse u and find the point where the laser line v value is the smallest or largest, which is point P.

[0016] Furthermore, the specific implementation of step S22 is as follows:

[0017] The conversion relationship between pixel coordinates and world coordinates satisfies the following formula:

[0018]

[0019] in, is the internal parameter of the two-dimensional camera, is a known quantity, is the external parameter of the two-dimensional camera, is a known quantity, Z c is the Z of the camera coordinate system, u, v are the pixel coordinate values ​​of the point on the current photo, f is the focal length of the camera, R is the rotation matrix of the world coordinate system relative to the camera coordinate system, T is the offset of the world coordinate system relative to the camera coordinate system, and f x f / is the actual physical width of a pixel on the sensor chip. y f / is the actual physical size of a pixel on the photosensitive chip, u0, v0 are the pixel coordinate values ​​of the center point of the current photo, X W ,Y W ,Z W The value is in the world coordinate system.

[0020] Furthermore, the specific implementation of step S24 is as follows:

[0021] S241: The calculation formula for the solder joint height h is:

[0022] h=(DL)*tagθ

[0023] Among them, tagθ=h / (DL), angle θ is the angle between the laser line plane and the bottom surface, which is obtained from the position of the laser and is a known quantity; D=d, d is the horizontal moving distance from one laser line to the next laser line, which is calculated based on the moving speed and moving time of the laser;

[0024] S242: Repeat the above process to calculate the maximum h value, which is the height of the solder joint.

[0025] Beneficial technical effects:

[0026] 1. A method for calculating the height of a welding spot based on a laser image disclosed in the present invention comprises the following steps:

[0027] S1: Use a line laser to emit a laser line toward the welding point, and use a two-dimensional camera to take pictures of the laser line and the welding point;

[0028] S2: The photo acquired by S1 is transmitted to the controller, the controller processes the received photo and calculates the height of the welding spot, and transmits the calculated height of the welding spot to the welding gun;

[0029] S3: The welding gun receives the weld spot height calculated by S2, and adjusts its position according to the received weld spot height to bypass the weld spot. Without adding hardware and the original workflow, the existing two-dimensional camera and line laser of the workstation are used to calculate the weld spot height, which saves costs and is easy to implement.

[0030] 2. The present invention discloses a method for calculating the height of a weld spot based on a laser image. The height of the weld spot is calculated by a laser image, so that the welding gun can adjust its position and angle in real time according to the height of the weld spot so that the welding wire does not collide with the weld spot. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solution of the present invention, the drawings required for describing the embodiments are briefly introduced below.

[0032] Figure 1 A flowchart of the steps of a method for calculating the height of a welding spot based on a laser image disclosed in the present invention;

[0033] Figure 2 It is a schematic diagram of the positions of the welding point and point P;

[0034] Figure 3 Schematic diagram of the distance L between points P1 and P2 of two laser lines;

[0035] Figure 4 Schematic diagram of various parameters for calculating solder joint height. DETAILED DESCRIPTION

[0036] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0037] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0038] Unless otherwise specifically stated, the relative arrangement of the parts and steps described in these embodiments, numerical expressions and numerical values ​​do not limit the scope of the present invention. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. The technology, method and equipment known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the technology, method and equipment should be regarded as a part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once a certain item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.

[0039] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0040] In order to solve the problem of welding wire colliding with welding spots during welding, the present invention discloses a method for calculating welding spot height by using photos obtained by laser and two-dimensional camera without increasing hardware cost and changing the original work flow.

[0041] The method disclosed in the present invention is shown in Figure 1 , specifically including the following steps:

[0042] 1. A method for calculating the height of a welding spot based on a laser image, characterized in that it comprises the following steps:

[0043] S1: Use a line laser to emit a laser line toward the welding point, and use a two-dimensional camera to take pictures of the laser line and the welding point;

[0044] Specifically, a laser is used to emit a laser line obliquely toward the welding point. When the laser line shines on the welding point, a line of light with a convex part is formed, see Figure 2 ,At this time, a two-dimensional camera is used to take pictures;

[0045] S2: The photo acquired by S1 is transmitted to the controller, the controller processes the received photo and calculates the height of the welding spot, and transmits the calculated height of the welding spot to the welding gun;

[0046] Specifically, implementing step S2 specifically includes the following steps:

[0047] S21: using the Steger algorithm to identify the midpoint P of the arc portion of the laser line from the photo, and recording the pixel coordinates P(u,v) of point P, where u and v are pixel coordinates;

[0048] Preferably, the method for identifying point P is to traverse u to find the point where the laser line v value is the smallest or largest;

[0049] S22: Convert the pixel coordinates P(u,v) of point P to the world coordinates P(X W ,Y W ,Z W );

[0050] Specifically, the conversion relationship between pixel coordinates and world coordinates satisfies the following formula:

[0051]

[0052] in, is the internal parameter of the two-dimensional camera, is a known quantity, is the external parameter of the two-dimensional camera, is a known quantity, Z c is the Z of the camera coordinate system, u, v are the pixel coordinate values ​​of the point on the current photo, f is the focal length of the camera, R is the rotation matrix of the world coordinate system relative to the camera coordinate system, T is the offset of the world coordinate system relative to the camera coordinate system, and f x f / is the actual physical width of a pixel on the sensor chip. y f / is the actual physical size of a pixel on the photosensitive chip, u0, v0 are the pixel coordinate values ​​of the center point of the current photo, X W ,Y W ,Z W The value is in the world coordinate system.

[0053] S23: Every time the line laser moves forward one step, the two-dimensional camera takes a photo, identifies the points P1 and P2 of the two laser lines in the photo taken at the current position and the photo taken at the previous position adjacent to the current position, and calculates the distance L between P1 and P2;

[0054] Specifically, the laser emitting laser and the two-dimensional camera move synchronously. Every time the laser moves forward one step, the laser emits a line laser and the two-dimensional camera takes a photo, respectively identifying the P point P1 on the laser line in the photo taken at the current position and the P point P2 on the laser line in the photo taken at the previous position adjacent to the current position;

[0055] S24: Calculate the height of the solder joint using the distance L between P1 and P2.

[0056] Specifically, step S24 is implemented as follows:

[0057] S241: The calculation formula for the solder joint height h is:

[0058] h=(DL)*tagθ

[0059] Among them, tagθ=h / (DL), angle θ is the angle between the laser line plane and the bottom surface, which is obtained from the position of the laser and is a known quantity; D=d, d is the horizontal moving distance from one laser line to the next laser line, which is calculated based on the moving speed and moving time of the laser;

[0060] S242: Repeat the above process to calculate the maximum h value, which is the height of the solder joint.

[0061] S3: The welding gun receives the weld spot height calculated by S2 and adjusts its posture according to the received weld spot height to bypass the weld spot.

[0062] The method for calculating the height of a solder joint disclosed in the present invention utilizes existing hardware conditions and does not increase hardware costs, thereby saving costs; and the existing workflow remains unchanged, and only the system software of the old workstation needs to be updated.

[0063] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0064] The above embodiments are only descriptions of the preferred implementation modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary engineering and technical personnel in the field should fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for calculating solder joint height based on laser images, characterized in that: The following steps are involved: S1: Use a line laser to emit a laser line toward the welding point, and use a two-dimensional camera to take pictures of the laser line and the welding point; S2: The photo acquired by S1 is transmitted to the controller, the controller processes the received photo and calculates the height of the welding spot, and transmits the calculated height of the welding spot to the welding gun; S3: The welding gun receives the weld spot height calculated by S2 and adjusts its posture according to the received weld spot height to bypass the weld spot.

2. The method for calculating the height of a welding spot based on a laser image according to claim 1, characterized in that: The specific implementation of step S2 includes: S21: using the Steger algorithm to identify the midpoint P of the arc portion of the laser line from the photo, and recording the pixel coordinates P(u,v) of point P, where u and v are the pixel coordinate values ​​of point P; S22: Convert the pixel coordinates P(u,v) of point P to the world coordinates P(X W ,Y W ,Z W ); S23: Every time the line laser moves forward one step, the two-dimensional camera takes a photo, identifies the P points P1 and P2 of the two laser lines in the photo taken at the current position and the photo taken at the previous position adjacent to the current position, and calculates the distance L between P1 and P2; S24: Calculate the height of the solder joint using the distance L between P1 and P2.

3. The method for calculating the height of a welding spot based on a laser image according to claim 2, characterized in that: The specific implementation of step S21 is: Traverse u and find the point where the laser line v value is the smallest or largest, which is point P.

4. The method for calculating the height of a welding spot based on a laser image according to claim 2, characterized in that: The specific implementation of step S22 is: The conversion relationship between pixel coordinates and world coordinates satisfies the following formula: in, is the internal parameter of the two-dimensional camera, is a known quantity, is the external parameter of the two-dimensional camera, is a known quantity, Z c is the Z of the camera coordinate system, u, v are the pixel coordinate values ​​of the point on the current photo, f is the focal length of the camera, R is the rotation matrix of the world coordinate system relative to the camera coordinate system, T is the offset of the world coordinate system relative to the camera coordinate system, and f x is the actual physical width of a pixel on the sensor chip. y is the actual physical size of a pixel on the f / photosensitive chip, u0, v0 are the pixel coordinates of the center point of the current photo, X W ,Y W ,Z W The value is in the world coordinate system.

5. The method for calculating the height of a welding spot based on a laser image according to claim 2, characterized in that: The specific implementation of step S24 is: S241: The calculation formula for the solder joint height h is: h=(DL)*tagθ Among them, tagθ=h / (DL), angle θ is the angle between the laser line plane and the bottom surface, which is obtained from the position of the laser and is a known quantity; D=d, d is the horizontal moving distance from one laser line to the next laser line, which is calculated based on the moving speed and moving time of the laser; S242: Repeat the above process to calculate the maximum h value, which is the height of the solder joint.