A weld undercut defect detection method, system, electronic device and storage medium
Patent Information
- Application Number
- CN202411153873.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2044-08-21
AI Technical Summary
蒋美仙等提出了基于DeepLab-V3与三维点云数据的焊缝缺陷检测,利用循环一致性对抗网络对样本数据进行扩充,能够检测出咬边、气孔等表面缺陷;贾瑞等提出了基于线结构光的角焊缝外观检测算法,用法向平均法来提取结构光条纹中心线;张天宇等提出了基于结构光的焊缝表面质量检测算法,采用随机采样一致性算法拟合平面分割焊缝点云,通过点云切片获取焊缝轮廓线,但是当焊缝点云为多平面时,平面拟合结果较差,准确率低;Yuan Li等提出了基于激光条纹的焊道轮廓提取方法,该方法对于其他焊接接头方式并不适用
[0016]本公开实施例的一种焊缝咬边缺陷检测方法、系统、电子设备及存储介质,通过基于点云的焊缝骨架提取算法,将点云数据转换为二维切片,对切片进行缺陷检测并将缺陷位置还原到点云图中,提高了缺陷与母材颜色相近、轮廓不明显、形状不规则等情况下的缺陷识别的准确率,解决了仅靠2D机器视觉技术难以识别与定位缺陷的问题。
Smart Images

