Welding seam gap measuring method, medium and equipment
Through point cloud processing technology, the workpiece contour point cloud is obtained and the accumulated point chord value is calculated, which solves the problem that the existing technology is difficult to identify gradient gap welds, and achieves more efficient and reliable welding quality control.
Patent Information
- Application Number
- CN202411720860.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art is difficult to identify and process gradient gap welds in real time, resulting in insufficiency of welding quality and efficiency.
By obtaining the workpiece profile point cloud of the workpiece to be welded, determine the weld area, traverse all points in the weld area, obtain similar points and calculate the strings, calculate the distance between the dots and strings, obtain the accumulated point and gap values, and then obtain the end points and gap values of the weld gap.
This method reduces dependence on local thresholds, avoids the influence of outliers and noise, improves the stability and calculation efficiency of the results, and enables more accurate identification and processing of special-shaped welds.
Smart Images

Figure CN119559234A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automated welding, and in particular to a weld gap measurement method, medium and equipment. Background Art
[0002] As one of the core processes in modern industrial production, welding technology plays a vital role in many fields such as construction, bridges, pressure vessels, aerospace, and automobile manufacturing. With the continuous growth of industrial demand, welding technology faces new challenges, especially when dealing with gradual gap welds, the existing welding technology often fails to meet the quality requirements. At present, the industry generally adopts robot teaching welding technology, which significantly improves welding efficiency and quality by improving welding accuracy, reducing manual intervention, adapting to complex welds, and improving the working environment. However, robot teaching welding technology also has shortcomings such as high cost, complex programming and maintenance, and low flexibility.
[0003] Existing research and equipment are mainly aimed at situations with high weld consistency, but in actual production, gradient gap welds are often formed due to factors such as assembly errors, thermal deformation of workpieces, connection of workpieces of different thicknesses and materials, and workpieces with large geometric changes. These welds place higher demands on welding processes and quality control. The presence of gradient gap welds can easily lead to welding defects such as pores, cracks, and deformation, which in turn affect the reliability and service life of welded structures. The constant changes in weld shape and size make it difficult to adjust the welding path, and the gradient characteristics of the weld gap require different welding parameters (such as current, voltage, welding speed, etc.) in different areas. Existing teaching welding systems have difficulty in identifying the weld gap in real time to adjust the corresponding welding parameters, which affects welding quality and welding efficiency.
[0004] Therefore, how to improve it is a technical problem that needs to be solved urgently in this field. Summary of the invention
[0005] Based on this, the purpose of this application is to provide a weld gap measurement method, medium and equipment to solve at least one technical problem mentioned in the above background technology.
[0006] In a first aspect, the present application provides a weld gap measurement method, comprising:
[0007] Obtaining a workpiece contour point cloud of the workpiece to be welded and determining the weld area;
[0008] Traverse all points in the weld area, obtain several points close to the current point, and obtain several chords corresponding to the current point based on all the close points;
[0009] Calculate the distance between each point in the weld area and all corresponding chords to obtain the cumulative point chord values of all points;
[0010] Get the extreme point corresponding to the cumulative point chord value, which is the end point of the weld gap;
[0011] The weld gap value is obtained based on the distance between the weld end points and the prior workpiece thickness.
[0012] Further, the step of obtaining a workpiece contour point cloud of the workpiece to be welded and determining the weld area includes:
[0013] Set the scanning start and end points to scan the workpiece surface according to the scanning start and end points to obtain the workpiece surface point cloud;
[0014] The workpiece surface point cloud is sampled at set intervals to obtain the workpiece contour point cloud;
[0015] In the workpiece contour point cloud, the weld area is delineated according to the prior weld position; or in the workpiece contour point cloud, the inflection point position is determined to locate the weld area.
[0016] Further, in the workpiece contour point cloud, the step of determining the inflection point position and locating the weld area includes:
[0017] S131: computing the depth direction vector of the weld according to the workpiece contour point cloud;
[0018] S132: Setting the window size, moving step, moving direction and change rate threshold, and placing the window at the set position;
[0019] S133: Obtain the mean point of all point clouds in the window, and calculate the change rate of each point cloud and the mean point in the weld depth direction according to the depth direction vector, and determine whether the change rate is greater than the change rate threshold;
[0020] S134: If yes, the window is regarded as the weld area; if not, the window is moved again according to the moving step and the moving direction, and the process returns to step S133.
[0021] Furthermore, the step of obtaining a set number of points close to the current point and obtaining a number of chords corresponding to the current point according to all the close points includes:
[0022] S21: Get a set number of similar points on the left / right side of the current point;
[0023] S22: Take the closest point on the left and the closest point on the right as the chord endpoints, and connect the chord endpoints to obtain a corresponding chord;
[0024] S23: Move the chord endpoint to the right / left by one point to obtain an updated chord endpoint, and connect them to obtain a corresponding chord;
[0025] S24: Determine whether all the similar points have been traversed. If not, return to step S23. If so, obtain the chords corresponding to the current point.
[0026] Furthermore, the step of calculating the cumulative point chord value includes:
[0027] Traverse all points in the weld area and calculate the distance between the current point and each corresponding chord;
[0028] Traverse all points in the weld area, add the distances between the current point and all corresponding chords, and obtain the cumulative point chord value corresponding to the current point.
[0029] Furthermore, it also includes:
[0030] Set the screening window size and variance threshold, calculate the cumulative variance between the weld endpoint and other points in the screening window, and determine whether it is greater than the threshold. If so, retain the corresponding weld endpoint; if not, remove the corresponding weld endpoint to obtain the final weld endpoint.
[0031] Furthermore, it also includes:
[0032] Several curves are obtained according to each weld endpoint, and circles are fitted respectively to obtain the angle between the tangent lines of each circle on each weld endpoint, and it is judged whether it is greater than the angle threshold. If not, the corresponding weld endpoint is retained. If so, the corresponding weld endpoint is eliminated to obtain the final weld endpoint.
[0033] Furthermore, it also includes:
[0034] According to the accumulated point chord value corresponding to each weld endpoint, several pairs of weld point pairs are constructed, and the distance between each weld point pair is obtained to determine whether it is within the set distance range. If so, the corresponding weld endpoint is retained, if not, the corresponding weld endpoint is removed to obtain the final weld endpoint.
[0035] In a second aspect, the present application further provides a computer storage medium storing an executable program code; the executable program code is used to execute the weld gap measurement method described in any one of the first aspects.
[0036] In a third aspect, the present application also provides a terminal device, comprising a memory and a processor; the memory stores a program code that can be executed by the processor; the program code is used to execute the weld gap measurement method described in any one of the first aspects.
[0037] The present invention provides a weld gap measurement method, medium and device, which obtains the workpiece contour point cloud of the workpiece to be welded, determines the weld area, traverses all points in the weld area, obtains several close points of the current point, and obtains several chords corresponding to the current point according to all the close points, and then calculates the distance between each point in the weld area and all the corresponding chords to obtain the cumulative point chord values of all points. By calculating the distance between the point chords, the dependence on the local threshold is reduced, the influence of outliers and noise points is avoided, and the stability of the result is enhanced. Compared with the derivative calculation method, the calculation process is simplified to improve the calculation efficiency and reduce the calculation difficulty. By analyzing the curvature at multiple scales, the reliability of the calculation result is improved, and then the extreme point corresponding to the cumulative point chord value is obtained as the end point of the weld gap, and then the weld gap value is obtained according to the distance between the weld end points and the prior workpiece thickness. The problem that the existing technology cannot recognize special-shaped welds in real time, the weld recognition efficiency is low, and the reliability is insufficient is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A schematic diagram of the position of a workpiece according to an embodiment of the present invention;
[0039] Figure 2 The figure is a flow chart of a weld gap measurement method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] It should be noted that if the embodiments of the present invention involve directional indications, such as up, down, left, right, front, back, etc., then the directional indication is only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly. In addition, if the embodiments of the present invention involve descriptions of "first, second", "S1, S2", "step one, step two", etc., then such descriptions are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features or indicating the execution order of the method, etc. Those skilled in the art can understand that anything that does not violate the gist of the invention under the technical concept of the invention should be included in the protection scope of the present invention.
[0042] like Figure 1As shown, taking the height difference as an example, workpiece 1 and workpiece 2 need to be welded together. Although they appear to be stacked, it is impossible for them to fit perfectly. Weld endpoint 1 and weld endpoint 2 are two parallel points in the weld direction of workpiece 2 respectively. The distance between the two weld endpoints minus the thickness of workpiece 1 is the gap distance between the two workpieces. The surfaces of workpieces 1 and 2 may be thermally deformed, there may be errors during assembly, or two workpieces of different heights need to be welded together, then there is a gap distance at the weld position. Ignoring this gap distance will lead to problems such as inaccurate and loose welding. Therefore, when welding, accurately measuring the gap distance and understanding the weld gap between the two can further improve the welding quality. Figure 2 As shown, the present invention provides a method for measuring weld gap:
[0043] S1: Obtain the surface point cloud of the workpiece to be welded and determine the weld area;
[0044] Specifically, it is optional but not limited to installing the acquisition device at the end of the robot arm to obtain the surface point cloud of the workpiece to be welded, and locate the weld area through image segmentation, recognition, etc. Preferably, the acquisition device is optional but not limited to 3D line scan camera, 3D structured light camera, TOF camera, laser scanner, multi-view stereo vision system, grating projection measuring instrument and other common scanning devices that can be used to obtain three-dimensional data of the surface of an object. It is worth noting that the weld area can be an area that needs to be welded, such as a bend of a workpiece, or an area that needs to be welded, such as stacking and splicing of multiple workpieces.
[0045] Preferably, step S1 may optionally include:
[0046] S11: Setting the scanning start and end points, so as to scan the workpiece surface according to the scanning start and end points to obtain a workpiece surface point cloud;
[0047] Specifically, it is optional but not limited to setting the scanning start and end points according to the prior weld length and weld position, so as to control the movement of the robotic arm according to the scanning start and end points, scan the workpiece surface through the acquisition equipment, and collect the workpiece surface point cloud; the prior weld length and weld position can be optionally obtained according to design drawings, CAD models, physical measurements, etc.
[0048] S12: sampling the workpiece surface point cloud at a set distance to obtain the workpiece contour point cloud;
[0049] Specifically, it is optional but not limited to uniformly downsampling the workpiece surface point cloud according to the length direction of the weld, sampling the workpiece surface point cloud at every set distance, and obtaining Figure 2 The workpiece contour point cloud shown; the set distance during uniform downsampling can be arbitrarily set by those skilled in the art.
[0050] S13: In the workpiece contour point cloud, the weld area is delineated according to the prior weld position; or in the workpiece contour point cloud, the inflection point position is determined to locate the weld area.
[0051] Preferably, in step S13, the weld area is delineated according to the prior weld position. Specifically, when the weld position is fixed, it is optional but not limited to delineating the area where the weld is located as the weld area based on the prior workpiece position in the robot base coordinate system and the relative position between the weld and the workpiece.
[0052] Further preferably, due to factors such as assembly errors, thermal deformation of workpieces and connection between workpieces of different thicknesses, different materials or with large geometric changes during the welding process, a gradual gap weld is formed, resulting in different shapes and sizes of the welds.
[0053] Therefore, in step S13, the weld area can be located by calculating the inflection point. Specifically, in the workpiece contour point cloud, calculating the inflection point position to locate the weld area can optionally include:
[0054] S131: computing the depth direction vector of the weld according to the workpiece contour point cloud;
[0055] Specifically, it is optional but not limited to calculating the workpiece contour point cloud according to any existing technology to obtain the depth direction vector of the weld.
[0056] Preferably, the extreme points of the weld are obtained based on the workpiece contour point cloud, and then the differences between the extreme points in the length direction and depth direction of the weld are calculated and normalized to obtain the length direction vector and depth direction vector of the weld.
[0057] S132: Setting the window size, moving step, moving direction and change rate threshold, and placing the window at the set position;
[0058] S133: Obtain the mean point of all point clouds in the window, and calculate the change rate of each point cloud and the mean point in the weld depth direction according to the depth direction vector, and determine whether the change rate is greater than the change rate threshold;
[0059] S134: If yes, the window is regarded as the weld area; if not, the window is moved again according to the moving step and the moving direction, and the process returns to step S133.
[0060] Specifically, since the deformation of the workpiece contour point cloud at the weld is relatively severe and the drop along the weld depth direction is large, the area where the inflection point of the workpiece contour point cloud is located can be selected as the weld area to obtain the place where the workpiece contour point cloud changes most drastically. More specifically, the method of determining the inflection point can be selected to be determined according to the change rate of each point cloud.
[0061] More specifically, in steps S132 and S133, the technical personnel in this field can arbitrarily set the window size, moving step size, moving direction and change rate threshold, place the window at the starting position in the scanning start and end points, and calculate the mean point of all point clouds in the window, as well as the change rate of each point cloud and the mean point in the weld depth direction, to determine whether the change rate is greater than the change rate threshold. If the window is the weld area, if not, move the window according to the moving step size and moving direction until the change rate of each point cloud corresponding to the current window and the mean point in the weld depth direction is greater than the change rate threshold, or the window reaches the end point in the scanning start and end points.
[0062] Preferably, the change rate of each point cloud and the mean point in the weld depth direction can be calculated according to formula 1-1:
[0063]
[0064] Where s is the rate of change of each point cloud and the mean point in the weld depth direction, W L is the window size, y is the depth direction vector of the weld, i is the y-coordinate value of the i-th point in the current window, and y represents the coordinate of the mean point of the current window.
[0065] Preferably, since the workpiece contour point cloud also includes a number of background point clouds and noise points, in order to improve the point cloud processing efficiency, they need to be removed. Therefore, before determining the weld area, the following steps are also included:
[0066] S13': performing straight-through filtering on the workpiece contour point cloud to obtain an optimized workpiece contour point cloud;
[0067] Specifically, the filter range can be set according to the prior workpiece size, and the workpiece contour point cloud can be directly filtered according to the filter range to obtain the optimized workpiece contour point cloud; the filter range can be set arbitrarily by those skilled in the art; the prior workpiece size can be obtained according to design drawings, CAD models, physical measurements, etc.
[0068] S2: traverse all points in the weld area, obtain several points close to the current point, and obtain several chords corresponding to the current point based on all the close points;
[0069] Specifically, you can choose to take a certain point as the center, set a distance threshold, select all points within the distance threshold as the similar points of the point, or set a quantity threshold, select the N points closest to the point as the similar points of the point, connect two similar points, and the resulting line is the chord corresponding to the current point. Then traverse all the similar points of the current point in turn to obtain several corresponding chords; then traverse all points in the weld area to obtain the chords corresponding to all points.
[0070] Preferably, the step of obtaining several points close to the current point and obtaining several chords corresponding to the current point according to all the close points may optionally include:
[0071] S21: Get a set number of similar points on the left / right side of the current point;
[0072] Specifically, it is optional but not limited to setting the current point as Pk, and setting the L points closest to the current point to be obtained. Then, according to the specific position of the current point in the weld area, L similar points on the left / right side of the current point can be obtained. For example, in the weld area, when the number of points on the left side of the current point is less than 2L, L points on the right side of the current point are obtained. When the number of points on the right side of the current point is less than 2L, L points on the left side of the current point are obtained. When there are no less than 2L points on both sides of the current point, L points on either side of the current point can be randomly selected.
[0073] S22: Take the closest point on the left and the closest point on the right as the chord endpoints, and connect the chord endpoints to obtain a corresponding chord;
[0074] S23: Move the chord endpoint to the right / left by one point to obtain an updated chord endpoint, and connect them to obtain a corresponding chord;
[0075] S24: Determine whether all the similar points have been traversed. If not, return to step S23. If so, obtain the chords corresponding to the current point.
[0076] For example, suppose the current point is located on the left side of the weld area, and the five points closest to the current point need to be obtained as close points. Then, you can choose to obtain the five points on the right side of the current point, and then use the two closest points with the farthest distance as the chord endpoints. You can connect the chord endpoints to get a chord corresponding to the current point, and then move the endpoints to the right, and continue to iterate until the five close points have been chord endpoints, and you can get four chords corresponding to the current point.
[0077] S3: Calculate the distance between each point in the weld area and all corresponding chords to obtain the cumulative point chord values of all points;
[0078] Specifically, since the contour information of the workpiece is two-dimensional feature information, similar to the cross-section of the workpiece weld, it is assumed that the weld direction is the z direction, that is, the coordinates of the contour point are (x, y), similar to the pixel feature. In the image algorithm, curvature is often used to calculate the inflection point of the curve in the image, but in the point cloud, there may be noise points, and the curvature extraction method is very sensitive to local changes and noise on the curve, and the calculation of the curvature involves second-order derivatives, which may lead to instability and errors in the results. The cumulative point-chord distance can evaluate the curvature size of the point, and combine the information of all points in the neighborhood of the calculation point, and do not need to calculate any derivatives, the calculation is simpler and more reliable. Therefore, it is optional but not limited to calculating the vertical distance between the current point and each chord to obtain the corresponding point chord value, and adding all the point chord values can obtain the cumulative point chord value corresponding to the current point.
[0079] Preferably, the step of calculating the distance between each point in the weld area and all corresponding chords to obtain the cumulative point chord values of all points may optionally include:
[0080] S31: traverse all points in the weld area and calculate the distance between the current point and each corresponding chord;
[0081] For example, assume that the current point is P k , whose coordinates are (x1, y1), and the neighborhood value is L. The starting point of the chord is Pk-L, whose coordinates are (x2, y2), and the end point of the chord is Pk+1, whose coordinates are (x3, y3). You can choose to calculate the point chord value corresponding to the current point according to formulas 4-1, 4-2, 4-3, and 4-4:
[0082] A=y3-y2 4-1
[0083] B=-(x3-x2)4-2
[0084] C=(x3-x2)y2-(y3-y2)x2 4-3
[0085]
[0086] Among them, (A, B, C) are constant terms, (x1, y1) are the coordinates of the current point, (x2, y2) are the coordinates of the starting point of the chord, (x3, y3) are the coordinates of the end point of the chord, and f(k) is the point chord value.
[0087] S32: traverse all points in the weld area, add the distances between the current point and all corresponding chords, and obtain the cumulative point chord value corresponding to the current point.
[0088] Specifically, according to formula 4-5, all calculated distances between the current point and the chord are added to obtain the cumulative point chord value corresponding to the current point:
[0089]
[0090] Where chord_i is the cumulative point chord value of the i-th point. chord_i is the cumulative point chord value of the i-th point, L is the number of chords, and f(k+i) is the distance between the i-th chord and the current point, that is, the i-th point chord value.
[0091] S4: Obtain the extreme point corresponding to the cumulative point chord value, which is the end point of the weld gap;
[0092] Specifically, the cumulative point chord values corresponding to each point cloud may be sorted to obtain point clouds corresponding to the maximum cumulative point chord value and the minimum cumulative point chord value, which are regarded as extreme points, i.e., weld end points.
[0093] Preferably, in order to improve the efficiency of screening extreme value points, before step S4, the following steps may be optionally included:
[0094] S40': construct a matrix according to the accumulated point chord values of each point cloud and perform normalization.
[0095] Specifically, the accumulated point chord values of each point cloud may be arranged in a set order to construct a matrix, and the accumulated point chord values in the matrix may be normalized so that all values are within the range of (0, 1) to facilitate obtaining extreme values in subsequent steps.
[0096] S5: The weld gap value is obtained according to the distance between the weld end points and the prior workpiece thickness.
[0097] Specifically, it is optional but not limited to obtaining the weld endpoints according to step S4, obtaining the distance between the weld endpoints on the z-axis, and subtracting the prior workpiece thickness to obtain the weld gap value; the prior workpiece thickness can be optionally obtained based on design drawings, CAD models, physical measurements, etc.
[0098] In this embodiment, a weld gap measurement method of the present invention is provided, by obtaining the workpiece contour point cloud of the workpiece to be welded, determining the weld area, traversing all points in the weld area, obtaining several close points of the current point, and obtaining several chords corresponding to the current point according to all the close points, and then calculating the distance between each point in the weld area and all the corresponding chords to obtain the cumulative point chord value of all points, by calculating the distance between the point chords, reducing the dependence on the local threshold, avoiding the influence of outliers and noise points, enhancing the stability of the results, and compared with the derivative calculation method, simplifying the calculation process to improve the calculation efficiency and reduce the calculation difficulty, by analyzing the curvature at multiple scales, improving the reliability of the calculation results, and then obtaining the extreme point corresponding to the cumulative point chord value as the end point of the weld gap, and then obtaining the weld gap value according to the distance between the weld end points and the prior workpiece thickness. The problem that the prior art cannot recognize special-shaped welds in real time, the weld recognition efficiency is low, and the reliability is insufficient is solved.
[0099] Preferably, the point cloud corresponding to the maximum and minimum values in the cumulative point chord value is the weld endpoint, but due to the possible presence of outliers in the point cloud, improper setting of the neighborhood value, which causes some points to be erroneously included in the calculation, as well as multiple influencing factors such as noise influence, environmental influence, and aging of the acquisition equipment, multiple maximum values and / or minimum values appear when calculating the cumulative point chord value corresponding to each point cloud, resulting in multiple possible weld endpoints, which need to be further screened to obtain the final weld endpoint. Therefore, the method further includes:
[0100] S6: Set the screening window size and variance threshold, calculate the cumulative variance between the weld endpoint and other points in the screening window, and determine whether it is greater than the threshold. If so, retain the corresponding weld endpoint; if not, remove the corresponding weld endpoint to obtain the final weld endpoint.
[0101] Specifically, it is optional but not limited to setting the screening window size and variance threshold, and then calculating the cumulative variance between the weld endpoints in the screening window and other points according to any existing method such as cumulative statistics method and fast variance calculation, and judging whether it is greater than the threshold, if so, retaining the corresponding weld endpoint, if not, eliminating the corresponding weld endpoint to obtain the final weld endpoint; the screening window size and variance threshold are arbitrarily set by technicians in this field.
[0102] Preferably, the step of further screening a plurality of possible weld end points further comprises:
[0103] S7: Obtain several curves according to each weld endpoint, and fit circles respectively, obtain the angle between the tangent lines of each circle on each weld endpoint, and determine whether it is greater than the angle threshold. If not, retain the corresponding weld endpoint. If so, remove the corresponding weld endpoint to obtain the final weld endpoint.
[0104] Specifically, it is optional but not limited to setting an angle threshold, fitting all point clouds to obtain corresponding curves, and cutting them according to each weld endpoint to obtain several sub-curves, and then fitting circles to the curves on the left and right sides of each weld point in turn, and making each weld point located on the circle fitted by the curves on its left and right sides, so as to calculate the tangent of each circle at each weld point, obtain the angle between the two tangents corresponding to each weld point, and determine whether it is greater than the angle threshold. If not, retain the corresponding weld endpoint. If so, remove the corresponding weld endpoint to obtain the final weld endpoint. The angle threshold is arbitrarily set by technicians in this field.
[0105] Preferably, the angle between the two tangent lines corresponding to the weld endpoints can be calculated according to Formula 7-1:
[0106]
[0107] Among them, θ is the angle between the two tangents corresponding to the weld end point, and n1 and n2 are the tangents of the circles on both sides of the weld end point at the weld end point.
[0108] Preferably, the step of further screening a plurality of possible weld end points further comprises:
[0109] S8: According to the accumulated point chord value corresponding to each weld endpoint, a number of weld point pairs are constructed, the distance between each weld point pair is obtained, and it is determined whether it is within the set distance range. If so, the corresponding weld endpoint is retained, if not, the corresponding weld endpoint is removed to obtain the final weld endpoint.
[0110] Specifically, it is optional but not limited to setting a distance range, and then pairing the point cloud corresponding to the maximum cumulative point chord value with the point cloud corresponding to the minimum cumulative point chord value to obtain several weld point pairs, and calculating the distance of the weld endpoints on the z-axis in each weld point pair to determine whether it is within the set distance range. If it is less than the minimum value of the distance range or greater than the maximum value of the distance range, it means that the weld point pair does not meet the requirements and may be an erroneously identified point. The weld point pair needs to be eliminated. If the distance is within the set distance range, it means that the weld endpoint contained in the weld point pair is a correctly identified weld point and needs to be retained to obtain the final confirmed weld endpoint; the distance range is arbitrarily set by technical personnel in this field.
[0111] On the other hand, the present invention further provides a computer storage medium storing executable program code; the executable program code is used to execute any of the above-mentioned weld gap measurement methods.
[0112] On the other hand, the present invention also provides a terminal device, including a memory and a processor; the memory stores a program code that can be executed by the processor; the program code is used to execute any of the above-mentioned weld gap measurement methods.
[0113] Exemplarily, the program code may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the program code in the terminal device.
[0114] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the terminal device may also include an input / output device, a network access device, a bus, etc.
[0115] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0116] The memory may be an internal storage unit of the terminal device, such as a hard disk or a memory. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used to store the program code and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.
[0117] The above-mentioned computer storage medium and terminal device are created based on the above-mentioned weld gap measurement method, and their technical functions and beneficial effects are no longer repeated here. The various technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0118] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for measuring weld gap, characterized in that: include: Obtaining a workpiece contour point cloud of the workpiece to be welded and determining the weld area; Traverse all points in the weld area, obtain several points close to the current point, and obtain several chords corresponding to the current point based on all the close points; Calculate the distance between each point in the weld area and all corresponding chords to obtain the cumulative point chord values of all points; Get the extreme point corresponding to the cumulative point chord value, which is the end point of the weld gap; The weld gap value is obtained based on the distance between the weld end points and the prior workpiece thickness.
2. The method according to claim 1, characterized in that The steps of obtaining a workpiece contour point cloud of a workpiece to be welded and determining a weld area include: Set the scanning start and end points to scan the workpiece surface according to the scanning start and end points to obtain the workpiece surface point cloud; The workpiece surface point cloud is sampled at set intervals to obtain the workpiece contour point cloud; In the workpiece contour point cloud, the weld area is delineated according to the prior weld position; or in the workpiece contour point cloud, the inflection point position is determined to locate the weld area.
3. The method according to claim 2, characterized in that The steps of determining the inflection point position and locating the weld area in the workpiece contour point cloud include: S131: computing the depth direction vector of the weld according to the workpiece contour point cloud; S132: Setting the window size, moving step, moving direction and change rate threshold, and placing the window at the set position; S133: Obtain the mean point of all point clouds in the window, and calculate the change rate of each point cloud and the mean point in the weld depth direction according to the depth direction vector, and determine whether the change rate is greater than the change rate threshold; S134: If yes, the window is regarded as the weld area; if not, the window is moved again according to the moving step and the moving direction, and the process returns to step S133.
4. The method according to claim 1, characterized in that: The steps of obtaining a set number of points close to the current point and obtaining a number of chords corresponding to the current point according to all the close points include: S21: Get a set number of similar points on the left / right side of the current point; S22: Take the closest point on the left and the closest point on the right as the chord endpoints, and connect the chord endpoints to obtain a corresponding chord; S23: Move the chord endpoint to the right / left by one point to obtain an updated chord endpoint, and connect them to obtain a corresponding chord; S24: Determine whether all the similar points have been traversed. If not, return to step S23. If so, obtain the chords corresponding to the current point.
5. The method according to claim 4, characterized in that The steps for calculating the cumulative point chord value include: Traverse all points in the weld area and calculate the distance between the current point and each corresponding chord; Traverse all points in the weld area, add the distances between the current point and all corresponding chords, and obtain the cumulative point chord value corresponding to the current point.
6. The method according to any one of claims 1 to 5, characterized in that: Also includes: Set the screening window size and variance threshold, calculate the cumulative variance between the weld endpoint and other points in the screening window, and determine whether it is greater than the threshold. If so, retain the corresponding weld endpoint; if not, remove the corresponding weld endpoint to obtain the final weld endpoint.
7. The method according to claim 6, characterized in that Also includes: Several curves are obtained according to each weld endpoint, and circles are fitted respectively to obtain the angle between the tangent lines of each circle on each weld endpoint, and it is judged whether it is greater than the angle threshold. If not, the corresponding weld endpoint is retained. If so, the corresponding weld endpoint is eliminated to obtain the final weld endpoint.
8. The method according to claim 7, characterized in that Also includes: According to the accumulated point chord value corresponding to each weld endpoint, several pairs of weld point pairs are constructed, and the distance between each weld point pair is obtained to determine whether it is within the set distance range. If so, the corresponding weld endpoint is retained, if not, the corresponding weld endpoint is removed to obtain the final weld endpoint.
9. A computer storage medium, characterized in that An executable program code is stored; the executable program code is used to execute the weld gap measurement method described in any one of claims 1-8.
10. A terminal device, characterized in that: It comprises a memory and a processor; the memory stores a program code executable by the processor; the program code is used to execute the weld gap measurement method described in any one of claims 1-8.
Citation Information
Cited By
Intelligent circuit breaker shell assembly clearance detection method based on image processing
CN122048888A
An intelligent circuit breaker shell assembly gap detection method based on image processing
CN122048888B