Vision-based welding track acquisition method
By installing a camera on the welding mask and an ArUco box on the welding gun, combined with a reference ruler, high-precision welding gun position and motion trajectory acquisition is achieved, and the problems of low accuracy, high maintenance cost and limited application scope in the existing technology are solved, and are suitable for complex shapes and high-speed welding.
Patent Information
- Application Number
- CN202510374897.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-03-27
AI Technical Summary
Existing welding trajectory acquisition methods such as mechanical sensors and laser tracking systems have problems such as low accuracy, high maintenance costs, limited scope of application and insufficient real-time performance.
The vision-based welding trajectory acquisition method is adopted, and the position and motion trajectory of the welding torch are collected in real time by combining the reference ruler.
It realizes high-precision welding torch position and motion trajectory acquisition, reduces costs, simplifies the installation process, and is suitable for complex shape welds and high-speed welding scenarios.
Smart Images

Figure CN120080067A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of welding, and particularly to a vision-based welding trajectory acquisition method. Background Art
[0002] During the welding process, the pose and movement trajectory of the welding torch have an important impact on the welding quality. Therefore, a reliable welding trajectory acquisition method is needed to obtain the pose and movement trajectory of the welding torch during the welding process.
[0003] Traditional welding trajectory acquisition methods usually rely on mechanical sensors or laser tracking systems. At present, mechanical sensors mainly use contact measurement methods, which are easily affected by factors such as weld surface roughness, scratches, and spatter, resulting in low measurement accuracy. They are prone to wear during use and need to be replaced or calibrated regularly, increasing the maintenance cost. Moreover, they require obvious physical features of the weld to work and are usually applicable to scenarios with low accuracy requirements such as thick plate straight seams and circumferential seams. It is difficult to apply to complex-shaped welds or thin plate welding. During high-speed welding, the data processing speed of mechanical sensors may not be able to keep up with the change of the weld position, resulting in untimely deviation correction. Laser tracking systems are easily interfered by welding arc light, smoke, spatter, etc., resulting in a decrease in image acquisition quality and affecting the accurate extraction of weld features. Under complex working conditions, the image processing of laser tracking systems needs to remove a large amount of interference information, with complex algorithms and large computational amounts, which may lead to insufficient real-time performance. In addition, laser tracking systems usually require high-precision laser sensors and complex image processing equipment, with high equipment costs and maintenance costs, and have certain requirements for working environment conditions such as light and temperature. Strong light or high temperature may affect the performance of laser sensors.
[0004] With the development of computer vision technology, vision-based welding trajectory acquisition methods have gradually become a research hotspot. Therefore, to solve the technical problems existing in the above-mentioned existing welding trajectory acquisition methods, we propose a vision-based welding trajectory acquisition method. Summary of the Invention
[0005] The main purpose of the present invention is to provide a vision-based welding trajectory acquisition method, which realizes high-precision acquisition of the pose and movement trajectory of the welding torch through one or more cameras installed on the welding mask and an aruco box on the welding torch, in combination with a reference scale, and can effectively solve the problems in the background art.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is
[0007] A vision-based welding trajectory acquisition method, including:
[0008] A vision acquisition unit for real-time acquisition of the pose and motion trajectory of a welding torch. Among them, the vision acquisition unit includes at least one camera, and the camera is installed on a welding mask;
[0009] An ArUco box for identifying the pose of the welding torch. Among them, the ArUco box is a cube installed on the welding torch, and at least one first ArUco code with a unique ID is set on any surface of the cube;
[0010] A reference scale for providing a stable global reference coordinate system. The reference scale is a rectangular scale composed of a series of second ArUco codes with unique IDs, and several second ArUco codes that can be recognized by the vision acquisition unit are covered on its surface;
[0011] The specific steps of the method include:
[0012] Step 1: The vision acquisition unit real-time acquires the first ArUco code on the ArUco box installed on the welding torch and the second ArUco code on the reference scale from different angles;
[0013] Step 2: Identify the ID information and position information of the acquired first ArUco code and second ArUco code. Take the pose of the first ArUco code as the pose of the welding torch, and take the pose of the second ArUco code as the pose of the reference scale, and calculate and obtain the poses of the welding torch and the reference scale in the camera coordinate system of the vision acquisition unit respectively;
[0014] Step 3: Perform coordinate system transformation
[0015] Step S31: Uniformly transform the pose of the first ArUco code on the identified welding torch to the geometric center coordinate system of the ArUco box;
[0016] Step S32: Uniformly transform the pose of the second ArUco code of the identified reference scale to the global coordinate system of the reference scale;
[0017] Step S33: Transform the pose of the welding torch from the geometric center coordinate system of the ArUco box to the global coordinate system of the reference scale;
[0018] Step 4: Perform fusion processing on the acquisition data of multiple cameras on the vision acquisition unit to obtain the accurate pose and motion trajectory of the welding torch.
[0019] Furthermore, the specific steps of Step 2 are:
[0020] Step S21: Obtain the corner pixel coordinates of the first ArUco code and the second ArUco code;
[0021] Step S22: The obtained pixel coordinates of the corner points of any ArUco code, the actual size and the internal parameters of the camera are used as the input of the PnP algorithm, wherein the internal parameters of the camera include the focal length, the principal point and several distortion coefficients;
[0022] Step S23: using the PnP algorithm to output a first rotation and translation matrix from the first ArUco code to the camera space and a second rotation and translation matrix from the second ArUco code to the camera space.
[0023] Furthermore, the specific steps of step S31 are:
[0024] Step S311: define the ArUco box geometric center coordinate system, wherein the ArUco box geometric center coordinate system takes the geometric center of the ArUco box as the origin, and the sides along the length, width, and height of the ArUco box are the X, Y, and Z coordinate axes of the ArUco box geometric center coordinate system respectively;
[0025] Step S312: Calculate the rotation and translation matrix of any first i-th ArUco code pose identified to the ArUco box geometric center coordinate system
[0026] Step S313: Calculate the rotation and translation matrix of the ArUco box geometric center coordinate system to the camera coordinate system using the following formula: The calculation formula is: In the formula, It is represented by the first rotation and translation matrix of any first ArUco code pose identified to the camera space;
[0027] Step S314: performing consistency check on the positions of the identified multiple first ArUco codes and removing abnormal values;
[0028] Step S315: according to the capture quality of the multiple identified first ArUco codes, the confidence of the i-th first ArUco code is set, and the ArUco box pose data is weightedly fused using the set confidence value to obtain the optimal pose of the geometric center of the ArUco box.
[0029] Furthermore, the specific steps of step S32 are:
[0030] Step S321: define a global coordinate system of the reference ruler, wherein the global coordinate system of the reference ruler takes the center of any fixed second ArUco code on the reference ruler as the origin, and defines the X axis along the length direction of the reference ruler, the Y axis along the width direction, and the Z axis perpendicular to the plane of the reference ruler upward, and establishes the global coordinate system of the reference ruler;
[0031] Step S322: define a second ArUco code local coordinate system, wherein any second ArUco code has a corresponding second ArUco code local coordinate system in the plane where it is located, the second ArUco code local coordinate system takes the center of the second ArUco code as the origin, and the coordinate axis direction is aligned with the edge of the second ArUco code;
[0032] Step S323: Record the coordinates (x j , 0,0), wherein the X-axis, Y-axis and Z-axis of the global coordinate system of the reference ruler and the local coordinate system of any second ArUco code are aligned parallel;
[0033] Step S324: For each captured j-th second ArUco code, calculate the rotation and translation matrix from its local coordinate system to the global coordinate system of the reference scale According to the geometric characteristics of the reference scale, the transformation matrix of the jth second ArUco code is transformed into the global coordinate system of the reference scale for: Among them, L j is the distance from the center of the jth second ArUco code to the center of the global coordinate system of the reference ruler;
[0034] Step S325: Calculate the rotation and translation matrix of the global coordinate system of the reference ruler to the camera coordinate system using the following formula: The calculation formula is: In the formula, It is represented as the second rotation and translation matrix of the j-th second ArUco code to the camera space;
[0035] Step S326: performing consistency check on the positions of the multiple identified second ArUco codes and removing abnormal values;
[0036] Step S327: according to the capture quality of the multiple identified second ArUco codes, the confidence of the j-th second ArUco code is set, and the reference scale posture data is weightedly fused using the set confidence value to obtain the optimal transformation relationship of the reference scale global coordinate system.
[0037] Furthermore, the specific steps of step S33 are:
[0038] Step S331: Calculate and obtain the position and orientation of the welding gun in the camera coordinate system, that is, the rotation and translation matrix of the welding gun in the camera coordinate system
[0039] Step S332: Use the following formula to transform the welding gun posture into the rotation and translation matrix of the global coordinate system of the reference scale: The calculation formula is:
[0040] Step S333: Dynamically output the pose calculation result of the welding torch in the global coordinate system of the reference scale for the acquisition and analysis of the welding trajectory.
[0041] Further, the specific process of step S314 is as follows:
[0042] Calculate and obtain the coordinates P in the camera coordinate system of the geometric center coordinate system of the ArUco box after transforming the arbitrarily recognized i-th first ArUco code ArUco盒(i) and the quaternion Q ArUco盒(i) ;
[0043] Respectively calculate the means of the obtained coordinates P ArUco盒(i) and the quaternion Q ArUco盒(i) The calculation formulas are: and The calculation formula is:
[0044]
[0045] where N is the number of recognized first ArUco codes;
[0046] Calculate the first displacement error d of the i-th first ArUco code from the coordinate mean , and the calculation formula is: 1i , and the calculation formula is:
[0047] Respectively convert the quaternion Q ArUco盒(i) into Euler angles E(r 2i , p 2i , y 2i ) ArUco盒 , and convert the quaternion mean into Euler angles Calculate the first rotation error ΔE of the i-th first ArUco code according to the conversion result 1i , and the calculation formula is: where Δr i = |r 1i - r 2i |, Δp i = |p 1i - p 2i |, Δy i = |y 1i - y 2i |;
[0048] Respectively set the thresholds for the first displacement error and the first rotation error, and filter out the values outside the set thresholds, that is, determine them as outliers and eliminate them.
[0049] Further, the specific process of step S326 is as follows:
[0050] Calculate and obtain the coordinates P of the j-th second ArUco code recognized in the global coordinate system of the reference scale in the camera coordinate system Global(j) and the quaternion Q Global(j) ;
[0051] Calculate the mean values of the obtained coordinates P Global(j) and the quaternion Q Global(j) respectively, and The calculation formula is:
[0052]
[0053] where M is the number of second ArUco codes recognized;
[0054] Calculate the second displacement error d of the j-th second ArUco code from the coordinate mean value , and the calculation formula is: 2j
[0055] Convert the quaternion Q Global(j) into Euler angles E(r 2j , p, y 2j , 2j ) Global , and convert the quaternion mean value into Euler angles Calculate the second rotation error ΔE of the j-th second ArUco code according to the conversion results 2j , and the calculation formula is: where Δr j = |r 1j - r 2j |, Δp j = |p 1j - p 2j |, Δy j = |y 1j - y 2j |;
[0056] Set the thresholds for the second displacement error and the second rotation error respectively, screen out the values outside the set thresholds, that is, determine them as outliers and eliminate them.
[0057] The present invention has the following beneficial effects
[0058] Compared with the prior art, the first ArUco code on the ArUco box installed on the welding torch and the second ArUco code on the reference ruler are collected in real time from different angles through the visual acquisition unit. The ID information and position information of the acquired first ArUco code and second ArUco code are identified. The pose of the first ArUco code is used as the pose of the welding torch, and the pose of the second ArUco code is used as the pose of the reference ruler. The poses of the welding torch and the reference ruler in the camera coordinate system of the visual acquisition unit are calculated respectively. The pose of the first ArUco code on the identified welding torch is uniformly transformed to the geometric center coordinate system of the ArUco box; the pose of the second ArUco code of the identified reference ruler is uniformly transformed to the global coordinate system of the reference ruler; the pose of the welding torch is transformed from the geometric center coordinate system of the ArUco box to the global coordinate system of the reference ruler; the acquisition data of multiple cameras on the visual acquisition unit are fused and processed to obtain the accurate pose and motion trajectory of the welding torch. In this solution, through the calibration of multiple cameras and the reference ruler, high-precision acquisition of the welding torch pose can be achieved; using efficient image processing algorithms and optimization algorithms, real-time acquisition and processing can be realized; the number of cameras can be expanded according to needs to adapt to different welding scenarios; compared with traditional mechanical sensors and laser tracking systems, this method has lower cost and simpler installation. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 FIG. is a schematic diagram of the overall structure of a vision-based welding trajectory acquisition method of the present invention;
[0060] Figure 2 FIG. is a schematic diagram of the installation structure of the visual acquisition unit in the technical solution of the present invention;
[0061] Figure 3 FIG. is a schematic diagram of the structure of the ArUco box in the technical solution of the present invention;
[0062] Figure 4 FIG. is a schematic diagram of the structure of the reference ruler in the technical solution of the present invention.
[0063] In the figure, 1, welding mask; 2, visual acquisition unit; 3, welding torch; 4, ArUco box; 5, first ArUco code; 6, reference ruler; 7, second ArUco code. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0064] The following further describes the present invention in conjunction with the specific embodiments. Among them, the drawings are only for illustrative purposes, showing only schematic diagrams, not physical diagrams, and should not be construed as a limitation to the present invention. In order to better illustrate the specific embodiments of the present invention, some components in the drawings will be omitted, enlarged or reduced, and do not represent the size of the actual product.
[0065] The specific implementation process of the technical solution of the present invention includes the following steps:
[0066] Step 1: Camera Installation
[0067] As shown Figure 2 Install the camera on the welding mask, and ensure that it can cover the movement range of the welding torch during the welding process.
[0068] Adjust the angle and position of the camera to maximize the capture of the ArUco codes on the ArUco box and the reference scale.
[0069] Step 2: ArUco Box Fabrication
[0070] Fabricate a cube ArUco box, and paste ArUco codes with different IDs on each face, as Figure 3 shown.
[0071] Ensure that the size and spacing of the ArUco codes meet the recognition requirements of the camera.
[0072] Step 3: Reference Scale Arrangement
[0073] Arrange the reference scale according to the length of the welding path, and ensure that the ArUco codes on the reference scale can be recognized by the camera, as Figure 4 shown.
[0074] Record the positions of each ArUco code on the reference scale for coordinate system transformation.
[0075] Step 4: System Calibration
[0076] Perform system calibration through the ArUco codes on the reference scale to ensure the accuracy of the collected data.
[0077] Calculate the internal parameters (focal length, principal point, distortion coefficients, etc.) and external parameters (relative pose between the camera and the reference scale) of the camera.
[0078] Step 5: Data Acquisition and Processing
[0079] Step 51: ArUco Code Detection: Detect the ArUco codes on the ArUco box on the welding torch and the reference scale through the images collected by the camera.
[0080] Step 52: Identify the ID information and position information of the first and second ArUco codes obtained, use the pose of the first ArUco code as the pose of the welding torch, and use the pose of the second ArUco code as the pose of the reference scale, and calculate the poses of the welding torch and the reference scale in the camera coordinate system of the visual acquisition unit respectively; the specific steps are as follows:
[0081] Step 521: Obtain the corner pixel coordinates of the first and second ArUco codes;
[0082] Step 522: The obtained pixel coordinates of the corner points of any ArUco code, the actual size and the internal parameters of the camera are used as the input of the PnP algorithm, wherein the internal parameters of the camera include the focal length, the principal point and several distortion coefficients;
[0083] Step 523: Use the PnP algorithm to output a first rotation and translation matrix from the first ArUco code to the camera space and a second rotation and translation matrix from the second ArUco code to the camera space.
[0084] Step 53: Coordinate System Transformation:
[0085] Step 531: uniformly transform the ArUco code pose on the welding gun to the geometric center of the ArUco box. The specific steps are:
[0086] Step 5311: define the ArUco box geometric center coordinate system, wherein the ArUco box geometric center coordinate system takes the geometric center of the ArUco box as the origin, and the sides along the length, width, and height of the ArUco box are the X, Y, and Z coordinate axes of the ArUco box geometric center coordinate system respectively;
[0087] Step 5312: Calculate the rotation and translation matrix of any first i-th ArUco code pose identified to the ArUco box geometric center coordinate system
[0088] Step 5313: Use the following formula to calculate the rotation and translation matrix of the ArUco box geometric center coordinate system transformed to the camera coordinate system The calculation formula is: In the formula, It is represented by the first rotation and translation matrix of any first ArUco code pose identified to the camera space;
[0089] Step 5314: performing consistency check on the positions of the identified multiple first ArUco codes and removing abnormal values, wherein the specific process of removing abnormal values is as follows:
[0090] Calculate and obtain the coordinates P of the first ArUco code identified by any method and transform it into the coordinate system of the geometric center of the ArUco box in the camera coordinate system ArUco盒(i) and the quaternion Q ArUco盒(i) ;
[0091] Calculate the obtained coordinates P respectively ArUco盒(i) and the quaternion Q ArUco盒(i) The mean and The calculation formula is:
[0092]
[0093] Where N is the number of the first ArUco codes recognized;
[0094] Calculate the first displacement error d of the i-th first ArUco code from the coordinate mean The calculation formula is: 1i , and the calculation formula is:
[0095] Convert the quaternion Q ArUco盒(i) into Euler angles E(r 2i , p 2i , y 2i ), ArUco盒 Convert the quaternion mean into Euler angles Calculate the first rotation error ΔE of the i-th first ArUco code according to the conversion result 1i , and the calculation formula is: Where, Δr i =|r 1i -r 2i |, Δp i =|p 1i -p 2i |, Δy i =|y 1i -y 2i |;
[0096] Set the thresholds of the first displacement error and the first rotation error respectively, screen out the values outside the set thresholds, that is, determine them as outliers and eliminate them;
[0097] Step 5315: Set the confidence of the i-th first ArUco code according to the capture quality of the recognized multiple first ArUco codes, and use the set confidence value to perform weighted fusion on the ArUco box pose data to obtain the optimal pose of the geometric center of the ArUco box.
[0098] Step 532: Uniformly transform the pose of the ArUco code on the reference ruler to the global coordinate system of the reference ruler. The specific steps are as follows:
[0099] Step 5321: Define the global coordinate system of the reference ruler. Wherein, the global coordinate system of the reference ruler takes the center of any fixed second ArUco code on the reference ruler as the origin, and the length direction of the reference ruler is defined as the X-axis, the width direction is defined as the Y-axis, and the direction perpendicular to the plane of the reference ruler and upward is defined as the Z-axis to establish the global coordinate system of the reference ruler;
[0100] Step 5322: Define the local coordinate system of the second ArUco code. Any second ArUco code has a corresponding local coordinate system of the second ArUco code in its plane. The origin of the local coordinate system of the second ArUco code is the center of the second ArUco code, and the axis directions are aligned with the sides of the second ArUco code.
[0101] Step 5323: Record the coordinates (x j , 0, 0) of the center of any j-th second ArUco code in the global coordinate system of the reference scale, where the global coordinate system of the reference scale is parallel and aligned with the X-axis, Y-axis, and Z-axis of the local coordinate system of any second ArUco code.
[0102] Step 5324: For each captured j-th second ArUco code, calculate the rotation and translation matrix from its local coordinate system to the global coordinate system of the reference scale According to the geometric characteristics of the reference scale, the transformation matrix for transforming the j-th second ArUco code to the global coordinate system of the reference scale is: where L j is the distance from the center of the j-th second ArUco code to the center of the global coordinate system of the reference scale;
[0103] Step 5325: Use the following formula to calculate the rotation and translation matrix from the global coordinate system of the reference scale to the camera coordinate system The calculation formula is: In the formula, represents the second rotation and translation matrix from the j-th second ArUco code to the camera space;
[0104] Step 5326: Perform a consistency check on the poses of multiple identified second ArUco codes and eliminate outliers. The specific process of eliminating outliers is as follows:
[0105] Calculate the coordinates P Global(j) and quaternion Q Global(j) in the camera coordinate system obtained by transforming any identified j-th second ArUco code to the global coordinate system of the reference scale;
[0106] Calculate the means Global(j) of the obtained coordinates P Global(j) and quaternion Q and The calculation formulas are:
[0107]
[0108] where M is the number of identified second ArUco codes;
[0109] Calculate the distance from the j-th second ArUco code to the coordinate mean The second displacement error d 2j , and the calculation formula is:
[0110] Convert the quaternion Q Global(j) into Euler angles E(r 2j , p 2j , y 2j ) Global , and convert the quaternion mean into Euler angles Calculate the second rotation error ΔE of the j-th second ArUco code according to the conversion results 2j , and the calculation formula is: where, Δr j =|r 1j -r 2j |, Δp j =|p 1j -p 2j |, Δy j =|y 1j -y 2j |;
[0111] Set the thresholds of the second displacement error and the second rotation error respectively, and filter out the values outside the set thresholds, that is, judge them as outliers and eliminate them;
[0112] Step 5327: Set the confidence level of the j-th second ArUco code according to the capture quality of the identified multiple second ArUco codes, and use the set confidence level value to perform weighted fusion on the reference ruler pose data to obtain the optimal transformation relationship of the reference ruler global coordinate system.
[0113] Step 533: Transform the welding torch pose from the ArUco box geometric center coordinate system to the reference ruler global coordinate system. The specific process is:
[0114] Calculate the pose of the welding torch in the camera coordinate system, that is, the rotation and translation matrix of the welding torch in the camera coordinate system
[0115] Use the following formula to transform the welding torch pose to the rotation and translation matrix of the reference ruler global coordinate system The calculation formula is:
[0116] Step 534: Data fusion: fuse the acquisition data of multiple cameras to obtain the accurate pose and motion trajectory of the welding torch.
[0117] Step 535: Real-time pose output
[0118] According to the movement of the welding torch, update its pose in the reference ruler global coordinate system in real time.
[0119] Connect the continuous pose data to generate the motion trajectory of the welding torch.
[0120] The above has shown and described the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A vision-based welding trajectory acquisition method, characterized in that: include: A visual acquisition unit for real-time acquisition of the position and motion trajectory of the welding gun, wherein the visual acquisition unit comprises at least one camera mounted on the welding mask; An ArUco box for identifying the position of the welding gun, wherein the ArUco box is a cube mounted on the welding gun, and at least one first ArUco code with a unique ID is set on any face of the cube; A reference ruler for providing a stable global reference coordinate system, the reference ruler is a rectangular ruler composed of a series of second ArUco codes with unique IDs, and a plurality of second ArUco codes that can be recognized by a visual acquisition unit are covered on its surface; The specific steps of the method include: Step 1: The visual acquisition unit collects the first ArUco code of the ArUco box installed on the welding gun and the second ArUco code on the reference ruler in real time from different angles; Step 2: Identify the ID information and position information of the first ArUco code and the second ArUco code, use the first ArUco code posture as the welding gun posture, and use the second ArUco code posture as the reference ruler posture, and calculate the postures of the welding gun and the reference ruler in the camera coordinate system of the visual acquisition unit respectively; Step 3: Coordinate system transformation Step S31: uniformly transforming the identified first ArUco code pose on the welding gun to the ArUco box geometric center coordinate system; Step S32: uniformly transforming the recognized second ArUco code position of the reference ruler to the global coordinate system of the reference ruler; Step S33: transform the welding gun posture from the ArUco box geometric center coordinate system to the reference ruler global coordinate system; Step 4: Fuse the data collected by multiple cameras on the visual acquisition unit to obtain the precise position and motion trajectory of the welding gun.
2. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step 2 are: Step S21: Obtaining the pixel coordinates of the corner points of the first ArUco code and the second ArUco code; Step S22: The obtained pixel coordinates of the corner points of any ArUco code, the actual size and the internal parameters of the camera are used as the input of the PnP algorithm, wherein the internal parameters of the camera include the focal length, the principal point and several distortion coefficients; Step S23: using the PnP algorithm to output a first rotation and translation matrix from the first ArUco code to the camera space and a second rotation and translation matrix from the second ArUco code to the camera space.
3. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step S31 are: Step S311: define the ArUco box geometric center coordinate system, wherein the ArUco box geometric center coordinate system takes the geometric center of the ArUco box as the origin, and the sides along the length, width, and height of the ArUco box are the X, Y, and Z coordinate axes of the ArUco box geometric center coordinate system respectively; Step S312: Calculate the rotation and translation matrix of any first i-th ArUco code pose identified to the ArUco box geometric center coordinate system Step S313: Calculate the rotation and translation matrix of the ArUco box geometric center coordinate system to the camera coordinate system using the following formula: The calculation formula is: In the formula, It is represented by the first rotation and translation matrix of any first ArUco code pose identified to the camera space; Step S314: performing consistency check on the positions of the identified multiple first ArUco codes and removing abnormal values; Step S315: according to the capture quality of the multiple identified first ArUco codes, the confidence of the i-th first ArUco code is set, and the ArUco box pose data is weightedly fused using the set confidence value to obtain the optimal pose of the geometric center of the ArUco box.
4. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step S32 are: Step S321: define a global coordinate system of the reference ruler, wherein the global coordinate system of the reference ruler takes the center of any fixed second ArUco code on the reference ruler as the origin, and defines the X axis along the length direction of the reference ruler, the Y axis along the width direction, and the Z axis perpendicular to the plane of the reference ruler upward, and establishes the global coordinate system of the reference ruler; Step S322: define a second ArUco code local coordinate system, wherein any second ArUco code has a corresponding second ArUco code local coordinate system in the plane where it is located, the second ArUco code local coordinate system takes the center of the second ArUco code as the origin, and the coordinate axis direction is aligned with the edge of the second ArUco code; Step S323: Record the coordinates (x j , 0,0), wherein the X-axis, Y-axis and Z-axis of the global coordinate system of the reference ruler and the local coordinate system of any second ArUco code are aligned parallel; Step S324: For each captured j-th second ArUco code, calculate the rotation and translation matrix from its local coordinate system to the global coordinate system of the reference scale According to the geometric characteristics of the reference scale, the transformation matrix of the jth second ArUco code is transformed into the global coordinate system of the reference scale for: Among them, L j is the distance from the center of the jth second ArUco code to the center of the global coordinate system of the reference ruler; Step S325: Calculate the rotation and translation matrix of the global coordinate system of the reference ruler to the camera coordinate system using the following formula: The calculation formula is: In the formula, It is represented as the second rotation and translation matrix of the j-th second ArUco code to the camera space; Step S326: performing consistency check on the positions of the multiple identified second ArUco codes and removing abnormal values; Step S327: according to the capture quality of the multiple identified second ArUco codes, the confidence of the j-th second ArUco code is set, and the reference scale posture data is weightedly fused using the set confidence value to obtain the optimal transformation relationship of the reference scale global coordinate system.
5. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step S33 are: Step S331: Calculate and obtain the position and orientation of the welding gun in the camera coordinate system, that is, the rotation and translation matrix of the welding gun in the camera coordinate system Step S332: Use the following formula to transform the welding gun posture into the rotation and translation matrix of the global coordinate system of the reference scale: The calculation formula is: Step S333: Dynamically output the calculated results of the welding gun's posture in the global coordinate system of the reference scale for the collection and analysis of the welding trajectory.
6. The method for collecting welding trajectories based on vision according to claim 3 is characterized in that: The specific process of step S314 is as follows: Calculate and obtain the coordinates P of the first ArUco code identified by any method and transform it into the coordinate system of the geometric center of the ArUco box in the camera coordinate system. ArUco盒(i) and the quaternion Q ArUco盒(i) ; Calculate the obtained coordinates P respectively ArUco盒(i) and the quaternion Q ArUco盒(i) The mean and The calculation formula is: Wherein, N is the number of the first ArUco codes identified; Calculate the mean value of the first ArUco code to coordinates of the i-th The first displacement error d 1i , the calculation formula is: The quaternion Q ArUco盒(i) Convert to Euler angle E(r 2i ,p 2i ,y 2i ) ArUco盒 , the quaternion mean Convert to Euler angles Calculate the first rotation error ΔE of the i-th first ArUco code according to the conversion result 1i , the calculation formula is: Among them, Δr i =|r 1i -r 2i |,Δp i =|p 1i -p 2i |,Δy i =|y 1i -y 2i |; Thresholds of the first displacement error and the first rotation error are set respectively, and values outside the set thresholds are screened out, that is, determined as abnormal values, and removed.
7. The method for collecting welding trajectories based on vision according to claim 4, characterized in that: The specific process of step S326 is: Calculate and obtain the coordinates P of any identified j-th second ArUco code transformed into the global coordinate system of the reference scale in the camera coordinate system Global(j) and the quaternion Q Global(j) ; Calculate the obtained coordinates P respectively Global(j) and the quaternion Q Global(j) The mean and The calculation formula is: Wherein, M is the number of second ArUco codes identified; Calculate the jth second ArUco code to coordinate mean The second displacement error d 2j , the calculation formula is: The quaternion Q Global(j) Convert to Euler angle E(r 2j ,p 2j ,y 2j ) Global , the quaternion mean Convert to Euler angles Calculate the second rotation error ΔE of the j-th second ArUco code according to the conversion result 2j , the calculation formula is: Among them, Δr j =|r 1j -r 2j |,Δp j =|p 1j -p 2j |,Δy j =|y 1j -y 2j |; Thresholds for the second displacement error and the second rotation error are set respectively, and values outside the set thresholds are screened out, that is, determined as abnormal values, and removed.
Citation Information
Patent Citations
Camera external parameter calibration method and system based on aruco code, terminal and medium
CN111627075A
Unmanned aerial vehicle accurate landing method based on monocular vision
CN118226866A
Group straight line welding starting and ending point identification method using machine vision
CN118305500A
Industrial robot kinematics calibration method based on vision in large-size working space
CN118322213A
Method and apparatus for determining relative poses and for calibration of a coordinate measuring machine or robot
DE102021209178A1
Cited By
Ballast track bed surface ballast space pose estimation method based on machine vision
CN120707641A
"iSHOOTER" SHOOTING SKILLS TRAINING SYSTEM
RU2863299C1
Ishooter shooting skills training system
RU2868362C1