Figure CN119048467B_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein belong to the field of weld undercut defect detection technology, specifically relating to a weld undercut defect detection method, system, electronic device and storage medium. Background Technology
[0002] Accurate detection of surface defects in metal welds is a prerequisite for ensuring the safe use of workpieces. Undercut defects refer to irregular, serrated, or uneven edges on the weld joint. The presence of undercut affects the appearance and dimensional accuracy of the weld joint, and may also reduce its strength and sealing performance, thus posing safety hazards in industrial applications. Therefore, weld defect detection is essential.
[0003] In practical engineering, weld undercut detection still relies mainly on manual inspection. However, depending on the inspector's personal experience, skills, and subjective judgment, it is prone to errors and omissions. Currently, scholars both domestically and internationally have conducted some research in the field of weld undercut defect detection. Jiang Meixian et al. proposed a weld defect detection method based on DeepLab-V3 and 3D point cloud data, using a cyclic consistency adversarial network to expand the sample data, which can detect surface defects such as undercut and porosity. Jia Rui et al. proposed a fillet weld appearance detection algorithm based on line structured light, using the normal averaging method to extract the center line of the structured light stripes. Zhang Tianyu et al. proposed a weld surface quality detection algorithm based on structured light, using a random sampling consensus algorithm to fit the plane segmentation of the weld point cloud, and obtaining the weld contour line through point cloud slicing. However, when the weld point cloud is multi-planar, the plane fitting result is poor and the accuracy is low. Yuan Li et al. proposed a weld contour extraction method based on laser stripes, but this method is not applicable to other welding joint types.
[0004] Structured light-based methods for extracting weld undercut features have limitations. They are costly and can only handle fillet welds or planar welds, offering poor adaptability for multi-planar weld feature extraction. Weld undercut defects appear as short, thick black stripes on the weld edge of the film, closer to the base material. These stripes are uneven in density, have indistinct outlines, and irregular shapes, making them difficult to accurately identify and locate using only 2D machine vision technology. Summary of the Invention
[0005] The embodiments disclosed herein are intended to at least address one of the technical problems existing in the prior art, and provide a method, system, electronic device, and storage medium for detecting weld undercut defects.
[0006] One aspect of this disclosure provides a method for detecting weld undercut defects, the method comprising: Acquire weld seam point cloud data; Based on the weld point cloud data, the main feature skeleton of the weld is obtained; The main feature skeleton of the weld is sliced using a cross-sectional plane to obtain three-dimensional slice point cloud data; The three-dimensional slice point cloud data is converted into two-dimensional slice point cloud data; The two-dimensional slice point cloud data is input into the target detection network for defect detection to obtain the two-dimensional coordinates of the defect location. The two-dimensional coordinates of the defect location are converted into three-dimensional coordinates to obtain three-dimensional point cloud data of the weld undercut defect.
[0007] Optionally, obtaining the main feature skeleton of the weld seam based on the weld seam point cloud data includes: The weld point cloud data was preprocessed by sequentially using octree segmentation and voxel filtering downsampling; The weld point cloud data is then randomly sampled and resampled using the WLOP operator in sequence. The weld point cloud data is shrunk by local median iteration to obtain feature skeleton points; The feature skeleton points are connected and smoothed to obtain the main feature skeleton of the weld.
[0008] Optionally, the step of performing skeleton connection on the feature skeleton points includes: Selectable skeleton points are determined based on the linearity of each skeleton point; Starting from the optional skeleton point with the greatest linearity, connect multiple neighboring optional skeleton points.
[0009] Optionally, the step of performing cross-sectional slicing on the main feature skeleton of the weld to obtain three-dimensional slice point cloud data includes: Each point cloud segment of the main feature skeleton of the weld is sliced at equal intervals.
[0010] Optionally, converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data includes: Project each of the three-dimensional slice point clouds onto a two-dimensional plane; The three-dimensional coordinate system of each of the three-dimensional slice point clouds is converted into a two-dimensional coordinate system to obtain a two-dimensional slice point cloud; The two-dimensional slice point cloud is converted into a two-dimensional image.
[0011] Optionally, the target detection network is pre-trained through the following steps: Obtain a set of weld seam outline images; Mark the undercut defects in each weld contour image in the image set; The RT-DETR detection network is trained using the set of labeled weld contour images as the training set to obtain the target detection network.
[0012] Optionally, converting the two-dimensional coordinates of the defect location into three-dimensional coordinates to obtain three-dimensional point cloud data of the weld undercut defect includes: Set the coordinates of the 3D point cloud detection frame for weld undercut defects; By using a rotation matrix, the coordinates of the three-dimensional point cloud detection frame are restored to the area where the weld point cloud is located, thus obtaining the display of the weld undercut defect on the weld point cloud.
[0013] Another aspect of this disclosure provides a weld undercut defect detection system, the system comprising: The acquisition module is used to acquire weld seam point cloud data; The feature skeleton module is used to obtain the main feature skeleton of the weld seam based on the weld seam point cloud data; The slicing module is used to perform cross-sectional slicing processing on the main feature skeleton of the weld seam to obtain three-dimensional slice point cloud data. The data conversion module is used to convert the three-dimensional slice point cloud data into two-dimensional slice point cloud data; The detection module is used to input the two-dimensional slice point cloud data into the target detection network for defect detection and obtain the two-dimensional coordinates of the defect location; The coordinate module is used to convert the two-dimensional coordinates of the defect location into three-dimensional coordinates of the defect location, thereby obtaining three-dimensional point cloud data of the weld undercut defect.
[0014] Another aspect of this disclosure provides an electronic device, comprising: At least one processor; and a memory communicatively connected to the at least one processor for storing one or more programs that, when executed by the at least one processor, enable the at least one processor to implement the weld undercut defect detection method described above.
[0015] Another aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the weld undercut defect detection method described above.
[0016] This disclosure discloses a method, system, electronic device, and storage medium for detecting weld undercut defects. By using a weld skeleton extraction algorithm based on point clouds, point cloud data is converted into two-dimensional slices. Defects are detected on the slices, and the defect locations are restored to the point cloud image. This improves the accuracy of defect identification when the defect is similar in color to the base material, has an indistinct outline, or an irregular shape. It solves the problem that it is difficult to identify and locate defects using only 2D machine vision technology. Attached Figure Description
[0017] Figure 1 This is a schematic flowchart of a method for detecting weld undercut defects according to an embodiment of the present disclosure; Figure 2 This is a schematic diagram of the main feature skeleton of the weld point cloud according to another embodiment of the present disclosure; Figure 3 This is a schematic diagram of point cloud truncation plane slicing processing according to another embodiment of this disclosure; Figure 4 This is a schematic diagram of a point cloud slice sequence according to another embodiment of the present disclosure; Figure 5 This is a schematic diagram of a single point cloud slice after projection, according to another embodiment of the present disclosure; Figure 6 This is a schematic diagram of multiple point cloud slices after projection, according to another embodiment of the present disclosure; Figure 7 This is a schematic diagram of the weld outline image after annotation, according to another embodiment of this disclosure; Figure 8 This is a schematic diagram of a weld point cloud showing an undercut defect according to another embodiment of the present disclosure; Figure 9 This is a schematic diagram of the structure of a weld undercut defect detection system according to another embodiment of the present disclosure; Figure 10 This is a schematic diagram of the structure of an electronic device according to another embodiment of the present disclosure. Detailed Implementation
[0018] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments of this disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this disclosure.
[0019] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0020] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0021] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component discussed below may be referred to as the second component without departing from the teachings of this disclosure. As used in this disclosure, the term "and / or" includes all combinations of any and more of the associated listed items.
[0022] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing this disclosure, and therefore cannot be used to limit the scope of protection of this disclosure.
[0023] like Figure 1 As shown, one embodiment of this disclosure provides a method for detecting weld undercut defects, the method comprising: Step S1: Obtain weld point cloud data.
[0024] Specifically, weld undercut defects appear as short, thick black stripes on the weld edge of the film, closer to the base material. These stripes are uneven in density, have indistinct outlines, and irregular shapes, making them difficult to accurately identify and locate using 2D machine vision technology. Therefore, this embodiment utilizes 3D machine vision technology, such as a structured light camera, to collect point cloud data of the weld as the basis for weld undercut defect detection. The original 3D point cloud of the structural component weld obtained by the structured light camera scan contains 800,000 to 1,000,000 points, and the point cloud of the weld area obtained after feature region detection is approximately 200,000 points.
[0025] Step S2: Obtain the main feature skeleton of the weld seam based on the weld seam point cloud data.
[0026] Specifically, for the problem of three-dimensional feature extraction of structural welds, embodiments of this disclosure propose a weld skeleton extraction algorithm based on the L1 median method.
[0027] First, the weld point cloud data obtained in step S1 is segmented using an octree. By calculating the distance between any two points in the point cloud, a set of point clouds meeting the distance threshold is selected. The nearest neighbors of all points in the point cloud data are then searched, a process known as the nearest neighbor problem. However, solving for the distance between all points and sequentially searching is inefficient, and traversing all point clouds is time-consuming and difficult. To shorten the search time for nearest neighbors in the weld point cloud data and improve search efficiency, this disclosure employs an octree segmentation method with a low structural depth for retrieving the original weld point cloud. This method can organize and arrange the disordered and scattered original point cloud data in an orderly manner, facilitating retrieval. Simultaneously, it simplifies the point cloud data according to the index, defining neighborhood points for weld feature points. Each node in the point cloud image space generates eight identical child nodes, unifying the geometric information of all voxels in the same point cloud space and ensuring consistency. For spatially uniform point cloud data, the octree structure has high retrieval efficiency and is suitable for segmenting point cloud data on the workpiece surface.
[0028] Voxel filtering downsampling is applied to the segmented weld point cloud data. Voxelization is used to reduce the number of points in the voxel, replacing all points within a voxel with points near the center point. This method is more accurate than directly using the center point, preserving the shape features of the point cloud while reducing its size. After downsampling using octree segmentation and voxel filtering, the number of weld point clouds is significantly reduced, with a point cloud simplification rate of approximately 95%, while still effectively preserving the three-dimensional features of the weld and removing outliers, burrs, and noise caused by light reflection to a certain extent.
[0029] Then, the voxel-filtered weld point cloud is shrunk to initial sampling points through random sampling to serve as the initial skeleton points. An excessive number of point clouds increases computational load and reduces algorithm efficiency. Multiple experiments revealed that the number of sampling points has little impact on the skeleton extraction results. To ensure algorithm speed, this embodiment sets the number of random sampling points to 8% of the weld point cloud size.
[0030] The core of the Weighted Locally Optimal Projection (WLOP) algorithm is a weighted local optimal projection operator with a density homogenization term, which can generate a set of denoised, outlier, and uniformly distributed particles on the original dense point cloud. The WLOP algorithm is flexible in handling non-uniform sampling and can generate more evenly distributed sampling points. The neighborhood of the input sample points should include at least two loops of adjacent sample points. Using a small neighborhood size may not produce regularized results, while using a large neighborhood size can lead to underfitting, causing sample points to shrink into the local surface. Therefore, the technical solution in this embodiment sets the neighborhood radius parameter to 0.5, resampling the randomly sampled original points using the WLOP operator to obtain more uniform initial sampling points, which is more conducive to weld skeleton extraction.
[0031] Subsequently, the L1-median skeleton algorithm was used to extract the skeleton of the weld point cloud through local median iteration. The L1 median point cloud skeleton extraction algorithm extracts feature skeleton points by selecting the median, rather than the mean, within the neighborhood of the sampling point. During the continuous iterative shrinkage process, the neighborhood radius is continuously expanded, and the newly generated skeleton points are redistributed to the source point center within the neighborhood, thus completing the regular arrangement of the skeleton points of the weld point cloud.
[0032] Finally, skeleton points are connected and smoothed. Optional skeleton points are determined based on their linearity; a linearity greater than 0.9 indicates a linear distribution within its neighborhood, and this point is marked as an optional skeleton point. The skeleton point with the highest linearity is found as the starting point of a skeleton branch, and its K nearest neighbor optional skeleton points are connected. Connections stop at bifurcation or edge locations, forming a single skeleton branch. The optional skeleton point with the highest linearity among the remaining optional skeleton points is found, and the above process is repeated until no more optional skeleton points are available, thus obtaining a set of skeleton branches. Curve fitting is performed on each skeleton branch to form a smooth, continuous, and compact skeleton.
[0033] The final main feature skeleton of the weld point cloud is as follows: Figure 2 As shown.
[0034] Step S3: Perform cross-sectional slicing on the weld main feature skeleton according to the weld main feature skeleton to obtain three-dimensional slice point cloud data.
[0035] Specifically, in order to obtain the weld contour line, it is necessary to use the weld main feature skeleton obtained in step S2 above to perform local point cloud analysis on the workpiece weld. Figure 3The cut-off plane slicing process is shown. The weld skeleton, including the starting and ending points, has a total of K+2 3D coordinate points. The skeleton is divided into K segments. Considering that the weld trajectory direction is different in each segment, directly slicing the entire skeleton would result in a weld trajectory image that is not necessarily perpendicular to the weld trajectory direction, potentially affecting the subsequent judgment of undercut defects. Therefore, each segment's point cloud interval is sliced at equal intervals. To ensure that the trajectory directions of the two trajectory points before and after the cut plane are consistent, the mean of the plane normal vector is... Slice pre and Slice next The principal direction of the tangent plane is used as the reference direction. The distance between the two planes is then calculated. Dis ( Slice pre , Slice next (Give appropriate point cloud clipping spacing) DistPlat This yields the number of slices in the given interval. N Determine the normal vector of the tangent plane. Slice.normal With a point in the plane p The equation of the tangent plane can be obtained as follows:
[0036] When the distance from a data point to the cutting plane is less than a threshold, this point is added to the point cloud slice set. Different distance thresholds can contain different amounts of point cloud data. A larger threshold means more data is contained, a larger span along the welding direction, and a corresponding increase in computational load; conversely, a smaller threshold results in sparser data and lower accuracy of information within the cutting plane. This invention sets the point cloud slice thickness. Delta With a thickness of 0.1 mm, a series of point cloud slices with a thickness of 0.2 mm can be obtained.
[0037] The algorithm for performing equally spaced slices can be represented as follows: Input: Local point cloud of weld seam 3D coordinate set of weld inflection points Point cloud cutting edge spacing DistPlat Point cloud slice thickness Delta Output: Sliced point cloud
[0038] for i ←0to K +2do if i= 0then / / Determine if it is the starting point Slice pre ← S 3D [0]; Slicenext ← S 3D [1]; else if i=K +1then / / Check if it is the endpoint Slice pre ← S 3D [ i -1]; Slice next ← S 3D [ i ]; else Slice pre ← S 3D [ i ]; Slice next ← S 3D [ i +1]; end if Slice.normal ←( Slice pre .normal+Slice next .normal ) / 2; / / Use the mean of the x-direction vectors of the planes containing the inflection points as the principal direction of the tangent plane. N ← Dis ( Slice pre , Slice next ) / Displat / / Calculate the number of slices based on the distance between the planes containing the inflection points and the slice spacing. for j ←0to N do Slice.normal = Slice.normal / Slice.normal.norm (); / / Unit normal vector of the tangent plane p ← Slice pre + / / Coordinates of a point in the tangent plane The equation of the tangent plane is obtained as follows:
[0039] / / remember Slice.normal.x for A , Slice.normal.y for B , Slice.normal.z for C for n ←0to P C .size ()do Wr ← A×P C [ n ] .x+ B×P C [ n ] .y+ C×P C [ n ] .z+p-Delta Wl ← A×P C [ n ] .x+ B×P C [ n ] .y+ C×P C [ n ] .z+p+Delta if Wr×Wl<0 then S Slice .add ( P C [ n ]); / / point P C [ n Add to slice point cloud collection end if end for end for end for The final point cloud slice sequence is as follows Figure 4 As shown.
[0040] Step S4: Convert the three-dimensional slice point cloud data into two-dimensional slice point cloud data.
[0041] Specifically, since the input of the deep learning-based weld undercut defect detection network is a two-dimensional image, after completing the equally spaced point cloud slices in the previous step S3, the point cloud data needs to be converted into two-dimensional data.
[0042] Step S4.1: Project the point cloud slices onto the plane. The problem of projecting a spatial point cloud onto a plane is essentially the problem of projecting a single point in space onto the plane. Set the point... p ( x , y , z ) is a point q ( x 0, y 0, z 0) The projection point on the tangent plane. Slice.normal Let be the normal vector of the tangent plane, which can be expressed as: Slice.normal=n= ( A,B,C (1) Because vectors pq With normal vector n Parallel, according to the point-slope form of the equation of a straight line: (2) Transformation can yield a straight line pq Parametric equations: (3) Because of the point p ( x , y , z () is a point in the tangent plane, therefore point p The equation of the plane satisfying the tangent plane can be obtained by substituting the above equation into the equation: A ( x 0 -At ) + y ( y 0 -Bt )+ z ( z 0 -Ct )+ D= 0(4) It can be calculated t Value: (5) Substituting equation (5) into the parametric equation (3) yields the point. p ( x , y , z Coordinates of ) (6) Repeat the above steps until all point clouds of the slice have been completely traversed, and the projection result can be obtained.
[0043] Step S4.2: Transform the point cloud coordinate system. The plane containing the sliced point cloud is not on the Z-plane, meaning its x and y values do not correspond one-to-one with the image pixels. Therefore, it cannot be directly rasterized into data and needs to be rotated to the Z-plane first.
[0044] Before establishing the rotation matrix, it is necessary to first establish the coordinate system of the plane to which the rotation is to be performed. This begins with the normal vector of the tangent plane. Slice.normal As the Z-axis vector, the cross product of the normal vector and the weld trajectory direction vector is used as the proposed Y-axis vector Y'. Then, the X-axis vector can be obtained by the cross product of the Z-axis vector and the Y-axis vector.
[0045] Then, adjust the intended Y-axis vector using the calculated X-axis vector to obtain:
[0046] The coordinate system vectors established in this way are guaranteed to be pairwise perpendicular, thus the rotation matrix can be obtained:
[0047] in, p Let be a point in the tangent plane, and denote the coordinates of the point in the original coordinate system as . P C The coordinates of the point in the transformed coordinate system are P W We can obtain:
[0048]
[0049] Repeating the above steps will yield a planar point cloud.
[0050] Step S4.3: Convert the planar point cloud into a two-dimensional image. After projecting the sliced point cloud onto the cutting plane, the discrete points can be meshed. p W ( x W , y W Pixelate and binarize the image to obtain the coordinates of points in the two-dimensional image. And pixel values. First, calculate the extreme points of the point cloud point set. , Using the minimum point as the top-left corner reference point of the image, and to facilitate subsequent input into the deep learning network, the image width is set to 1216 and the height to 200. The coordinates of the binarized image can then be expressed as: (7) (8) in, s Indicates the grid width. m The length of the protective margin is set to prevent the loss of edge data. [·] is a rounding operation performed because the pixel coordinates of the image are all integers.
[0051] A single point cloud slice after projection, such as Figure 5 As shown, multiple point cloud slices after projection are as follows: Figure 6 As shown.
[0052] Step S5: Input the two-dimensional slice point cloud data into the target detection network for defect detection to obtain the two-dimensional coordinates of the defect location.
[0053] Specifically, the target detection network is obtained through pre-training. First, a large number of weld contour images are acquired, and then image annotation software such as LabelMe2Coco is used to annotate the undercut defects in the weld contour images. Figure 7 The annotations shown are used to generate a JSON file containing 295 weld contour images with undercut defects. The training and validation sets are divided in a 9:1 ratio, with 265 images for training and 30 for validation. These are then fed into the RT-DETR real-time end-to-end object detection network with configured training parameters for defect detection training. The training batch size is set to 4, the number of training epochs is set to 6960, and the model file is saved every 58 epochs. The input image size is 1216. 200.
[0054] Step S6: Convert the two-dimensional coordinates of the defect location into three-dimensional coordinates of the defect location to obtain three-dimensional point cloud data of weld undercut defect.
[0055] Specifically, since the defect location coordinates provided by the predicted JSON file are coordinates on a two-dimensional image, while the system visualization requires three-dimensional point cloud coordinates, it is necessary to restore the two-dimensional coordinates to the three-dimensional point cloud.
[0056] Set the coordinates of the top left and bottom right corners of the 3D point cloud detection box as follows: , According to equations (12) and (13), we can know that:
[0057]
[0058]
[0059]
[0060] point With point It's on a planar point cloud, so By rotation matrix The point coordinates can be restored to the area where the weld point cloud is located. The calculation formula is as follows:
[0061]
[0062] The final result shows the undercut defect in the weld point cloud as follows: Figure 8 As shown.
[0063] This disclosure discloses a method for detecting weld undercut defects. By using a weld skeleton extraction algorithm based on point cloud, the point cloud data is converted into two-dimensional slices. Defects are detected on the slices and the defect locations are restored to the point cloud image. This improves the accuracy of defect identification when the defect is similar in color to the base material, has an indistinct outline, or an irregular shape. It solves the problem that it is difficult to identify and locate defects using only 2D machine vision technology.
[0064] like Figure 9 As shown, another embodiment of this disclosure provides a weld undercut defect detection system, comprising: Module 91 is used to acquire weld point cloud data; The feature skeleton module 92 is used to obtain the main feature skeleton of the weld seam based on the weld seam point cloud data; The slicing module 93 is used to perform cross-sectional slicing processing on the main feature skeleton of the weld seam to obtain three-dimensional slice point cloud data; Data conversion module 94 is used to convert the three-dimensional slice point cloud data into two-dimensional slice point cloud data; The detection module 95 is used to input the two-dimensional slice point cloud data into the target detection network for defect detection and obtain the two-dimensional coordinates of the defect location; The coordinate module 96 is used to convert the two-dimensional coordinates of the defect location into three-dimensional coordinates of the defect location to obtain three-dimensional point cloud data of the weld undercut defect.
[0065] Specifically, the weld undercut defect detection system of this disclosure is used to implement the weld undercut defect detection method described in the above embodiments. The specific implementation process has been described in detail in the previous embodiment and will not be repeated here.
[0066] like Figure 10 As shown, another embodiment of this disclosure provides an electronic device, including: At least one processor 101; and a memory 102 communicatively connected to the at least one processor 101 for storing one or more programs that, when executed by the at least one processor 101, enable the at least one processor 101 to implement the weld undercut defect detection method described above.
[0067] The memory 102 and processor 101 are connected via a bus, which may include any number of interconnecting buses and bridges. The bus connects various circuits of one or more processors 101 and memory 102 together. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 101 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 101.
[0068] Processor 101 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 102 can be used to store data used by processor 101 during operation.
[0069] Another embodiment of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the weld undercut defect detection method described above.
[0070] The computer-readable storage medium may be included in the systems or electronic devices disclosed herein, or it may exist independently.
[0071] Computer-readable storage media can be any tangible medium that contains or stores a program, and can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, optical fibers, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0072] Computer-readable storage media may also include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code, specific examples of which include, but are not limited to, electromagnetic signals, optical signals, or any suitable combination thereof.
[0073] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of this disclosure, and this disclosure is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this disclosure, and these modifications and improvements are also considered to be within the scope of protection of this disclosure.
Claims
1. A method for detecting weld undercut defects, characterized in that, The method includes: Acquire weld seam point cloud data; Based on the weld point cloud data, a main feature skeleton of the weld is obtained, including: preprocessing the weld point cloud data sequentially using octree segmentation and voxel filtering downsampling; sequentially performing random sampling and weighted local optimal projection (WLOP) operator resampling on the weld point cloud data; shrinking the weld point cloud data through local median iteration to obtain feature skeleton points; and performing skeleton connection and smoothing on the feature skeleton points to obtain the main feature skeleton of the weld. The skeleton connection of the feature skeleton points includes: determining optional skeleton points based on the linearity of each skeleton point; and using the optional skeleton point with the highest linearity as the starting point to connect multiple neighboring optional skeleton points. The weld main feature skeleton is sliced using a cross-sectional plane to obtain three-dimensional sliced point cloud data, including: slicing each segment of the point cloud of the weld main feature skeleton at equal intervals. The three-dimensional slice point cloud data is converted into two-dimensional slice point cloud data; The two-dimensional slice point cloud data is input into the target detection network for defect detection to obtain the two-dimensional coordinates of the defect location. The two-dimensional coordinates of the defect location are converted into three-dimensional coordinates to obtain three-dimensional point cloud data of the weld undercut defect.
2. The method according to claim 1, characterized in that, The step of converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data includes: Project each of the three-dimensional slice point clouds onto a two-dimensional plane; The three-dimensional coordinate system of each of the three-dimensional slice point clouds is converted into a two-dimensional coordinate system to obtain a two-dimensional slice point cloud; The two-dimensional slice point cloud is converted into a two-dimensional image.
3. The method according to claim 1, characterized in that, The target detection network is pre-trained through the following steps: Obtain a set of weld seam outline images; Mark the undercut defects in each weld contour image in the image set; The RT-DETR detection network is trained using the set of labeled weld contour images as the training set to obtain the target detection network.
4. The method according to claim 1, characterized in that, The process of converting the two-dimensional coordinates of the defect location into three-dimensional coordinates to obtain three-dimensional point cloud data of the weld undercut defect includes: Set the coordinates of the 3D point cloud detection frame for weld undercut defects; By using a rotation matrix, the coordinates of the three-dimensional point cloud detection frame are restored to the area where the weld point cloud is located, thus obtaining the display of the weld undercut defect on the weld point cloud.
5. A weld undercut defect detection system, characterized in that, The system includes: The acquisition module is used to acquire weld seam point cloud data; The feature skeleton module is used to obtain the main feature skeleton of the weld seam based on the weld seam point cloud data, including: preprocessing the weld seam point cloud data by sequentially using octree segmentation and voxel filtering downsampling; sequentially performing random sampling and weighted local optimal projection (WLOP) operator resampling on the weld seam point cloud data; shrinking the weld seam point cloud data through local median iteration to obtain feature skeleton points; and performing skeleton connection and smoothing on the feature skeleton points to obtain the main feature skeleton of the weld seam. The skeleton connection of the feature skeleton points includes: determining optional skeleton points based on the linearity of each skeleton point; and using the optional skeleton point with the highest linearity as the starting point to connect multiple neighboring optional skeleton points. The slicing module is used to perform cross-sectional slicing processing on the main feature skeleton of the weld seam to obtain three-dimensional sliced point cloud data, including: slicing each segment of the point cloud interval of the main feature skeleton of the weld seam at equal intervals. The data conversion module is used to convert the three-dimensional slice point cloud data into two-dimensional slice point cloud data; The detection module is used to input the two-dimensional slice point cloud data into the target detection network for defect detection and obtain the two-dimensional coordinates of the defect location; The coordinate module is used to convert the two-dimensional coordinates of the defect location into three-dimensional coordinates of the defect location, thereby obtaining three-dimensional point cloud data of the weld undercut defect.
6. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor is used to store one or more programs that, when executed by the at least one processor, enable the at least one processor to implement the weld undercut defect detection method according to any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the weld undercut defect detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method for quickly identifying and evaluating welding defects of pressure pipeline
CN114778687A
3D defect detection method and system for top sealing weld joint of new energy cylindrical battery
CN115032200A