CN114354639B - Weld defect real-time detection method and system based on 3D point cloud - Google Patents

Weld defect real-time detection method and system based on 3D point cloud Download PDF

Info

Publication number
CN114354639B
CN114354639B CN202210275374.9A CN202210275374A CN114354639B CN 114354639 B CN114354639 B CN 114354639B CN 202210275374 A CN202210275374 A CN 202210275374A CN 114354639 B CN114354639 B CN 114354639B
Authority
CN
China
Prior art keywords
data
weld
contour
welding seam
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210275374.9A
Other languages
Chinese (zh)
Other versions
CN114354639A (en
Inventor
田慧云
李波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suxin Iot Solutions Nanjing Co ltd
Original Assignee
Suxin Iot Solutions Nanjing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suxin Iot Solutions Nanjing Co ltd filed Critical Suxin Iot Solutions Nanjing Co ltd
Priority to CN202210275374.9A priority Critical patent/CN114354639B/en
Publication of CN114354639A publication Critical patent/CN114354639A/en
Application granted granted Critical
Publication of CN114354639B publication Critical patent/CN114354639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a method and a system for detecting weld defects in real time based on 3D point cloud, wherein the method comprises the following steps: setting a normal welding seam outline template based on historical data; scanning the cross section of the welding seam through line laser, collecting 3D point cloud data of the welding seam in real time, and recording initial contour data obtained through line laser real-time scanning as data; performing inflection point detection based on a DBSCAN density clustering algorithm, and determining current weld contour data; and calculating the distance d between the current weld contour data and the normal weld contour template through a DTW algorithm, thereby judging whether the weld surface has defects. The method can effectively distinguish whether the surface of the welding seam has defects without constructing a complex machine learning or neural network model, greatly saves computing resources, and simultaneously realizes quick and accurate real-time detection, thereby finding the defects as early as possible in the actual production, reducing loss, avoiding welding seam scrapping, reducing repair cost and having higher production value.

Description

Weld defect real-time detection method and system based on 3D point cloud
Technical Field
The invention relates to a method and a system for detecting weld defects in real time based on 3D point cloud, and belongs to the technical field of intelligent welding.
Background
The quality detection in the welding process is very important, and whether the welding seam is qualified or not and the use requirement is met are determined. At present, the quality detection of the welding seam mainly comprises the following steps: detecting appearance and surface defects of the welding seam, detecting internal defects of the welding seam, detecting performance of the welding seam and the like. The method is mainly applied to the detection of the welding seams of the pressure container and the important bearing structure and has perfect and strict quality detection standards at present; the detection of the welding seam performance comprises the detection of mechanical property, corrosion performance and the like, and is mainly used for welding process evaluation and material weldability experiments; the detection of the appearance shape and the surface defects of the welding seams has the widest application requirements, and basically all welding seams need to be subjected to appearance and surface defect detection. At present, in the welding of important industries such as nuclear power, chemical industry containers, high-speed rail manufacturing, automobile ships and the like, strict detection of the appearance shape and surface defects of a welding seam is required besides internal detection requirements.
However, up to now, most of weld surface defect detection is still realized by visual observation and simple measurement, the efficiency is low, the scientificity and the accuracy of the weld surface defect detection are very easily influenced by subjective factors of inspectors, the industrial requirements of quick and accurate detection are difficult to meet, the traditional detection mode is post-welding detection, the timeliness is low, the repair cost is high, and the high production value is difficult to achieve.
The line laser scanning method is a relatively advanced non-contact contour detection method in the current industrial application, can obtain the contour of an object by the line laser scanning method, further obtains the appearance information of the object, and is a good three-dimensional measurement method. The patent CN201510074062.1 discloses a line laser scanning-based weld appearance shape and surface defect detection method, and when the method is used for detecting the inflection point of a weld, the method is to perform high-dimensional fitting on an actual contour curve of a weld section by adopting a least square method to obtain a fitting contour curve of the weld section, wherein the high-dimensional fitting is one of eight-order fitting to fifteen-order fitting, and then perform first-order derivation on the fitting curve. The method is complex in calculation, needs to consume a large amount of calculation resources, and is difficult to realize real-time monitoring.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the problems in the prior art, the invention provides a method and a system for detecting the weld defects in real time based on 3D point cloud, which can effectively distinguish whether the weld surface has defects or not without constructing a complex machine learning or neural network model, greatly save computing resources, and can realize quick and accurate real-time detection at a certain camera frame rate, thereby finding the defects as early as possible in the actual production, reducing loss, avoiding weld scrapping, reducing the repair cost and having higher production value.
The technical scheme is as follows: in order to achieve the aim, the invention provides a weld defect real-time detection method based on 3D point cloud, which comprises the following steps:
step 1, setting a normal welding seam outline template based on historical data;
step 2, scanning the cross section of the welding seam through line laser, collecting 3D point cloud data of the welding seam in real time, and recording initial contour data obtained through line laser real-time scanning as data;
step 3, inflection point detection is carried out based on a DBSCAN density clustering algorithm, and current welding seam outline data are determined;
and 4, calculating the distance d between the current weld contour data and the normal weld contour template through a DTW algorithm, and judging whether the weld surface has defects or not.
Further, step 2 specifically includes: and if the longitudinal direction of the welding seam is taken as the Y-axis direction, the cross section direction is taken as the X-axis direction, and the height is taken as the Z-axis direction, the linear laser scans the welding seam section in the X-axis direction along the Z-axis direction and moves along the Y-axis direction, and N points are generated by each scanning of the linear laser, so that the Z-axis data of the N points form initial contour data.
Further, step 2 further comprises data outlier processing: for data points in the data that are larger than the threshold th1, the data points are replaced by the data that is closest to the data points and smaller than th 1.
Further, step 3 specifically includes:
step 3.1, calculating the first-order difference of the data, screening out data points with the first-order difference value larger than a threshold th2, and adding the corresponding X-axis coordinate into a weld seam outline starting point alternative list start _ list;
3.2, constructing a density clustering model by adopting a DBSCAN algorithm based on the list start _ list, removing noise points, enabling each category in a clustering result to correspond to a welding seam outline, and respectively taking the minimum coordinate in each category, namely the start point position start _ index of the welding seam outline;
and 3.3, setting the width of the weld seam contour to be L, and then intercepting the current weld seam contour data from the data by the end position end _ index = start _ index + L of the weld seam contour.
Further, step 1 further comprises template data preprocessing:
step 1.1, performing down-sampling on a normal weld contour template according to the multiplying power of eta;
and step 1.2, carrying out normalization processing on the data after the down sampling to obtain final template data.
Further, step 4 specifically includes:
4.1, performing down-sampling on the current welding seam profile data according to the magnification of eta;
step 4.2, performing normalization processing on the current weld contour data after the down-sampling;
4.3, calculating the distance d between the current welding seam profile data and the final template data based on the DTW model;
and 4.4, comparing the distance d with a threshold th, wherein if d is less than or equal to th, the weld contour data captured in real time is a normal weld, and otherwise, the weld contour surface captured in real time is defective.
In addition, the invention also provides a real-time detection system for the weld defects, which comprises a data acquisition module and a data processing module, wherein the data processing module performs real-time detection of the weld defects according to the 3D point cloud data acquired by the data acquisition module by using the real-time detection method for the weld defects.
Has the advantages that: compared with the prior art, the welding seam defect real-time detection method and the welding seam defect real-time detection system based on the 3D point cloud have the following advantages:
1. based on careful observation of a large number of real industrial welding seam 3D point cloud data characteristics, the method has the advantages that the DBSCAN density clustering algorithm is firstly proposed around contour curve inflection point detection representing welding seam quality, so that complex algorithm judgment logic can be avoided in inflection point detection, meanwhile, the accuracy is high, the method can adapt to various welding seam contour anomalies, and high-accuracy detection on anomalies including but not limited to gas holes and the like is realized;
2. in order to enhance the real-time performance of the algorithm and based on the regularity of the welding seam profile, the patent provides a down-sampling combined dynamic time warping algorithm (DTW), the DTW calculation time is obviously reduced, the algorithm result of 20ms level is output in real time under the high-speed 3D sampling frequency of 50FPS, and a large amount of real welding 3D point cloud data verification is carried out.
Drawings
FIG. 1 is a flow chart of a method for real-time detection of weld defects in an embodiment of the present invention;
FIG. 2 is a flow chart of inflection point detection based on DBSCAN algorithm in the embodiment of the present invention;
FIG. 3 is a pictorial view of a weld detected in an embodiment of the present disclosure;
FIG. 4 is a weld profile data plot collected by line laser in an embodiment of the present invention;
FIG. 5 is a diagram of a DBSCAN density clustering result according to an embodiment of the present invention;
FIG. 6 is a graph of the calculation results of the embodiment of the present invention.
Detailed Description
The following description of the preferred embodiments of the present invention with reference to the accompanying drawings will more clearly and completely illustrate the technical solutions of the present invention.
FIG. 1 shows a real-time detection method for weld defects based on 3D point cloud, which comprises the following steps:
step 1, setting a normal weld contour template and a distance threshold th based on historical data, wherein the preferred th = 3;
1.1, performing down-sampling treatment according to the multiplying power of eta, wherein eta =0.25 is preferably selected in the embodiment;
and step 1.2, normalizing the data after the down-sampling to obtain final template data.
Step 2, collecting welding seam 3D point cloud data in real time;
scanning the appearance shape of the weld joint in a three-dimensional space through line laser to form 3D point cloud data, namely: and if the longitudinal direction of the welding seam is taken as an Y axis, the cross section direction is taken as an X axis, and the height direction is taken as a Z axis, the linear laser scans the welding seam section in the X axis direction along the Z axis direction and moves along the Y axis direction. In order to ensure the detection accuracy, the origin position of the x-axis is corrected before welding so as to be aligned with the center of the weld being welded.
The line laser scans once to generate N points, and the contour information of the welding seam is only reflected by a Z axis, so that only Z axis data is taken, and one piece of welding seam contour data (only the Z axis) obtained by line laser real-time scanning is recorded as data (the length is N, and a camera N =2048 used in the embodiment).
Fig. 3 is a real map of the weld detected in the embodiment, the left side is the weld being welded, the right side is the previously welded weld (defective), and 3D point cloud data of the weld and the defective weld are acquired by simultaneous scanning of line laser. FIG. 4 is a weld profile data obtained by line laser real-time scanning, wherein two boxes correspond to normal and defective welds, respectively.
Step 3, processing abnormal data values;
for all data points in data that are larger than the threshold th1, it is replaced with the most recent data before this point that is smaller than th1, preferably th1= np.
Step 4, inflection point detection is carried out based on a DBSCAN density clustering algorithm;
a normal weld profile consists of two parts: in the rising stage and the falling stage, in the rising stage of the weld seam profile, the slope is larger, so the first-order difference value is also larger, so the points with the first-order difference value larger than the threshold th2 are extracted, and then density clustering is carried out on the basis of the corresponding X-axis coordinate. The principle of density clustering is that as long as the density of a sample in a region is greater than a set threshold value, the sample is marked into a cluster close to the sample, so that X-axis coordinates corresponding to the same welding line are marked into one cluster. As shown in fig. 2, the inflection point detection process specifically includes:
step 4.1, calculating the first-order difference of the data, judging the first-order difference values one by one, and if the first-order difference value is larger than a threshold th2, adding the corresponding X-axis coordinate into a weld seam outline starting point alternative list start _ list, preferably th2= 15;
step 4.2, constructing a density clustering model (setting parameters eps = alpha and min _ samples = beta) by adopting a DBSCAN algorithm based on the alternative list start _ list, and determining a final weld contour starting point position start _ index, wherein in the embodiment, alpha =110 and beta =5 are preferred;
the clustering result of the DBSCAN density clustering model is generally-1, 0.. once, n-1 (n is the number of the weld profiles scanned by the line laser, and generally 1 in actual production), firstly, the noise points with the clustering result of-1 (which are not clustered into one class) are filtered, then each remaining class respectively corresponds to one weld profile, and the minimum coordinate in each class is respectively taken, namely the start point position start _ index of the weld profile.
Fig. 5 shows the DBSCAN density clustering results (i.e. clustering results 0 and 1) of the above embodiment, where the abscissa in the figure is the serial number of the clustering object and the ordinate is the value of the clustering object (i.e. the X-axis coordinate value in start _ list).
And 4.3, setting the width of the weld contour to be L based on manual experience, preferably L =220, and then intercepting the current weld contour data from the data by the end position end _ index = start _ index + L of the weld contour.
Step 5, calculating the distance d between the current welding seam and the template welding seam through a DTW algorithm, and judging whether the surface of the welding seam has defects or not;
step 5.1, performing down-sampling on the weld contour data captured in real time according to the magnification of eta, wherein eta =0.25 is preferred;
step 5.2, performing normalization processing on the current weld contour data after down-sampling;
step 5.3, setting dist = manhattan _ distance (dist is a DTW parameter and manhattan _ distance is a Manhattan distance) based on the DTW model, and calculating the distance d between the normal welding seam template data and the current welding seam outline data;
and 5.4, comparing d with a distance threshold th, if d is less than or equal to th, indicating that the weld contour data captured in real time is a normal weld, and otherwise, indicating that the weld contour surface captured in real time has defects.
Fig. 6 shows the calculation results of the above embodiment, where the first number in each row in the list represents the Y-axis coordinate, the two next tuples represent the data of two detected welds, the first value of the tuple is the start position (X-axis coordinate) of the weld, and the second value is the distance d between the current weld and the template weld calculated by the DTW algorithm. Therefore, the detection method can accurately find the position of the initial point of the welding seam in real time, and further realize accurate judgment of the welding seam defect through the distance between the current welding seam and the template welding seam.
In addition, the invention also provides a real-time detection system for the weld defects, which comprises a data acquisition module and a data processing module, wherein the data processing module (such as an embedded terminal) performs real-time detection of the weld defects according to the 3D point cloud data acquired by the data acquisition module (such as a depth camera) by using the real-time detection method for the weld defects.
Timely and accurate discovery of industrial welding anomalies is very important, otherwise multiple losses of quality and cost (repair time, master batch, auxiliary materials) are caused. Traditional detection methods, which are generally based on offline data or complex machine learning training modeling, have detection delays that vary by minutes. The method is based on the 3D point cloud data of the welding seam, provides a detection algorithm which does not need to be trained in advance, has the characteristics of short calculation time and strong real-time performance, enables real-time detection, real-time intervention and real-time cost reduction to be possible, and has remarkable innovativeness and high production value.
The above detailed description merely describes preferred embodiments of the present invention and does not limit the scope of the invention. Without departing from the spirit and scope of the present invention, it should be understood that various changes, substitutions and alterations can be made herein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents.

Claims (6)

1. A weld defect real-time detection method based on 3D point cloud is characterized by comprising the following steps:
step 1, setting a normal welding seam outline template based on historical data;
step 2, scanning the cross section of the welding seam through line laser, collecting 3D point cloud data of the welding seam in real time, and recording initial contour data obtained through line laser real-time scanning as data;
step 3, inflection point detection is carried out based on a DBSCAN density clustering algorithm, and current weld contour data are determined;
step 4, calculating the distance d between the current weld contour data and a normal weld contour template through a DTW algorithm, and comparing the distance d with a set threshold th to judge whether the weld surface has defects or not;
the step 3 specifically comprises:
step 3.1, calculating a first-order difference of the data, screening out data points of which the first-order difference value is greater than a threshold th2, and adding corresponding X-axis coordinates into a weld seam outline starting point alternative list start _ list;
3.2, constructing a density clustering model by adopting a DBSCAN algorithm based on the list start _ list, removing noise points, enabling each category in a clustering result to correspond to a weld seam contour, and respectively taking the minimum coordinate in each category, namely the start point position start _ index of the weld seam contour;
and 3.3, setting the width of the weld seam contour to be L, and then intercepting the current weld seam contour data from the data by the end position end _ index = start _ index + L of the weld seam contour.
2. The method for detecting the weld defects in real time based on the 3D point cloud according to claim 1, wherein the step 2 specifically comprises: and with the longitudinal direction of the welding seam as the Y-axis direction, the cross section direction as the X-axis direction and the height as the Z-axis direction, scanning the welding seam section in the X-axis direction along the Z-axis direction by the linear laser, moving along the Y-axis direction, setting N points generated by each scanning of the linear laser, and forming initial contour data by the Z-axis data of the N points.
3. The method for detecting the weld defects based on the 3D point cloud in real time as claimed in claim 1, wherein the step 2 further comprises data outlier processing: for data points in the data that are larger than the threshold th1, the data points are replaced by the data that is closest to the data points and smaller than th 1.
4. The method for detecting the weld defects based on the 3D point cloud in real time as claimed in claim 1, wherein the step 1 further comprises template data preprocessing:
step 1.1, performing down-sampling on a normal weld contour template according to the multiplying power of eta;
and step 1.2, carrying out normalization processing on the data after the down sampling to obtain final template data.
5. The method for detecting the weld defect in real time based on the 3D point cloud according to claim 4, wherein the step 4 specifically comprises:
step 4.1, performing down-sampling on the current weld contour data according to the multiplying power of eta;
step 4.2, performing normalization processing on the current weld contour data after the down-sampling;
4.3, calculating the distance d between the current welding seam profile data and the final template data based on the DTW model;
and 4.4, comparing the distance d with a threshold th, wherein if d is less than or equal to th, the weld contour data captured in real time is a normal weld, and otherwise, the weld contour surface captured in real time is defective.
6. A real-time detection system for weld defects is characterized by comprising a data acquisition module and a data processing module, wherein the data processing module adopts the detection method of any one of claims 1 to 5 to carry out real-time detection on the weld defects according to 3D point cloud data acquired by the data acquisition module.
CN202210275374.9A 2022-03-21 2022-03-21 Weld defect real-time detection method and system based on 3D point cloud Active CN114354639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210275374.9A CN114354639B (en) 2022-03-21 2022-03-21 Weld defect real-time detection method and system based on 3D point cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210275374.9A CN114354639B (en) 2022-03-21 2022-03-21 Weld defect real-time detection method and system based on 3D point cloud

Publications (2)

Publication Number Publication Date
CN114354639A CN114354639A (en) 2022-04-15
CN114354639B true CN114354639B (en) 2022-06-10

Family

ID=81095036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210275374.9A Active CN114354639B (en) 2022-03-21 2022-03-21 Weld defect real-time detection method and system based on 3D point cloud

Country Status (1)

Country Link
CN (1) CN114354639B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115032200B (en) * 2022-08-10 2022-10-21 广东省智能机器人研究院 Method and system for detecting 3D defects of sealing weld at top of new energy cylindrical battery
CN115471674B (en) * 2022-09-20 2023-06-27 浙江科达利实业有限公司 Performance monitoring system of new energy vehicle carbon dioxide pipe based on image processing
CN116168032B (en) * 2023-04-25 2023-07-18 浙江工业大学 Point cloud-based method and point cloud-based system for detecting defects of terminating weld joints
CN116214009B (en) * 2023-04-28 2023-11-03 苏芯物联技术(南京)有限公司 Gas flow rate control method based on welding state identification
CN116451045B (en) * 2023-06-14 2023-08-22 苏芯物联技术(南京)有限公司 Welding process steady-state current calculation method
CN117760343B (en) * 2023-12-22 2024-06-07 哈尔滨电机厂(镇江)有限责任公司 Flatness inspection method for cleaning after welding
CN118071759A (en) * 2024-04-25 2024-05-24 苏州杰锐思智能科技股份有限公司 Method and device for detecting exposed defects of element pins and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104697467B (en) * 2015-02-12 2017-05-24 中北大学 Weld appearance shape based on line laser scanning and surface defect detection method
CN108256577B (en) * 2018-01-18 2021-09-28 东南大学 Obstacle clustering method based on multi-line laser radar
CN112785596B (en) * 2021-02-01 2022-06-10 中国铁建电气化局集团有限公司 Dot cloud picture bolt segmentation and height measurement method based on DBSCAN clustering
CN113313712B (en) * 2021-07-30 2021-11-09 季华实验室 Battery gluing defect detection method and device, electronic equipment and storage medium
CN113848182B (en) * 2021-09-01 2023-07-07 中国航空制造技术研究院 Composite material layering quality online detection system and detection method

Also Published As

Publication number Publication date
CN114354639A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
CN114354639B (en) Weld defect real-time detection method and system based on 3D point cloud
CN111103291A (en) Image recognition and quality intelligent evaluation system based on product weld joint characteristics
CN111815555A (en) Metal additive manufacturing image detection method and device combining anti-neural network with local binary
CN112557445B (en) Defect online detection method, device and system based on additive manufacturing
CN114170176B (en) Automatic detection method for welding seam of steel grating based on point cloud
CN116309556B (en) Steel member finished product quality management method based on machine vision technology
CN116560327A (en) Electric tool production control method and system based on Internet of things
CN115018827A (en) Automatic detection method for quality of building material weld joint
CN118023791B (en) Welding method and system for precise shell
Zhang et al. In situ monitoring of direct energy deposition via structured light system and its application in remanufacturing industry
CN112683166B (en) Die-cutting product size detection method
Hong et al. Real-time quality monitoring of ultrathin sheets edge welding based on microvision sensing and SOCIFS-SVM
CN114119504A (en) Automatic steel part welding line detection method based on cascade convolution neural network
CN116664508A (en) Weld surface quality detection method and computer readable storage medium
CN117269168A (en) New energy automobile precision part surface defect detection device and detection method
CN110021027B (en) Edge cutting point calculation method based on binocular vision
CN114740006A (en) Weldment surface defect online detection method and device based on 3D visual sensing
Li et al. Automatic programming system for grinding robot of CHSR rail
Kim et al. Adaptive repair and digitization for hybrid manufacturing
CN117934429B (en) Bus side wall plate flatness detection method based on three-dimensional point cloud and contour matching
CN116423049B (en) Repair welding position determining method and device
US11656597B2 (en) Method and system for recognizing deburring trajectory
Liu et al. Research on intelligent measurement system of workpiece outer dimension
CN118070984B (en) Automobile part production process optimization method and system based on Internet of things
CN118070983B (en) Industrial machinery production optimization method and system based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant