Welding seam undercut defect detection method and system, electronic equipment and storage medium
Through the weld skeleton extraction algorithm and target detection network based on point cloud, the accurate identification and positioning of irregular shapes of defects is achieved, and the problems of manual inspection and poor adaptability of structured light methods in the prior art are solved, and the problems of artificial inspection and poor adaptability of structured light methods are improved. The accuracy and efficiency of welded edge defect detection.
Patent Information
- Application Number
- CN202411153873.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The existing weld undercut defect detection methods rely on manual inspection to be prone to errors and omissions. The structured light-based method is costly and has poor adaptability to multi-plane welds, making it difficult to accurately identify and position undercut defects with irregular shapes.
Using a point cloud-based weld skeleton extraction algorithm, the weld main feature skeleton is extracted through octree segmentation, voxel filtering downsampling, random sampling and L1 median iteratively, and the section plane slice processing is performed and converted into two-dimensional slice data. Enter the target detection network for defect detection to obtain the three-dimensional coordinates of the defect location.
It improves the accuracy of identification of irregular shape edge defects, solves the problem of difficulty in identifying and positioning of 2D machine vision technology, and enhances the detection ability of multi-plane welds.
Smart Images

Figure CN119048467A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure belong to the technical field of weld undercut defect detection, and specifically relate to a weld undercut defect detection method, system, electronic device and storage medium. Background Art
[0002] Correct detection of surface defects in metal welds is a prerequisite for ensuring the safe use of workpieces. Among them, undercut defects refer to irregular, jagged or uneven edges of welded joints. The presence of undercuts will affect the appearance and dimensional accuracy of welded joints, and may also reduce the strength and sealing of welded joints, thus posing a safety hazard to industrial applications. Therefore, weld defects must be detected.
[0003] In actual engineering, the detection of weld undercut mainly relies on manual inspection, which relies on the personal experience, skills and subjective judgment of the inspectors, which is easy to cause problems such as false detection and missed detection. At present, domestic and foreign scholars have carried out certain research in the field of weld undercut defect detection. Jiang Meixian et al. proposed a weld defect detection based on DeepLab-V3 and three-dimensional point cloud data, using the cycle consistency adversarial network to expand the sample data, which can detect surface defects such as undercut and pores; Jia Rui et al. proposed a fillet weld appearance detection algorithm based on line structured light, using the normal average method to extract the center line of the structured light stripe; Zhang Tianyu et al. proposed a weld surface quality detection algorithm based on structured light, using a random sampling consistency algorithm to fit the plane segmentation weld point cloud, and obtain the weld contour line through point cloud slicing, but when the weld point cloud is multi-plane, 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, which is not applicable to other welding joints.
[0004] The undercut feature extraction method based on structured light has corresponding limitations. It is expensive and can only process fillet welds or plane welds. It has poor adaptability to multi-plane weld feature extraction. The weld undercut defect appears as a thick and short black strip image at the edge of the weld on the film, close to the parent material. The blackness is uneven, the outline is not obvious, and the shape is irregular. It cannot be accurately identified and located using only 2D machine vision technology. Summary of the invention
[0005] The embodiments of the present disclosure aim to solve at least one of the technical problems existing in the prior art, and provide a weld undercut defect detection method, system, electronic device and storage medium.
[0006] One aspect of the present disclosure provides a method for detecting weld undercut defects.
[0007] The law includes:
[0008] Get weld point cloud data;
[0009] According to the weld point cloud data, a weld main body feature skeleton is obtained;
[0010] Performing plane slicing processing on the main characteristic skeleton of the weld to obtain three-dimensional slicing point cloud data;
[0011] Converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data;
[0012] Inputting the two-dimensional slice point cloud data into a target detection network for defect detection to obtain two-dimensional coordinates of the defect position;
[0013] The two-dimensional coordinates of the defect position are converted into three-dimensional coordinates of the defect position to obtain three-dimensional point cloud data of the weld undercut defect.
[0014] Optionally, obtaining a weld main body feature skeleton according to the weld point cloud data includes:
[0015] The weld point cloud data is preprocessed by sequentially using octree segmentation and voxel filtering downsampling;
[0016] Sequentially performing random sampling and WLOP operator resampling on the weld point cloud data;
[0017] The weld point cloud data is contracted by local median iteration to obtain characteristic skeleton points;
[0018] The characteristic skeleton points are subjected to skeleton connection and smoothing processing to obtain the weld main body characteristic skeleton.
[0019] Optionally, the performing skeleton connection on the characteristic skeleton points includes:
[0020] Determine the optional skeleton points according to the linearity of each skeleton point;
[0021] The optional skeleton point with the maximum linear degree is used as the starting point to connect multiple neighboring optional skeleton points.
[0022] Optionally, the step of performing plane slicing processing on the weld main feature skeleton to obtain three-dimensional slice point cloud data includes:
[0023] Each point cloud interval of the weld main feature skeleton is sliced at equal intervals.
[0024] Optionally, converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data includes:
[0025] Projecting each of the three-dimensional slice point clouds onto a two-dimensional plane;
[0026] Converting the three-dimensional coordinate system of each of the three-dimensional slice point clouds into a two-dimensional coordinate system to obtain a two-dimensional slice point cloud;
[0027] The two-dimensional slice point cloud is converted into a two-dimensional image.
[0028] Optionally, the target detection network is pre-trained through the following steps:
[0029] Obtain a weld contour image set;
[0030] marking undercut defects on each weld contour line image in the image set;
[0031] The weld contour image set with annotations is used as a training set to train the RT-DETR detection network to obtain a target detection network.
[0032] Optionally, converting the two-dimensional coordinates of the defect position into three-dimensional coordinates of the defect position to obtain three-dimensional point cloud data of the weld undercut defect includes:
[0033] Set the coordinates of the 3D point cloud detection frame of the weld undercut defect;
[0034] The coordinates of the three-dimensional point cloud detection frame are restored to the area where the weld point cloud is located through a rotation matrix, so that the display of the weld undercut defect on the weld point cloud is obtained.
[0035] Another aspect of the present disclosure provides a weld undercut defect detection system, the system comprising:
[0036] An acquisition module is used to acquire weld point cloud data;
[0037] A feature skeleton module is used to obtain a weld main body feature skeleton according to the weld point cloud data;
[0038] A slicing module is used to perform plane slicing processing on the main feature skeleton of the weld to obtain three-dimensional slicing point cloud data;
[0039] A data conversion module, used for converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data;
[0040] A detection module, used for inputting the two-dimensional slice point cloud data into a target detection network for defect detection to obtain two-dimensional coordinates of defect positions;
[0041] The coordinate module is used to convert the two-dimensional coordinates of the defect position into three-dimensional coordinates of the defect position to obtain three-dimensional point cloud data of the weld undercut defect.
[0042] Another aspect of the present disclosure provides an electronic device, comprising:
[0043] At least one processor; and a memory in communication with the at least one processor, for storing one or more programs, which, when executed by the at least one processor, enable the at least one processor to implement the weld undercut defect detection method described above.
[0044] Another aspect of the present disclosure provides a computer-readable storage medium storing a computer program, wherein the computer program implements the weld undercut defect detection method described above when executed by a processor.
[0045] A weld undercut defect detection method, system, electronic device and storage medium of the disclosed embodiments convert point cloud data into two-dimensional slices through a weld skeleton extraction algorithm based on point cloud, perform defect detection on the slices and restore the defect positions to the point cloud map, thereby improving the accuracy of defect recognition in cases where the defect is similar in color to the base material, the outline is not obvious, the shape is irregular, etc., and solving the problem that defects are difficult to identify and locate using only 2D machine vision technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of a flow chart of a weld undercut defect detection method according to an embodiment of the present disclosure;
[0047] Figure 2 A schematic diagram of a main feature skeleton of a weld point cloud according to another embodiment of the present disclosure;
[0048] Figure 3 A schematic diagram of point cloud cutting plane slicing processing according to another embodiment of the present disclosure;
[0049] Figure 4 A schematic diagram of a point cloud slicing sequence according to another embodiment of the present disclosure;
[0050] Figure 5 A schematic diagram of a single point cloud slice after projection according to another embodiment of the present disclosure;
[0051] Figure 6 A schematic diagram of multiple point cloud slices after projection according to another embodiment of the present disclosure;
[0052] Figure 7 It is a schematic diagram of a weld contour image after annotation according to another embodiment of the present disclosure;
[0053] Figure 8 A schematic diagram of a weld point cloud showing an undercut defect according to another embodiment of the present disclosure;
[0054] Fig. 9 It is a structural schematic diagram of a weld undercut defect detection system according to another embodiment of the present disclosure;
[0055] Fig.10The figure is a schematic diagram of the structure of an electronic device according to another embodiment of the present disclosure. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0057] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0058] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0059] 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 component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present disclosure. As used in this disclosure, the term "and / or" includes any one of the associated listed items and all combinations of one or more.
[0060] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present disclosure, and therefore cannot be used to limit the protection scope of the present disclosure.
[0061] like Figure 1 As shown, an embodiment of the present disclosure provides a method for detecting weld undercut defects, the method comprising:
[0062] Step S1, obtaining weld point cloud data.
[0063] Specifically, the weld undercut defect is at the edge of the weld on the film, and it presents a short black strip image on the parent material side, with uneven blackness, unclear outline, and irregular shape. It cannot be accurately identified and located using 2D machine vision technology. Therefore, this embodiment uses 3D machine vision technology such as structured light cameras to collect weld point cloud data as the basis for weld undercut defect detection. The number of three-dimensional original point clouds of the structural weld obtained by scanning with a structured light camera is 800,000 to 1,000,000, and the number of weld area point clouds obtained after feature area detection is about 200,000.
[0064] Step S2: obtaining a weld main body feature skeleton according to the weld point cloud data.
[0065] Specifically, in order to solve the problem of extracting three-dimensional features of welds of structural parts, an embodiment of the present disclosure proposes a weld skeleton extraction algorithm based on the L1 median method.
[0066] First, the weld point cloud data obtained in the previous step S1 is segmented by an octree. By calculating the distance between any two points in the point cloud, a point cloud set that meets the requirements within the distance threshold is selected, and the n nearest neighbor points of all points are searched in the point cloud data, which is called the nearest neighbor problem. However, the method of solving the distance between all points and searching them one by one is inefficient, and it takes a long time and is difficult to traverse and search all point clouds. In order to shorten the retrieval time of the neighboring points of the weld point cloud data and improve the retrieval efficiency, the technical solution disclosed in the present invention adopts an octree segmentation method with a lower structural depth to retrieve the original weld point cloud, which can organize and arrange the disordered and scattered original point cloud data in an orderly manner for easy retrieval and search, and at the same time, simplify the point cloud data in an orderly manner according to the index, and define the neighborhood points for the weld feature points. Each node in the point cloud image space generates 8 identical child nodes, unifies the geometric information of all voxels in the same point cloud space, and keeps them consistent. For point cloud data with uniform spatial distribution, the octree structure has a higher retrieval efficiency and is suitable for segmenting point cloud data on the surface of the workpiece.
[0067] The segmented weld point cloud data is downsampled by voxel filtering, and the voxelization method is used to reduce the number of point clouds. The points close to the center point in the voxel grid are used to replace all the point clouds in the voxel. This method is more accurate than directly using the center point. It can preserve the shape characteristics of the point cloud while reducing the point cloud data. After using octree segmentation and voxel filtering for downsampling, the number of weld point clouds is greatly reduced, and the point cloud simplification rate is about 95%, but it can still effectively retain the three-dimensional characteristics of the weld, and to a certain extent remove outliers, burrs and noise caused by light reflection.
[0068] After that, the weld point cloud after voxel filtering is shrunk to the initial sampling point through random sampling to serve as the initial skeleton point. Too many point clouds will increase the amount of calculation and reduce the efficiency of the algorithm. Through multiple experiments, it is found that the number of sampling points has little effect on the skeleton extraction results. In order to ensure the running speed of the algorithm, the technical solution of this embodiment sets the number of random sampling points to 8% of the number of weld point clouds.
[0069] The core of the WLOP (weighted locally optimal projection) 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 resilient to non-uniform sampling and can generate more evenly distributed sampling points. The input sample point neighborhood should include at least two rings of adjacent sample points. Using a smaller neighborhood size may not generate a regularized result, while using a larger neighborhood size will produce underfitting, causing the sample points to shrink to the inside of the local surface. Therefore, the technical solution of this embodiment sets the neighborhood radius parameter to 0.5, and resamples the randomly sampled original points with the WLOP operator to obtain more uniform initial sampling points, which is more conducive to weld skeleton extraction.
[0070] Then, the L1-median skeleton algorithm is used to perform skeleton contraction extraction on the weld point cloud through local median iteration. The L1 median point cloud skeleton extraction algorithm extracts the characteristic skeleton points by selecting the median in the neighborhood of the sampling point instead of the mean. In the continuous iterative contraction process, the neighborhood radius is continuously expanded, and the generated new skeleton points are redistributed to the center of the source point in the neighborhood to complete the regular arrangement of the weld point cloud skeleton points.
[0071] Finally, the characteristic skeleton points are skeleton-connected and smoothed. The optional skeleton points are determined according to the linearity of each skeleton point. If the linearity is greater than 0.9, it means that the corresponding skeleton point is linearly distributed in its neighborhood, and the skeleton point is marked as an optional skeleton point. The skeleton point with the largest linearity is found as the starting point of the skeleton branch, and the optional skeleton points of the K nearest neighbors are connected. The connection is stopped at the bifurcation position or the edge position to form a single skeleton branch. The optional skeleton point with the largest linearity is found among the remaining optional skeleton points, and the above process is repeated until there are no optional skeleton points, thereby obtaining a skeleton branch set. Curve fitting is performed on each skeleton branch to form a smooth, continuous and compact skeleton.
[0072] Finally, the main feature skeleton of the weld point cloud is obtained as follows Figure 2 shown.
[0073] Step S3: performing plane slicing processing on the weld main body feature skeleton according to the weld main body feature skeleton to obtain three-dimensional slice point cloud data.
[0074] Specifically, in order to obtain the weld contour, it is necessary to use the weld main feature skeleton obtained in the above step S2 to perform the following operations on the workpiece weld local point cloud: Figure 3 The slicing process of the cutting plane shown in the figure. The weld skeleton plus the two end points of the starting point and the end point, a total of K+2 3D coordinate points, divide the skeleton into K segments. Considering that the weld trajectory direction of each segment is different, if the whole segment is directly sliced, the intercepted weld trajectory map may not be perpendicular to the weld trajectory direction, which may affect the subsequent judgment of the undercut defect. Therefore, the point cloud interval of each segment is sliced at equal intervals. In order to ensure that the trajectory directions of the two trajectory points before and after the cutting plane are consistent, the plane normal vector mean Slice pre and Slice next As the main direction of the cutting plane. Then calculate the distance Dis between the two planes (Slice pre ,Slice next ), give the appropriate point cloud tangent spacing DistPlat, and get the number of slices N in the interval. Determine the tangent plane normal vector Slice.normal and a point p in the plane to get the plane equation of the tangent plane:
[0075]
[0076] When the distance from a data point to the cutting plane is less than a threshold, the point is added to the point cloud slice set. Different distance thresholds can contain different amounts of point cloud data. When the threshold is larger, the more data it contains, the larger the span along the welding direction, and the corresponding amount of calculation will increase; on the contrary, when the threshold is smaller, the amount of data it contains is sparser, and the information accuracy in the cutting plane is worse. The present invention sets the point cloud slice thickness Delta to 0.1 mm, and a series of point cloud slices with a thickness of 0.2 mm can be obtained.
[0077] The algorithm for performing equally spaced slicing can be expressed as follows:
[0078]
[0079]
[0080]
[0081] The final point cloud slice sequence is as follows Figure 4 shown.
[0082] Step S4: convert the three-dimensional slice point cloud data into two-dimensional slice point cloud data.
[0083] 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 slicing in the previous step S3, the point cloud data needs to be converted into two-dimensional data.
[0084] Step S4.1, project the point cloud slice onto the plane. The problem of projecting a spatial point cloud onto a plane is actually the problem of projecting a point in space onto the plane. Set point p(x, y, z) to be the projection point of point q(x0, y0, z0) on the tangent plane, and Slice.normal to be the normal vector of the tangent plane, which can be expressed as:
[0085] Slice.normal=n=(A,B,C) (1)
[0086] Since vector pq is parallel to the normal vector n, we can get the point-slope equation of the line:
[0087]
[0088] The transformation can obtain the parametric equation of the straight line pq:
[0089]
[0090] Because point p(x,y,z) is a point in the tangent plane, point p satisfies the plane equation of the tangent plane. Substituting the above equation into the equation, we get:
[0091] A(x0-At)+ y(y0-Bt)+ z(z0-Ct)+D=0 (4)
[0092] The value of t can be calculated:
[0093]
[0094] Substituting equation (5) into the parametric equation (3) yields the coordinate value of point p (x, y, z):
[0095]
[0096] Repeat the above steps until all the point clouds are completely traversed and sliced, and then you can get the projection result.
[0097] Step S4.2: Convert the point cloud coordinate system. The plane of the sliced point cloud is not on the Z plane, that is, its x and y values do not correspond one-to-one to the image pixels, and the data cannot be directly rasterized. The point cloud slice plane needs to be rotated to the Z plane first.
[0098] Before establishing the rotation matrix, you need to establish the coordinate system of the plane to be rotated. First, use the normal vector Slice.normal of the tangent plane as the Z-axis vector, and the cross product of the normal vector and the weld trajectory direction vector 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:
[0099]
[0100] And use the calculated X-axis vector to adjust the proposed Y-axis vector, and get:
[0101]
[0102] The coordinate system vectors established in this way can ensure that they are perpendicular to each other, so the rotation matrix can be obtained:
[0103]
[0104] Among them, p is a point in the tangent plane, and the coordinates of the point in the original coordinate system are recorded as P C , the coordinates of the point in the transformed coordinate system are P W , we can get:
[0105]
[0106]
[0107] Repeat the above steps to obtain the plane point cloud.
[0108] Step S4.3, convert the plane point cloud into a two-dimensional image. After projecting the slice point cloud onto the cutting plane, the discrete points p can be gridded. W (x W ,y W ) to pixelate and binarize to obtain the two-dimensional image point coordinates (x′, y′) and pixel values. First, calculate the maximum point of the point cloud point set Taking the minimum point as the reference point of the upper left corner of the image, in order to facilitate the subsequent input of the deep learning network, the image width is set to 1216 and the height is 200. The coordinates of the binary image can be expressed as:
[0109]
[0110]
[0111] Where s is the grid width, m is the length of the protection margin set to prevent edge data loss, and [·] is a rounding operation performed because the pixel coordinates of the image are all integers.
[0112] A single point cloud slice after projection is as follows Figure 5As shown in Figure 2, multiple point cloud slices after projection are as follows: Figure 6 shown.
[0113] 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 position.
[0114] Specifically, the target detection network is obtained by pre-training. First, a large number of weld contour images are obtained, and the undercut defects in the weld contour images are annotated using image annotation software such as labelme2coco. Figure 7 The annotations shown in the figure generate a JSON file containing 295 weld contours with undercut defects. The training set and validation set are divided into 265 training sets and 30 validation sets in a ratio of 9:1. Then the images are sent to the RT-DETR real-time end-to-end target detection network to set the training parameters for defect detection training. The batch size of the training is set to 4, the number of epochs of the training is set to 6960, the model file is saved every 58 rounds, and the input image size is 1216*200.
[0115] Step S6: convert the two-dimensional coordinates of the defect position into three-dimensional coordinates of the defect position to obtain three-dimensional point cloud data of the weld undercut defect.
[0116] Specifically, since the defect location coordinates provided by the predicted JSON file are coordinates on a two-dimensional image, and the system visualization display requires three-dimensional point cloud coordinates, the two-dimensional coordinates need to be restored to the three-dimensional point cloud.
[0117] Set the coordinates of the upper left corner and the lower right corner of the 3D point cloud detection box to A(x″1, y″1, z″1) and B(x″2, y″2, z″2). According to equations (12) and (13), we can know that:
[0118]
[0119]
[0120]
[0121]
[0122] Point A (x″1, y″1, z″1) and point B (x″2, y″2, z″2) are on the plane point cloud, so z″1=z″2=0. Through the rotation matrix The point coordinates can be restored to the area where the weld point cloud is located. The calculation formula is as follows:
[0123]
[0124]
[0125] The final undercut defect is displayed on the weld point cloud as follows: Figure 8 shown.
[0126] A weld undercut defect detection method in an embodiment of the present disclosure converts point cloud data into two-dimensional slices through a weld skeleton extraction algorithm based on point cloud, performs defect detection on the slices and restores the defect positions to the point cloud map, thereby improving the accuracy of defect recognition in cases where the defect is similar in color to the base material, the outline is not obvious, the shape is irregular, etc., and solves the problem that defects are difficult to identify and locate using only 2D machine vision technology.
[0127] like Fig. 9 As shown, another embodiment of the present disclosure provides a weld undercut defect detection system, comprising:
[0128] An acquisition module 91 is used to acquire weld point cloud data;
[0129] A feature skeleton module 92 is used to obtain a weld body feature skeleton according to the weld point cloud data;
[0130] A slicing module 93 is used to perform a plane slicing process on the weld main feature skeleton to obtain three-dimensional slicing point cloud data;
[0131] A data conversion module 94, used to convert the three-dimensional slice point cloud data into two-dimensional slice point cloud data;
[0132] A detection module 95 is used to input the two-dimensional slice point cloud data into a target detection network for defect detection to obtain two-dimensional coordinates of defect locations;
[0133] The coordinate module 96 is used to convert the two-dimensional coordinates of the defect position into three-dimensional coordinates of the defect position to obtain three-dimensional point cloud data of the weld undercut defect.
[0134] Specifically, a weld undercut defect detection system in an embodiment of the present disclosure is used to implement the weld undercut defect detection method described in the above embodiment. The specific implementation process has been described in detail in the previous embodiment and will not be repeated here.
[0135] like Fig.10 As shown, another embodiment of the present disclosure provides an electronic device, including:
[0136] At least one processor 101; and a memory 102 communicatively connected to the at least one processor 101, for storing one or more programs, which, 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.
[0137] The memory 102 and the processor 101 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 101 and the 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 are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 101 is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor 101.
[0138] The processor 101 is responsible for managing the bus and general processing, and may also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 102 may be used to store data used by the processor 101 when performing operations.
[0139] Yet another embodiment of the present disclosure provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the weld undercut defect detection method described above.
[0140] The computer-readable storage medium may be included in the system or electronic device of the present disclosure, or may exist independently.
[0141] Computer-readable storage media may be any tangible media that contains or stores a program, which may be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, optical fiber, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0142] The computer-readable storage medium may also include a data signal propagated in baseband or as part of a carrier wave, in which the computer-readable program code is carried. Specific examples include but are not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0143] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.
Claims
1. A method for detecting weld undercut defects, characterized in that: The method comprises: Get weld point cloud data; According to the weld point cloud data, a weld main body feature skeleton is obtained; Performing plane slicing processing on the main characteristic skeleton of the weld to obtain three-dimensional slicing point cloud data; Converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data; Inputting the two-dimensional slice point cloud data into a target detection network for defect detection to obtain two-dimensional coordinates of the defect position; The two-dimensional coordinates of the defect position are converted into three-dimensional coordinates of the defect position 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 obtaining a weld main feature skeleton according to the weld point cloud data includes: The weld point cloud data is preprocessed by sequentially using octree segmentation and voxel filtering downsampling; Sequentially performing random sampling and WLOP operator resampling on the weld point cloud data; The weld point cloud data is contracted by local median iteration to obtain characteristic skeleton points; The characteristic skeleton points are subjected to skeleton connection and smoothing processing to obtain the weld main body characteristic skeleton.
3. The method according to claim 2, characterized in that The skeleton connection of the characteristic skeleton points includes: Determine the optional skeleton points according to the linearity of each skeleton point; The optional skeleton point with the maximum linear degree is used as the starting point to connect multiple neighboring optional skeleton points.
4. The method according to claim 1, characterized in that: The step of performing plane slicing processing on the weld main feature skeleton to obtain three-dimensional slicing point cloud data includes: Each point cloud interval of the weld main feature skeleton is sliced at equal intervals.
5. The method according to claim 1, characterized in that The converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data comprises: Projecting each of the three-dimensional slice point clouds onto a two-dimensional plane; Converting the three-dimensional coordinate system of each of the three-dimensional slice point clouds 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.
6. The method according to claim 1, characterized in that The target detection network is pre-trained by the following steps: Obtain a weld contour image set; marking undercut defects on each weld contour line image in the image set; The weld contour image set with annotations is used as a training set to train the RT-DETR detection network to obtain a target detection network.
7. The method according to claim 1, characterized in that The step of converting the two-dimensional coordinates of the defect position into the three-dimensional coordinates of the defect position to obtain three-dimensional point cloud data of the weld undercut defect comprises: Set the coordinates of the 3D point cloud detection frame of the weld undercut defect; The coordinates of the three-dimensional point cloud detection frame are restored to the area where the weld point cloud is located through a rotation matrix, so that the display of the weld undercut defect on the weld point cloud is obtained.
8. A weld undercut defect detection system, characterized in that: The system comprises: An acquisition module is used to acquire weld point cloud data; A feature skeleton module is used to obtain a weld main body feature skeleton according to the weld point cloud data; A slicing module is used to perform plane slicing processing on the main feature skeleton of the weld to obtain three-dimensional slicing point cloud data; A data conversion module, used for converting the three-dimensional slice point cloud data into two-dimensional slice point cloud data; A detection module, used for inputting the two-dimensional slice point cloud data into a target detection network for defect detection to obtain two-dimensional coordinates of defect positions; The coordinate module is used to convert the two-dimensional coordinates of the defect position into three-dimensional coordinates of the defect position to obtain three-dimensional point cloud data of the weld undercut defect.
9. 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, and when the one or more programs are executed by the at least one processor, the at least one processor can implement the weld undercut defect detection method described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the weld undercut defect detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Line structured light-based cast workpiece surface quality detection method and system thereof
CN106872476A
Isomorphic model representation-based three-dimensional model generation method
CN107610221A
Wind power tower welding seam defect detection device and method based on machine vision
CN111551565A
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
Cited By
Welding position identification method and equipment based on point cloud projection skeletonization and medium
CN121883826A
