Search

CN-121998986-A - Welding part point cloud normal vector direction correction and weld joint identification method

CN121998986ACN 121998986 ACN121998986 ACN 121998986ACN-121998986-A

Abstract

The invention discloses a welding part point cloud normal vector direction correction and weld joint identification method. The method comprises the steps of calibrating a 3D camera and a turntable to obtain a conversion matrix, driving the turntable to scan a workpiece at multiple angles and splice point clouds, calculating an eye pointing vector pointing to the scanning camera according to calibration parameters aiming at each point in the point clouds, and uniformly correcting the direction of the normal vector by comparing the direction relation between the initial normal vector and the eye pointing vector so as to lead the normal vector to be consistently pointed outside the workpiece. The invention also discloses a weld joint identification method of the welding piece, which comprises the steps of dividing point clouds with consistent normal directions to obtain surface areas of the workpiece, calculating geometric relations by utilizing the normal directions which are consistent and outward among the areas, and accurately filtering and extracting effective weld joints. The method thoroughly solves the problem of ambiguity in the direction of the neutral point cloud vector in multi-view scanning, and provides a reliable data base for automatic weld joint identification.

Inventors

  • YANG BO
  • XU GUANHUA
  • WANG ZHENGTUO
  • FU JIANZHONG

Assignees

  • 浙江大学

Dates

Publication Date
20260508
Application Date
20260409

Claims (9)

  1. 1. A method for correcting consistency of a normal vector direction of a welding part point cloud is characterized by comprising the following steps: step S1, calibrating a 3D camera for collecting point clouds of welding pieces and a turntable for bearing the welding pieces, and respectively obtaining a camera external parameter matrix and a turntable conversion matrix; Step S2, controlling the turntable to drive the welding piece to rotate for a plurality of angles, and collecting a frame of point cloud by using the 3D camera under each angle; And S3, for each point of each single point cloud in the spliced point cloud, calculating a vector of the point pointing to the 3D camera coordinate corresponding to the acquisition time according to the camera external parameter matrix and the turntable conversion matrix as an eye pointing vector, and further carrying out consistency correction processing on an initial normal vector of each point in the spliced point cloud by using the eye pointing vector.
  2. 2. The method for correcting the consistency of the direction of the point cloud normal vector of the welding part according to claim 1, wherein in the step S1, the camera extrinsic matrix T cam is expressed as: ; wherein R cam is a rotation matrix, t cam is a translation vector; The turret transition matrix T rot is represented as: ; Wherein t rot is the center point coordinate of the turntable, and R rot is the rotation matrix about the rotation axis.
  3. 3. The method for correcting the consistency of the point cloud normal vector direction of the welding part according to claim 1, wherein in the step S2, the point cloud splicing method comprises the steps of rotating an ith frame point cloud i p to a reference coordinate system to obtain an ith frame single point cloud i 0 p, and integrating the spliced point clouds: i 0 p= i p T rot -1 (θ rot ) Wherein, theta rot is the rotation angle of the ith frame point cloud relative to the 0 th frame point cloud, and T rot is the turntable conversion matrix.
  4. 4. The method for correcting the consistency of the direction of the point cloud normal vector of the welding part according to claim 3, wherein the step S3 is characterized in that the method for calculating the finger eye vector comprises the following steps: S31, calculating camera coordinates i 0 p cam corresponding to each frame point cloud according to the following formula: i 0 p cam= i p cam T rot (θ rot ) i p cam is the coordinate of the camera in the ith frame point cloud, i 0 p cam is the coordinate relative to the coordinate in the reference coordinate system; S32, subtracting the corresponding camera coordinates from the coordinates of each point of the i-th frame single point cloud i 0 p in the spliced point cloud to obtain the finger-eye vector of each point: i v= i 0 p- i 0 p cam i 0 p represents a coordinate set of all points in the single point cloud of the ith frame, i 0 p cam represents camera coordinates corresponding to the single point cloud of the ith frame, and i v represents a finger eye vector set of each point in the single point cloud of the ith frame.
  5. 5. The method for correcting consistency of a weld point cloud normal vector direction according to claim 1, wherein in the step S3, the consistency correction process comprises: 31 Firstly, calculating an initial normal vector of each point in the splicing point cloud; 32 Then for each point, calculating the inner product of its initial normal vector and its corresponding finger eye vector; if the inner product is larger than 0, turning over the initial normal vector direction of the point; If the inner product is not more than 0, the processing is not performed; Therefore, the initial normal vector directions of all the points and the directions of the corresponding finger eye vectors meet the preset consistency relation, and consistency correction is realized.
  6. 6. The method for correcting the consistency of the direction of the normal vector of the point cloud of the welding part according to claim 5, wherein in the step 31), the initial normal vector is calculated according to the joint point cloud by a principal component analysis PCA method.
  7. 7. The method for correcting consistency of the normal vector direction of the point cloud of a welding part according to claim 5, wherein in the step 32), the predetermined consistency relationship is that the normal vector direction of each point is consistent with the direction of the finger eye vector, namely, the inner product is smaller than 0.
  8. 8. A weld joint recognition method for a welding piece is characterized by comprising the following steps: acquiring point cloud data of a welding piece, wherein the normal vector directions of points in the point cloud data are corrected by the welding piece point cloud normal vector direction consistency correction method according to any one of claims 1-7, so that all normal vectors are ensured to point to the outside of a welding piece entity; Dividing the point cloud data to obtain a plurality of areas representing different surfaces of the welding piece; And thirdly, identifying effective welding seams on the welding pieces based on the normal vector information of each area after consistency correction.
  9. 9. The method of weld identification of weldments of claim 8, wherein: In the third step, the method for identifying the effective welding seam comprises the steps of obtaining a judgment operator sigma according to the expression calculation and then judging any two intersected surface areas according to the normal vectors n 1 and n 2 of the two intersected surface areas: σ=(n 1 ×n 2 )×e 1 E 1 is a preset reference unit vector, the direction is the intersecting line direction between two intersecting surface areas, and the direction is determined by a normal vector n 1 according to the right-hand spiral rule; When the judgment operator sigma <0, judging the intersection line of the two surface areas as an effective welding line; when the judgment operator sigma is more than or equal to 0, the intersection line of the two surface areas is not judged to be an effective welding line.

Description

Welding part point cloud normal vector direction correction and weld joint identification method Technical Field The invention belongs to the technical field of three-dimensional machine vision and automatic welding, and particularly relates to a method for correcting the direction of a point cloud normal vector of a welding part and identifying a welding seam. Background In an intelligent welding system based on machine vision, point cloud data of a welding workpiece are acquired through three-dimensional scanning, and a welding path is automatically planned according to the point cloud data, so that the intelligent welding system is a key technology for realizing welding automation and intellectualization. In the flow, accurate estimation of the normal vector of the point cloud is the basis for subsequent processing such as point cloud registration, surface reconstruction, feature extraction, weld recognition and the like. Currently, a common point cloud processing library (such as Open3D, PCL, CGAL) commonly adopts a Principal Component Analysis (PCA) based method to estimate the normal vector of a point. The PCA method can calculate the direction of the normal vector according to the local neighborhood distribution of the points, but has an inherent limitation that it can only determine the straight line direction (i.e., positive and negative directions) in which the normal vector is located, and cannot uniquely determine whether the normal vector should point to the outside or the inside of the curved surface. Such uncertainty in direction is commonly referred to as "ambiguity" or "inconsistency" in normal vector direction. In the welding application scenario, this directional inconsistency can present a series of problems. For example, in identifying fillet welds, T-shaped welds, it is often necessary to determine the type of included angle between two surfaces based on geometric relationships (e.g., cross-product and dot-product operations) of normal vectors of adjacent surfaces and extract the intersection as the weld. If the normal vector direction is inconsistent (some points to the outside of the workpiece and some points to the inside), the geometric judgment logic based on the normal vector is directly invalid, and the intersection line of an effective welding line and an invalid plane cannot be accurately distinguished, so that the accuracy and the reliability of automatic extraction of the welding line are seriously affected. To overcome this drawback of the PCA method, it is often necessary in the prior art to introduce additional global or local information to unify the normal vector directions, e.g. to orient using the viewpoint consistency principle. However, in a typical scenario of weldment scanning, the workpiece is typically fixed on a turret for multi-perspective scanning to obtain a complete point cloud, with the "point-of-view" position at each perspective being dynamically changed. When the whole point cloud spliced by the multi-view cloud is processed by the traditional method, a stable and unified global view is difficult to find to perform effective normal vector orientation, so that an orientation result is unreliable or incomplete. Therefore, the prior art lacks a solution which can effectively adapt to the multi-view scanning scene of the welding piece and ensure that the normal vector direction of the integral point cloud after splicing is consistent to the outside of the workpiece. The technical bottleneck restricts the precision and the practicability of an automatic weld joint recognition technology based on the point cloud. Disclosure of Invention Therefore, the invention aims to provide a welding part point cloud normal vector direction consistency correction and weld joint identification method, which aims to solve the problem of inconsistent welding part point cloud normal vector direction, and ensure that the welding part point cloud normal vector direction is consistently directed to the outside of a workpiece by calibrating parameters of a camera and a turntable, calculating an eye pointing vector and correcting the normal vector direction, so that the accuracy and the reliability of weld joint identification are improved. In order to achieve the above purpose, the present invention provides the following technical solutions: 1. A welding part point cloud normal vector direction consistency correction method comprises the following steps: step S1, calibrating a 3D camera for collecting point clouds of welding pieces and a turntable for bearing the welding pieces, and respectively obtaining a camera external parameter matrix and a turntable conversion matrix; Step S2, controlling the turntable to drive the welding piece to rotate for a plurality of angles, and acquiring a frame of point cloud by using the 3D camera under each angle and storing the frame of point cloud in a computer; processing the point cloud data in a computer by adopting a camera external paramet