A method and device for detecting geometric dimension of a welding groove
By acquiring the bevel contour data of the welded joint and identifying key feature points, and using a 3D line laser sensor and matching function processing, the applicability problem of complex weld inspection is solved, enabling bevel size inspection of various types of welded joints and supporting flexible welding of large workpieces.
Patent Information
- Application Number
- CN202310456081.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-04-25
AI Technical Summary
Existing welding groove inspection technologies are not applicable to welds with complex structures, especially large workpieces, and cannot effectively inspect complex groove types, which increases the difficulty of automated welding.
By acquiring the bevel contour data of the target welded joint, identifying key feature points, and using a 3D line laser sensor and a preset matching function to process the data, a feature template image is generated, and the bevel size parameters of the welded joint are calculated. This method is applicable to various types of welded joints.
It enables the detection of bevel dimensions for complex welded joints, supports flexible welding of large-sized, low-precision workpieces, and improves the applicability and accuracy of automated welding.
Smart Images

Figure CN116523864B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of flexible welding, and particularly relates to a geometric feature size detection method and device for a welding groove. BACKGROUND
[0002] In recent years, automatic welding accounts for a higher and higher proportion in welding production, but it is still difficult for some industries to realize automatic welding. The main reason is that large-size welding structural members, such as engineering machinery and steel structure products, cannot be welded by robots using the teaching online method because the steel plates of such workpieces are thick and have large machining size errors. To realize welding of such workpieces, the welding seam position needs to be tracked and the welding groove geometry needs to be measured and sensed, and the welding specification suitable for the welding groove is matched in real time according to the measured actual feature sizes of the welding groove, such as the gap width and the groove angle.
[0003] At present, laser vision is mostly used in welding seam tracking technology and welding seam groove detection technology. The basic groove features are obtained by processing the projection image of a laser line on a welding seam groove. However, this method needs to design groove detection algorithms and processes for different types of grooves, such as only V-shaped grooves for flat plate butt joints and I-shaped grooves for flat plate butt joints, and is not suitable for complex conditions (such as V-shaped grooves with a blunt edge, U-shaped grooves with a blunt edge, pipe butt joints, and hemispherical butt joints). In other words, the range of use is narrow, and most methods are only suitable for specific occasions. SUMMARY
[0004] To solve the technical defects that the above-mentioned groove detection algorithms and processes need to be designed for different types of grooves, such as only V-shaped grooves for flat plate butt joints and I-shaped grooves for flat plate butt joints, and are not suitable for complex conditions, or in other words, the range of use is narrow and most methods are only suitable for specific occasions, the application provides a geometric feature size detection method and device for a welding groove, and the technical solution is as follows.
[0005] In a first aspect, the application provides a geometric feature size detection method for a welding groove, which comprises the following steps.
[0006] At least two groups of groove contour data of a target welding joint are acquired, and a corresponding groove image is determined according to each group of groove contour data.
[0007] Key feature points in each groove image are identified, and at least two feature template images corresponding to the key feature points are obtained according to preset template parameters and first coordinates of the key feature points. Each key feature point in each groove image corresponds to one feature template image.
[0008] The target template image is obtained by processing all feature template images based on a preset matching function, wherein the target template image comprises second coordinates of key feature points.
[0009] The groove size parameter of the target welding joint is calculated according to the second coordinates of the key feature points.
[0010] In an optional solution of the first aspect, the at least two sets of groove contour data of the target welding joint are obtained by:
[0011] The target welding joint is fixed at a specified position, and the initial position of the welding gun and the welding direction are determined according to the type of the target welding joint;
[0012] The emission direction of the 3D line laser sensor is determined based on the groove preparation plane of the target welding joint and the welding direction of the welding gun;
[0013] The position of the 3D line laser sensor is obtained based on the initial position of the welding gun and preset calibration parameters;
[0014] The 3D line laser sensor is controlled to scan the groove of the target welding joint based on the emission direction and the position of the 3D line laser sensor, and at least two sets of groove contour data are obtained.
[0015] In another optional solution of the first aspect, the corresponding groove image is determined according to each set of groove contour data, comprising:
[0016] All feature point coordinates in each set of groove contour data are converted according to a preset scale factor, and the drawing interval is determined according to the maximum value and the minimum value of all converted feature point coordinates;
[0017] The groove image is generated according to the converted all feature point coordinates and the drawing interval.
[0018] In another optional solution of the first aspect, the key feature points in each groove image are identified, and at least two feature template images corresponding to the key feature points are obtained according to preset template parameters and first coordinates of the key feature points, comprising:
[0019] The included angle formed by each feature point and the adjacent two feature points in each groove image is calculated;
[0020] The feature points corresponding to the included angles within a preset included angle interval are taken as key feature points, and the key feature points in each groove image are labeled;
[0021] In the groove image corresponding to the key feature points, a feature template image is intercepted, taking the first coordinates of the key feature points as the center and taking preset template parameters as the image size parameters;
[0022] The feature template images corresponding to the key feature points of the same reference numerals in each groove image are classified.
[0023] In a further alternative of the first aspect, the target template image further comprises a matching degree of the key feature point;
[0024] The groove size parameter of the target welding joint is calculated according to the second coordinates of the key feature points, comprising:
[0025] The second coordinates of the key feature points are converted based on the drawing interval to obtain third coordinates of the key feature points;
[0026] When the matching degree of the key feature point exceeds a preset matching degree threshold, the third coordinates of the key feature point are substituted into a preset groove size parameter expression to calculate the groove size parameter of the target welding joint.
[0027] In a further alternative of the first aspect, the number of key feature points is greater than or equal to 2;
[0028] After the second coordinates of the key feature points are converted based on the drawing interval to obtain third coordinates of the key feature points, the method further comprises:
[0029] It is judged whether the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold;
[0030] When it is detected that the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold, the third coordinates of all key feature points are substituted into a preset groove size parameter expression to calculate the groove size parameter of the target welding joint.
[0031] In a further alternative of the first aspect, before the key feature points in each groove image are identified, the method further comprises:
[0032] It is judged whether each groove image comprises at least two curve segments;
[0033] When it is detected that any one of the groove images comprises at least two curve segments, the groove image is subjected to interpolation completion processing.
[0034] In a second aspect, the embodiments of the present application provide a welding groove geometric feature size detection device, comprising:
[0035] An image generation module is configured to acquire at least two groups of groove profile data of the target welding joint, and determine a corresponding groove image according to each group of groove profile data.
[0036] A template determination module is configured to identify a key feature point in each groove image, and obtain at least two feature template images corresponding to the key feature point according to preset template parameters and a first coordinate of the key feature point; wherein the key feature point in each groove image corresponds to one feature template image.
[0037] A coordinate acquisition module is configured to process all feature template images based on a preset matching function, and obtain a target template image; wherein the target template image includes a second coordinate of the key feature point.
[0038] A parameter calculation module is configured to calculate a groove size parameter of the target welding joint according to the second coordinate of the key feature point.
[0039] In an optional solution of the second aspect, the image generation module is specifically configured to:
[0040] fix the target welding joint at a specified position, and determine an initial position of a welding torch and a welding direction according to a type of the target welding joint;
[0041] determine a transmission direction of a 3D line laser sensor based on a groove method plane of the target welding joint and the welding direction of the welding torch;
[0042] obtain a position of the 3D line laser sensor based on the initial position of the welding torch and preset calibration parameters;
[0043] control the 3D line laser sensor to scan the groove of the target welding joint based on the transmission direction and the position of the 3D line laser sensor, and obtain at least two groups of groove profile data.
[0044] In another optional solution of the second aspect, the image generation module is specifically further configured to:
[0045] convert all feature point coordinates in each group of groove profile data according to a preset proportion coefficient, and determine a drawing interval according to a maximum value and a minimum value in the converted all feature point coordinates;
[0046] generate the groove image according to the converted all feature point coordinates and the drawing interval.
[0047] In another optional solution of the second aspect, the template determination module is specifically configured to:
[0048] calculate an included angle formed by each feature point and two adjacent feature points in each groove image;
[0049] Corresponding to the included angle in the preset included angle interval, the feature point is taken as a key feature point, and the key feature points in each groove image are labeled;
[0050] In the groove image corresponding to the key feature point, a feature template image is intercepted, taking the first coordinate of the key feature point as the center and taking the preset template parameter as the image size parameter;
[0051] The feature template images corresponding to the key feature points with the same label in each groove image are classified.
[0052] In another optional scheme of the second aspect, the target template image further includes the matching degree of the key feature point;
[0053] The parameter calculation module is specifically configured to:
[0054] Based on the drawing interval, the second coordinate of the key feature point is converted to obtain the third coordinate of the key feature point;
[0055] When the matching degree of the key feature point exceeds the preset matching degree threshold, the third coordinate of the key feature point is substituted into the preset groove size parameter expression to calculate the groove size parameter of the target welded joint.
[0056] In another optional scheme of the second aspect, the number of key feature points is greater than or equal to 2;
[0057] The parameter calculation module is specifically configured to:
[0058] After the second coordinate of the key feature point is converted based on the drawing interval to obtain the third coordinate of the key feature point, it is judged whether the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold.
[0059] When it is detected that the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold, the third coordinates of all key feature points are substituted into the preset groove size parameter expression to calculate the groove size parameter of the target welded joint.
[0060] In another optional scheme of the second aspect, the device further includes:
[0061] Before acquiring at least two groups of groove contour data of the target welded joint and determining the corresponding groove images according to each group of groove contour data, and before identifying the key feature points in each groove image, it is judged whether each groove image includes at least two curve segments;
[0062] When it is detected that any one of the groove images comprises at least two curve segments, the groove image is subjected to interpolation completion processing.
[0063] In a third aspect, the embodiments of the present application further provide a device for detecting geometric feature sizes of a welding groove, comprising a processor and a memory;
[0064] The processor is connected with the memory.
[0065] The memory is used for storing executable program codes.
[0066] The processor runs a program corresponding to the executable program codes by reading the executable program codes stored in the memory, so as to implement the method for detecting geometric feature sizes of a welding groove provided in the first aspect or any one of the implementation manners of the first aspect.
[0067] In a fourth aspect, the embodiments of the present application provide a computer storage medium, which stores a computer program, and the computer program comprises program instructions. When the program instructions are executed by a processor, the method for detecting geometric feature sizes of a welding groove provided in the first aspect or any one of the implementation manners of the first aspect can be implemented.
[0068] In the embodiments of the present application, when the geometric feature sizes of the welding groove are detected, at least two groups of groove contour data of a target welding joint are acquired, and a corresponding groove image is determined according to each group of groove contour data. Key feature points in each groove image are identified, and at least two feature template images corresponding to the key feature points are obtained according to preset template parameters and first coordinates of the key feature points. All feature template images are processed based on a preset matching function to obtain a target template image. The groove size parameters of the target welding joint are calculated according to second coordinates of the key feature points. Through the feature point identification of the multiple groups of groove contour data, the target template image containing coordinates is obtained by combining the matching function, which is suitable for multiple types of welding joints, and the corresponding groove size parameters are calculated according to the coordinates, which provides important technical support for the flexible welding of large-size and low-precision workpieces. BRIEF DESCRIPTION OF DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0070] Figure 1 A whole flowchart of a method for detecting geometric feature sizes of a welding groove provided in the embodiments of the present application is shown in the figure.
[0071] Figure 2 An effect schematic diagram of acquiring groove contour data provided by an embodiment of the present application;
[0072] Figure 3 A structure schematic diagram of a groove image provided by an embodiment of the present application;
[0073] Figure 4 An effect schematic diagram of acquiring a feature template image provided by an embodiment of the present application;
[0074] Figure 5 An effect schematic diagram of a feature template image corresponding to a key feature point provided by an embodiment of the present application;
[0075] Figure 6 An effect schematic diagram of a target template image provided by an embodiment of the present application;
[0076] Figure 7 A coordinate conversion schematic diagram provided by an embodiment of the present application;
[0077] Figure 8 A structure schematic diagram of a geometric feature size detection device of a welding groove provided by an embodiment of the present application;
[0078] Figure 9 A structure schematic diagram of another geometric feature size detection device of a welding groove provided by an embodiment of the present application. DETAILED DESCRIPTION
[0079] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
[0080] In the following description, the terms "first", "second", etc. are only for the purpose of description and cannot be understood as indicating or implying relative importance. The following description provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Therefore, if one embodiment includes features A, B and C, and another embodiment includes features B and D, the present application should also be considered to include one or more embodiments of all other possible combinations of A, B, C and D, even if the embodiment may not be explicitly described in the following content.
[0081] The following description provides examples, and is not intended to limit the scope, applicability or example set forth in the claims. Alterations and further modifications of the described elements are possible without departing from the scope of the application. Various examples can omit, substitute, or add various procedures or components as appropriate. For instance, the methods described can be performed in an order different than described, and various steps can be added, omitted, or combined. Also, features described with respect to some examples can be combined in other examples.
[0082] It should be noted that there are some patent documents in the prior art, for example, a patent document entitled "A high-precision detection method and device for welding groove size and relative pose of welding gun", which uses a linear laser emitter to emit two laser lines on the welding groove, and then uses a camera to take a photo of the deformed laser lines. The relative position of the camera coordinate system and the linear laser emission coordinate system is known. The position of the segmented deformed laser lines in space relative to the camera coordinate system can be obtained from the image data obtained by the camera. The fitting of the point cloud data of the segmented deformed laser lines can obtain the groove plane and the groove neighborhood plane equation. Knowing the relative position of the welding gun and the camera, the position and attitude of the welding gun relative to the groove can be obtained, and the groove width and angle can also be calculated. The advantage of this patent is that it can be detected in any attitude. However, its disadvantage is that it cannot be used for welding seams with curved grooves, because it uses two laser lines to fit the groove plane, so it cannot be used when the groove plane is curved. Secondly, when two hemispheres are welded into a sphere or when pipes are butt welded, or when the groove type is V-shaped, the welding groove corresponds to a conical surface. The projection of the two laser lines on the groove surface is a curve. In this case, the algorithm of fitting a plane with two straight lines cannot be used. In other words, it is not suitable for complex situations.
[0083] For another example, a patent document entitled "A V-shaped groove welding seam detection method based on laser vision" uses a linear laser emitter to irradiate a laser line on the welding groove. The image formed by the laser line is captured by a camera. The image is processed multiple times to finally obtain a binary image with only the center line of the light band, and then the feature points are extracted. The important algorithm of this patent is the extraction of feature points. When extracting feature points from the above-mentioned binary image, the slope method is used to classify the data points. However, its disadvantage is that it cannot be used for V-shaped welding seams composed of two hemispheres. It uses a laser line. The projection of the laser line on the V-shaped groove of the pipe butt or the plate butt is composed of straight line segments, but the projection on the V-shaped groove composed of two hemispheres is composed of straight line segments and curve segments. The slope method is used in the image processing of this patent to classify the data points. However, the slope of the data points of the curve segment is changing, so this method cannot be used to classify the slope of the curve segment.
[0084] For example, a patent document entitled "Welding Bevel Detection Method" uses a laser displacement sensor to obtain weld bevel depth data, obtains a bevel profile image, and performs template matching on the measured image using a standard profile image as a template image. The position of the best matching result is the position of the weld center, and weld tracking can be achieved. However, the disadvantage is that it can only achieve weld tracking and does not involve bevel geometric feature detection.
[0085] Next, please refer to Figure 1 , Figure 1 The overall flowchart of the geometric feature size detection method of the welding bevel provided by the embodiments of the present application is shown.
[0086] As Figure 1 shown, the geometric feature size detection method of the welding bevel can at least include the following steps:
[0087] Step 102, obtaining at least two groups of bevel profile data of the target welding joint, and determining the corresponding bevel image according to each group of bevel profile data.
[0088] In the embodiments of the present application, the geometric feature size detection method of the welding bevel is applied to a control terminal, which can but is not limited to control the welding joint to be fixed at a specified position, and then the bevel of the welding joint can be scanned to obtain the bevel image corresponding to the bevel of the welding joint, and the bevel profile data can be analyzed and calculated to obtain the bevel size parameters of the welding joint. The control terminal can but is not limited to scan the bevel of the welding joint by a combination of a line laser sensor and a camera, which can preprocess the scanned image to obtain the corresponding bevel image. The preprocessing method includes but is not limited to distortion correction processing, noise reduction processing, and binarization processing in sequence; or the bevel can also be scanned directly by a 3D line laser sensor, which can draw the scanned image into a polyline graph and export the polyline graph as a bevel image according to a set format.
[0089] It can be understood that the scanning method by the combination of the line laser sensor and the camera has low cost but low precision, and the scanning method by the 3D line laser sensor has high cost but high precision. In the embodiments of the present application, the detection precision requirement and cost budget can be selected according to the detection precision requirement and cost budget, which is not limited herein.
[0090] Specifically, when detecting the geometric size of the welding groove, the terminal can obtain at least two sets of groove profile data of the target welding joint by scanning the groove of the target welding joint. The type of the target welding joint can include, but is not limited to, a plate butt joint, a pipe butt joint, a hemispherical butt joint and the like, and the scanning of the groove of the target welding joint can be performed by the combination of the line laser sensor and the camera as mentioned above, or by directly scanning the groove of the target welding joint by the 3D line laser sensor. Taking the direct scanning by the 3D line laser sensor as an example, the terminal can control the 3D line laser sensor to scan the groove of the target welding joint once, and can obtain, but not limited to, 400 sets of groove profile data, and extract 20 sets of groove profile data from the 400 sets of groove profile data as the at least two sets of groove profile data corresponding to the groove of the target welding joint according to a preset interval number (for example, 20 sets as an interval).
[0091] It should be noted that in the embodiments of the present application, each set of groove profile data can be a plurality of feature point coordinates corresponding to the groove profile, and the X-axis coordinate value in the plurality of feature point coordinates can be understood as an index value of the corresponding Y-axis coordinate value, that is, the X-axis coordinate value of each feature point coordinate can be determined according to the corresponding Y-axis coordinate value. For example, taking each set of groove profile data including three feature points A1, A2 and A3 as an example, where the Y-axis coordinate value of A1 is Y1, the Y-axis coordinate value of A2 is Y2, and the Y-axis coordinate value of A3 is Y3, the X-axis coordinate value of A1 can be marked as 0, the X-axis coordinate value of A2 can be marked as 1, and the X-axis coordinate value of A3 can be marked as 2, and thus the coordinates of A1, A2 and A3 can be obtained as (0, Y1), (1, Y2) and (2, Y3) respectively.
[0092] As an option of the embodiments of the present application, obtaining the at least two sets of groove profile data of the target welding joint comprises:
[0093] fixing the target welding joint at a specified position, and determining the initial position and welding direction of the welding gun according to the type of the target welding joint;
[0094] determining the emission direction of the 3D line laser sensor based on the groove plane of the target welding joint and the welding direction of the welding gun;
[0095] obtaining the position of the 3D line laser sensor based on the initial position of the welding gun and the preset calibration parameters;
[0096] controlling the 3D line laser sensor to scan the groove of the target welding joint based on the emission direction and position of the 3D line laser sensor, and obtaining the at least two sets of groove profile data.
[0097] Specifically, the control terminal can also control the target welding joint to be fixed at a specified position first, which can but not limited to facilitate the 3D line laser sensor to quickly and accurately scan the groove of the target welding joint, and then the initial position of the welding torch and the welding direction can be determined by recognizing the shape of the groove of the target welding joint. The initial position of the welding torch can be understood as the starting position of the welding torch when spot welding the target welding joint, and the welding direction of the welding torch can be understood as the direction towards the target welding joint during the process of spot welding the target welding joint. The shape of the groove of the target welding joint can be pre-determined or recognized by shooting the groove of the target welding joint by a camera.
[0098] Here, taking a butt joint as an example, the butt joint is welded in a flat butt joint manner, and the initial position of the welding torch can be but not limited to set at any one end of the butt joint, and the welding direction can correspond to the axial direction parallel to the butt joint.
[0099] Further, after determining the initial position of the welding torch and the welding direction, the control terminal can determine the emission direction of the 3D line laser sensor based on the bevel plane of the groove of the target welding joint and the welding direction of the welding torch. In order to ensure the scanning effect of the 3D line laser sensor on the target welding joint, the emission direction of the 3D line laser sensor needs to be perpendicular to the bevel plane of the groove of the target welding joint, and also needs to be perpendicular to the welding direction of the welding torch. For reference, see Figure 2 The embodiment of the application shown provides an effect schematic diagram of obtaining the groove contour data. As shown in Figure 2 The rectangular frame can correspond to the 3D line laser sensor, and the black part can be understood as the top view of the groove part of the welding joint. At this time, the bevel plane of the groove of the welding joint can be understood as the plane in which the front and back directions of the groove part of the welding joint are located (corresponding to Figure 2 ), the welding direction of the welding torch can be understood as the direction from front to back (corresponding to Figure 2 ), and the emission direction of the 3D line laser sensor can correspond to from top to bottom (corresponding to Figure 2 ).
[0100] Further, after determining the initial position of the welding torch and the welding direction, the control terminal can also obtain the position of the 3D line laser sensor based on the initial position of the welding torch and the preset calibration parameter. The preset calibration parameter can be understood as the position of the 3D line laser sensor being relatively fixed with the initial position of the welding torch. For example, the initial position coordinates of the welding torch can be determined in the coordinate system corresponding to the 3D line laser sensor, and the position of the 3D line laser sensor can be obtained by combining the preset calibration parameter or the conventional calibration method. It can be understood that the calibration method between the 3D line laser sensor and the welding torch is a conventional technical means in the field, which will not be described in detail here.
[0101] Further, after obtaining the emission direction and the position of the 3D line laser sensor, the control terminal can fix the 3D line laser sensor according to the position of the 3D line laser sensor, adjust the installation angle of the 3D line laser sensor according to the emission direction of the 3D line laser sensor, and control the 3D line laser sensor to scan the groove of the target welding joint.
[0102] After obtaining the at least two sets of groove profile data of the target welding joint, the control terminal can convert all the feature point coordinates in each set of groove profile data according to a preset scale factor, to obtain the respective feature point coordinates with uniform coordinate units. In the embodiments of the present application, the X-axis coordinate unit and the Y-axis coordinate unit of each feature point in each set of groove profile data are inconsistent. In order to ensure uniformity and stability of the drawing, the X-axis coordinate value and the Y-axis coordinate value can be respectively enlarged or reduced according to the preset scale factor.
[0103] For example, the X-axis coordinate unit of each feature point in each set of groove profile data is 25 um, the Y-axis coordinate unit is mm, and the uniform coordinate unit is 10 um. In this case, the X-axis coordinate value of each feature point can be multiplied by 2.5, and the Y-axis coordinate value of each feature point can be multiplied by 100.
[0104] Further, the maximum value and the minimum value in all the converted feature point coordinates can be used to determine the drawing interval, which can be understood as the Y-axis coordinate interval of all the feature points. For example, the maximum value of the Y-axis in all the feature point coordinates is represented as DYmax, and the minimum value of the Y-axis is represented as DYmin. For example, the drawing interval DY can be calculated by the following formula, but is not limited thereto:
[0105]
[0106]
[0107]
[0108]
[0109] Further, after obtaining the drawing interval and the converted feature point coordinates, the control terminal can use the maplotlib library of python to draw a line graph of all the feature point coordinates and the drawing interval, and export the line graph as a groove image in a specified image format. For example, the groove image can be referred to as shown in FIG. 6. Figure 3 FIG. 6 shows a structural schematic diagram of a groove image according to an embodiment of the present application.
[0110] In step 104, key feature points in each groove image are identified, and at least two feature template images corresponding to the key feature points are obtained according to preset template parameters and first coordinates of the key feature points.
[0111] Specifically, after obtaining the groove image corresponding to each set of groove contour data, the control terminal can identify the respective corresponding key feature points in each groove image, the number of the key feature points can be one or more, and the feature template image corresponding to the key feature points can be intercepted in each groove image in combination with the coordinates of the key feature points and the preset template parameters. It can be understood that the key feature points in each groove image can correspond to each other, for example, the first key feature points in each groove image correspond to each other, and the feature template images corresponding to the first key feature points intercepted in each groove image can be uniformly used as at least two feature template images corresponding to the first key feature points.
[0112] As another optional embodiment of the present application, the key feature points in each groove image are identified, and at least two feature template images corresponding to the key feature points are obtained according to preset template parameters and first coordinates of the key feature points, including:
[0113] The included angle formed by each feature point and two adjacent feature points in each groove image is calculated;
[0114] The feature points corresponding to the included angles in the preset included angle interval are taken as key feature points, and the key feature points in each groove image are labeled;
[0115] In the groove image corresponding to the key feature points, the feature template image with the first coordinates of the key feature points as the center and the preset template parameters as the image size parameters is intercepted;
[0116] The feature template images corresponding to the key feature points with the same label in each groove image are classified.
[0117] Specifically, the control terminal can calculate the included angle formed by each feature point and two adjacent feature points in each groove image according to the coordinates of each feature point, which can specifically be calculating the distance between any two feature points between each feature point and two adjacent feature points, and then calculating the included angle formed by each feature point and two adjacent feature points according to the distance between the any two feature points. Before calculating the included angle formed by each feature point and two adjacent feature points, it can also be judged whether the each feature point and two adjacent feature points are on the same straight line to improve the overall detection efficiency, which can not be limited to this.
[0118] It can be understood that the first feature point and the last feature point can be defaulted not to belong to the key feature points.
[0119] Further, after obtaining each feature point and two adjacent feature points, the control terminal can take the feature point corresponding to the included angle in the preset included angle interval as a key feature point, and label each key feature point in each groove image in sequence. For example, four key feature points are determined in each groove image, and the key feature point in the upper left region of each groove image is labeled as 1, the key feature point in the upper right region is labeled as 2, the key feature point in the lower left region is labeled as 3, and the key feature point in the lower right region is labeled as 4. However, the present application is not limited to this.
[0120] Further, after determining the key feature points in each groove image, the control terminal can intercept a feature template image in each groove image, taking the coordinates of the key feature points as the center and taking the preset template parameters as the image size parameters. The preset template parameters can be, but are not limited to, the preset image height and width. It can be understood that in the present application, the groove image in which the key feature points are determined can be, but is not limited to, input into a preset program, and the feature template image corresponding to each key feature point in the groove image can be automatically generated according to the template parameters pre-input in the preset program and the coordinates of each key feature point in the groove image.
[0121] Herein Figure 4 An effect diagram of a feature template image provided by the present application is shown in Figure 4 A display interface of a setting software is shown, which can include the input groove image, the coordinates of each key feature point, and the preset template parameters (template width and height). It can be understood that the box generated in the groove image is the feature template image corresponding to the first key feature point, which is intercepted according to the coordinates of the first key feature point and the preset template parameters.
[0122] Further, after obtaining the feature template image corresponding to each key feature point in each groove image in sequence, all feature template images corresponding to key feature points with the same label can be classified and processed. Herein Figure 5 An effect diagram of a feature template image corresponding to a key feature point provided by the present application is shown in Figure 5As shown, four key feature points in any one groove image are taken as examples, and are respectively denoted as P1, P2, P3 and P4. The number of feature template images corresponding to P1 includes five, and each feature template image has a large difference in form. The number of feature template images corresponding to P2 includes five (not shown in the figure), and each feature template image has a large difference in form. The number of feature template images corresponding to P3 includes five (not shown in the figure), and each feature template image has a large difference in form. The number of feature template images corresponding to P4 includes five (not shown in the figure), and each feature template image has a large difference in form. It can be understood that, Figure 5 Some points are also marked in the figure, wherein P12 can be understood as a middle point of the groove, P34 can be understood as a lower middle point of the groove, w1 can be understood as a top width of the groove, w2 can be understood as a bottom width of the groove, and h1 can be understood as a top edge of the groove. The top width, the bottom width and the top edge of the groove can all be used as the groove size parameters of the target welded joint.
[0123] In the embodiment of the present application, since the profiles of the same key feature point at different positions of the weld are different, in order to increase the matching accuracy, the same key feature point needs to be made into multiple different feature template images in different groove images. Too many templates will slow down the calculation and affect the matching time. As a preferred, the same key feature point can be set to correspond to at least 5 feature template images, which is not limited herein.
[0124] Step 106, processing all feature template images based on a preset matching function to obtain a target template image.
[0125] Specifically, after obtaining all feature template images corresponding to the key feature points with the same label, the control terminal can but is not limited to perform similarity matching processing on all feature template images corresponding to the key feature points with the same label based on a preset matching function. This process can use the image processing library OpenCV of python, and of course other languages such as C, C++, JAVA, etc. can also be used to complete, and these languages can also be compatible with OpenCV, or other image processing libraries or self-written template matching algorithm can be used to complete. The template matching function matchTemplate in OpenCV is a public algorithm, and the principle is not described in detail. The function in the embodiment of the present application is to find the most similar position in the groove image to the feature template image. The calculation process of the function parameters and return values can be referred to as follows:
[0126] img_rst = cv.matchTemplate(gro_img, templ, method=5)
[0127] Wherein, gro img can be understood as groove image; templ can be understood as feature template image; method can be understood as matching method adopted by matching function, 5 indicates correlation coefficient matching method, this kind of method matches relative value of template to its mean with correlation value of image to its mean, 1 indicates perfect matching, -1 indicates poor matching, and 0 indicates no correlation; img_rst can be understood as matching result image, width is img_w-w, height is img_h-h, img_w is groove image width, and w is template image width.
[0128] Then, the ROI region is acquired using the minMaxLoc function, and the calculation process of the function parameter can be specifically referred to as follows:
[0129] minVal, maxVal, minLoc, maxLoc = cv.minMaxLoc(img_rst)
[0130] Wherein, minVal and maxVal can represent minimum value and maximum value in result array img_rst respectively; minLoc and maxLoc can represent positions of minimum value and maximum value in result array img_rst respectively.
[0131] Then, the position of the maximum matching value in the groove image, center_point, is calculated:
[0132] topLeft = maxLoc, which can be understood as the position of the maximum value in the result array is the position of the left upper corner of the best matching region in the groove image;
[0133] extreme_val=maxVal, which can be understood as the maximum value is the matching degree;
[0134] bottomRight = (topLeft[0] + w, topLeft[1]+ h), which can be understood as the right lower corner position of the best matching region in the groove image;
[0135] center_point=(topLeft[0] + w / / 2, topLeft[1]+ h / / 2), which can be understood as the center point of the best matching region.
[0136] It can be understood that, after processing all feature template images based on the preset matching function, the target template image corresponding to the key feature points in the groove image can be obtained, and the target template image corresponding to each key feature point can be unified in one groove image, and the second coordinates of the key feature points can be displayed in the groove image, but not limited to this. Here, the second coordinates of the key feature points can be understood as the coordinates with the highest matching accuracy selected from the key feature point coordinates of each groove image.
[0137] Here, refer to Figure 6 An effect schematic diagram of the target template image provided by the embodiment of the application is shown as follows: Figure 6 As shown in the figure, the second coordinates of the key feature points and the calculated matching degree can be displayed in the groove image, and the second coordinates of the key feature points are related to the calculated matching degree, in other words, the coordinates corresponding to the highest matching degree are selected as the second coordinates of the key feature points.
[0138] Here, in order to better verify the accuracy of the second coordinates of the key feature points, a V-shaped edgeless weld of a welding ball can be used for verification test, 3D line laser is used to scan the groove for one circle, a total of 6 groove images are detected, and the key feature point coordinates obtained by the embodiment of the application are compared with the actual positions identified by artificial recognition to obtain the detection result comparison table shown in Table 1 as follows:
[0139] Table 1: Detection result comparison table
[0140]
[0141] It can be understood that, in the key feature point coordinates obtained by the embodiment of the application and the actual position coordinates identified by artificial recognition, the average error of the X coordinates is 195 μm, and the average error of the Y coordinates is 192 μm, that is, the detection errors in the horizontal direction and the vertical direction are about 0.2 mm. In the flat welding, the error tolerance of the welding gun to the vertical position is relatively large, and an error of less than 1 mm is completely acceptable, and a horizontal error of 0.2 mm is also completely acceptable for a ball with a wall thickness of 16 mm.
[0142] Step 108: calculating the groove size parameters of the target welding joint according to the second coordinates of the key feature points.
[0143] Specifically, after obtaining the target template image and the second coordinates of the corresponding key feature points, since the second coordinates of the key feature points correspond to the coordinate system in the groove image, in order to guarantee the welding effect, it is necessary to convert the second coordinates of the key feature points to the coordinate system of the 3D line laser sensor mentioned above, for example, based on the drawing interval, the second coordinates of the key feature points are converted to obtain the third coordinates of the key feature points. Here, the drawing interval can be combined with Figure 7The embodiment of the application provides a coordinate conversion schematic diagram, as shown in Figure 7 The upper part of the schematic diagram corresponds to the coordinate system of the groove image, and the lower part of the schematic diagram corresponds to the polyline graph coordinate system corresponding to the 3D line laser sensor. Since the relative coordinates of the key feature points in the groove image and the relative coordinates of the key feature points in the polyline graph are the same, the relative coordinate expression in the groove image can be obtained, but is not limited to this.
[0144]
[0145]
[0146] In the above formula, and may correspond to the coordinates of the key feature points in the groove image, and may correspond to the drawing interval, that is, the width and height of the groove image.
[0147] Then, the relative coordinate expression in the polyline graph can be obtained.
[0148]
[0149]
[0150] In the above formula, and may correspond to the coordinates of the key feature points in the polyline graph, , , and may correspond to the coordinate range of the polyline graph.
[0151] Further, the above multiple formulas can be solved to obtain the coordinate expression in the polyline graph coordinate system.
[0152]
[0153]
[0154] Further, after obtaining the third coordinates of the key feature points, the control terminal can judge whether the matching degrees of the key feature points exceed a preset matching degree threshold. When it is detected that the matching degrees of all the key feature points exceed the preset matching degree threshold, the third coordinates of all the key feature points can be substituted into a preset groove size parameter expression to calculate the groove size parameters of the target welding joint, and the groove size parameters can include but are not limited to the upper width of the groove, the upper edge offset of the groove, the upper center point of the groove, the lower center point of the groove and the lower width of the groove.
[0155] The above can be referred toFigure 5 An effect schematic diagram of a feature template image corresponding to key feature points is shown in the embodiment of the application, as shown in Figure 5 As shown, taking four key feature points in a bevel image as an example, they can be respectively denoted as P1, P2, P3 and P4, and taking the coordinates (x1, y1) of P1 and the coordinates (x2, y2) of P2 as an example, the bevel size parameters can be obtained through a preset bevel size parameter expression as shown below:
[0156]
[0157]
[0158]
[0159]
[0160]
[0161] wherein w1 can correspond to the upper width of the bevel, h1 can correspond to the upper gap of the bevel, may correspond to the upper center point of the bevel, may correspond to the lower center point of the bevel, and w2 can correspond to the lower width of the bevel.
[0162] It can be understood that when the matching degrees of the key feature points do not exceed the preset matching degree threshold, it is determined whether the number of key feature points whose matching degrees exceed the preset matching degree threshold is greater than or equal to the number of key feature points whose matching degrees do not exceed the preset matching degree threshold;
[0163] When the number of key feature points whose matching degrees exceed the preset matching degree threshold is greater than or equal to the number of key feature points whose matching degrees do not exceed the preset matching degree threshold, the third coordinates of all the key feature points are substituted into the preset bevel size parameter expression to calculate the bevel size parameters of the target welding joint.
[0164] In other words, in the embodiment of the application, when the matching degrees of the key feature points are low, but the number of the key feature points is less than or equal to the number of key feature points whose matching degrees are high, the third coordinates of all the key feature points can still be used to calculate the bevel size parameters. When the number of the key feature points is greater than the number of key feature points whose matching degrees are high, the key feature points in the bevel image need to be reselected, and the corresponding matching degrees are calculated again, which will not be described in detail here.
[0165] It should be noted that the key feature points with the general matching degree not exceeding the preset matching degree threshold are considered to be approximately errors caused by the welding points at the bottom of the welding groove, but in the embodiments of the present application, firstly, the key feature points with the highest matching degree are selected, and secondly, when the number of the key feature points with the matching degree not exceeding the preset matching degree threshold is less than or equal to the number of the key feature points with the higher matching degree, the third coordinates of all the key feature points are still used to calculate the groove size parameters, that is, the influence and errors caused by the welding points are effectively avoided.
[0166] Please refer to Figure 8 , Figure 8 A structural schematic diagram of a welding groove geometric feature size detection device provided by an embodiment of the present application is shown.
[0167] As shown in Figure 8 , the welding groove geometric feature size detection device can at least include an image generation module 801, a template determination module 802, a coordinate acquisition module 803, and a parameter calculation module 804, wherein:
[0168] The image generation module 801 is configured to obtain at least two sets of groove contour data of a target welding joint, and determine a corresponding groove image according to each set of groove contour data;
[0169] The template determination module 802 is configured to identify key feature points in each groove image, and obtain at least two feature template images corresponding to the key feature points according to preset template parameters and first coordinates of the key feature points; wherein each key feature point in each groove image corresponds to a feature template image;
[0170] The coordinate acquisition module 803 is configured to process all feature template images based on a preset matching function to obtain a target template image; wherein the target template image includes second coordinates of the key feature points;
[0171] The parameter calculation module 804 is configured to calculate groove size parameters of the target welding joint according to the second coordinates of the key feature points.
[0172] In some possible embodiments, the image generation module is specifically configured to:
[0173] fix the target welding joint at a specified position, and determine an initial position of a welding gun and a welding direction according to a type of the target welding joint;
[0174] determine a transmission direction of a 3D line laser sensor based on a groove preparation plane of the target welding joint and the welding direction of the welding gun;
[0175] obtain a position of the 3D line laser sensor based on the initial position of the welding gun and preset calibration parameters;
[0176] Based on the emission direction and the position of the 3D line laser sensor, the 3D line laser sensor is controlled to scan the groove of the target welding joint to obtain at least two groups of groove profile data.
[0177] In some possible embodiments, the image generation module is specifically further configured to:
[0178] The coordinates of all feature points in each group of groove profile data are converted according to a preset scale factor, and a drawing interval is determined according to the maximum value and the minimum value of the converted coordinates of all feature points.
[0179] The groove image is generated according to the converted coordinates of all feature points and the drawing interval.
[0180] In some possible embodiments, the template determination module is specifically configured to:
[0181] The included angle formed by each feature point and two adjacent feature points in each groove image is calculated.
[0182] The feature points corresponding to the included angles in a preset included angle interval are taken as key feature points, and the key feature points in each groove image are labeled.
[0183] In the groove image corresponding to the key feature points, a feature template image is intercepted, with the first coordinate of the key feature point as the center and preset template parameters as the image size parameters.
[0184] The feature template images corresponding to the key feature points with the same label in each groove image are classified.
[0185] In some possible embodiments, the target template image further includes the matching degree of the key feature points.
[0186] The parameter calculation module is specifically configured to:
[0187] The second coordinate of the key feature point is converted based on the drawing interval to obtain a third coordinate of the key feature point.
[0188] When the matching degree of the key feature point exceeds a preset matching degree threshold, the third coordinate of the key feature point is substituted into a preset groove size parameter expression to calculate the groove size parameter of the target welding joint.
[0189] In some possible embodiments, the number of key feature points is greater than or equal to 2.
[0190] The parameter calculation module is specifically further configured to:
[0191] After the second coordinates of the key feature points are converted based on the drawing interval, the third coordinates of the key feature points are obtained, and it is determined whether the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold.
[0192] When it is detected that the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold, the third coordinates of all the key feature points are substituted into a preset groove size parameter expression, and the groove size parameter of the target welding joint is calculated.
[0193] In some possible embodiments, the device further includes:
[0194] Before the at least two groups of groove contour data of the target welding joint are acquired, and the corresponding groove images are determined according to each group of groove contour data, and the key feature points in each groove image are identified, it is determined whether each groove image includes at least two curve segments.
[0195] When it is detected that any one of the groove images includes at least two curve segments, the groove image is subjected to interpolation completion processing.
[0196] Those skilled in the art can clearly understand that the technical solutions of the embodiments of the present application can be implemented by means of software and / or hardware. The "unit" and "module" in the specification refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, and the hardware may, for example, be a field programmable gate array (FPGA), an integrated circuit (IC), and the like.
[0197] Please refer to Figure 9 , Figure 9 A structure schematic diagram of another welding groove geometric feature size detection device provided by an embodiment of the present application is shown.
[0198] As Figure 9 shown, the welding groove geometric feature size detection device 900 can include at least one processor 901, at least one network interface 904, a user interface 903, a memory 905, and at least one communication bus 902.
[0199] The communication bus 902 can be used to realize the connection and communication of the above-mentioned components.
[0200] The user interface 903 can include a key, and the optional user interface can further include a standard wired interface, a wireless interface.
[0201] The network interface 904 may include, but is not limited to, Bluetooth modules, NFC modules, Wi-Fi modules, etc.
[0202] The processor 901 may include one or more processing cores. The processor 901 connects to various parts within the welding bevel geometry dimension detection device 900 using various interfaces and lines. It executes various functions and processes data of the welding bevel geometry dimension detection device 900 by running or executing instructions, programs, code sets, or instruction sets stored in memory 905, and by calling data stored in memory 905. Optionally, the processor 901 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 901 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 901 and may be implemented as a separate chip.
[0203] The memory 905 may include RAM or ROM. Optionally, the memory 905 may include a non-transitory computer-readable medium. The memory 905 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 905 may also be at least one storage device located remotely from the aforementioned processor 901. Figure 9 As shown, the memory 905, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for detecting the geometric features and dimensions of the weld bevel.
[0204] Specifically, the processor 901 can be used to call the geometric feature dimension detection application of the weld bevel stored in the memory 905, and specifically perform the following operations:
[0205] Fix the target weld joint in the designated position, and determine the initial position of the welding torch and the welding direction according to the type of the target weld joint;
[0206] The emission direction of the 3D line laser sensor is determined based on the bevel plane of the target weld joint and the welding direction of the welding torch.
[0207] Based on the initial position of the welding gun and preset calibration parameters, the position of the 3D line laser sensor is obtained;
[0208] Based on the emission direction and position of the 3D line laser sensor, the 3D line laser sensor is controlled to scan the groove of the target welding joint, and at least two sets of groove profile data are obtained.
[0209] In some possible embodiments, a corresponding groove image is determined according to each set of groove profile data, including:
[0210] The coordinates of all feature points in each set of groove profile data are converted according to a preset scale factor, and a drawing interval is determined according to the maximum value and the minimum value in the converted coordinates of all feature points.
[0211] The groove image is generated according to the converted coordinates of all feature points and the drawing interval.
[0212] In some possible embodiments, key feature points in each groove image are identified, and at least two feature template images corresponding to the key feature points are obtained according to preset template parameters and first coordinates of the key feature points, including:
[0213] The angle formed by each feature point and its two adjacent feature points in each groove image is calculated.
[0214] The feature points corresponding to the angles within a preset angle interval are taken as key feature points, and the key feature points in each groove image are labeled.
[0215] In the groove image corresponding to the key feature points, a feature template image is intercepted, taking the first coordinates of the key feature points as the center and taking preset template parameters as the image size parameters.
[0216] The feature template images corresponding to the key feature points with the same label in each groove image are classified.
[0217] In some possible embodiments, the target template image further includes the matching degree of the key feature points.
[0218] The groove size parameters of the target welding joint are calculated according to the second coordinates of the key feature points, including:
[0219] Based on the drawing interval, the second coordinates of the key feature points are converted to obtain third coordinates of the key feature points.
[0220] When the matching degree of the key feature points exceeds a preset matching degree threshold, the third coordinates of the key feature points are substituted into a preset groove size parameter expression to calculate the groove size parameters of the target welding joint.
[0221] In some possible embodiments, the number of key feature points is greater than or equal to 2.
[0222] After the second coordinates of the key feature points are converted based on the drawing interval to obtain third coordinates of the key feature points, the method further includes:
[0223] Determining whether the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold.
[0224] When it is detected that the number of key feature points with a matching degree exceeding a preset matching degree threshold is greater than or equal to the number of key feature points with a matching degree not exceeding the preset matching degree threshold, the third coordinates of all the key feature points are substituted into a preset groove size parameter expression to calculate the groove size parameter of the target welding joint.
[0225] In some possible embodiments, before the key feature points in each groove image are identified, after the at least two groups of groove contour data of the target welding joint are acquired and the corresponding groove images are determined according to each group of groove contour data, the method further includes:
[0226] Determining whether each groove image includes at least two curve segments.
[0227] When it is detected that any one of the groove images includes at least two curve segments, the groove image is subjected to interpolation completion processing.
[0228] The application also provides a computer readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the steps of the above method. The computer readable storage medium can include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0229] It should be noted that, for the foregoing method embodiments, in order to simply describe, each is described as a combination of a series of actions, but those skilled in the art should know that the application is not limited to the action order described, because according to the application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the application.
[0230] In the above embodiments, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0231] In several embodiments provided in the present application, it should be understood that the disclosed apparatus can be implemented by other means. For example, the apparatus embodiments described above are only illustrative, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some service interface, apparatus or unit, which can be electrical or other forms.
[0232] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0233] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0234] If the integrated unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various program code storage media.
[0235] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be executed by a program instructing relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, etc.
[0236] The above merely provides illustrative examples of the present disclosure, and cannot limit the scope of the present disclosure. Any equivalent changes and modifications made according to the teachings of the present disclosure shall fall within the scope of the present disclosure. Those skilled in the art will readily conceive of other implementations of the present disclosure upon considering the specification and practicing the disclosure herein. The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional technical means in the art that are not described in the present disclosure. The specification and examples are merely considered as examples, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A method of detecting the geometric dimension of a welding groove, characterized by, The method comprises the following steps: obtaining at least two groups of groove profile data of a target welding joint, and determining a corresponding groove image according to each group of groove profile data; identifying a key feature point in each groove image, and obtaining at least two feature template images corresponding to the key feature point according to a preset template parameter and a first coordinate of the key feature point; each key feature point in each groove image corresponds to a feature template image; processing all feature template images based on a preset matching function to obtain a target template image; the target template image comprises a second coordinate of the key feature point; calculating a groove size parameter of the target welding joint according to the second coordinate of the key feature point; the identification of the key feature point in each groove image and the obtaining of the at least two feature template images corresponding to the key feature point according to the preset template parameter and the first coordinate of the key feature point comprises: calculating an included angle formed by each feature point and two adjacent feature points in each groove image; taking the feature point corresponding to the included angle in a preset included angle interval as a key feature point, and labeling the key feature points in each groove image; in the groove image corresponding to the key feature point, a feature template image is intercepted, which takes the first coordinate of the key feature point as a center and takes a preset template parameter as an image size parameter; performing classification processing on the feature template images corresponding to the key feature points with the same label in each groove image; the target template image further comprises a matching degree of the key feature point; the calculation of the groove size parameter of the target welding joint according to the second coordinate of the key feature point comprises: based on the drawing interval, performing conversion processing on the second coordinate of the key feature point to obtain a third coordinate of the key feature point; when the matching degree of the key feature point exceeds a preset matching degree threshold, the third coordinate of the key feature point is substituted into a preset groove size parameter expression to calculate the groove size parameter of the target welding joint.
2. The method of claim 1, wherein, the obtaining of the at least two groups of groove profile data of the target welding joint comprises: fixing the target welding joint at a specified position, and determining an initial position of a welding gun and a welding direction according to a type of the target welding joint; determining a transmission direction of a 3D line laser sensor based on a groove preparation plane of the target welding joint and the welding direction of the welding gun; obtaining a position of the 3D line laser sensor based on the initial position of the welding gun and a preset calibration parameter; controlling the 3D line laser sensor to scan the groove of the target welding joint based on the transmission direction and the position of the 3D line laser sensor to obtain at least two groups of groove profile data.
3. The method of claim 2, wherein, the determination of the corresponding groove image according to each group of groove profile data comprises: performing conversion processing on all feature point coordinates in each group of groove profile data according to a preset proportion coefficient, and determining a drawing interval according to a maximum value and a minimum value of all the converted feature point coordinates; Generate a groove image according to all the converted feature point coordinates and the drawing interval.
4. The method of claim 1, wherein, The number of the key feature points is greater than or equal to 2; After the second coordinate of the key feature point is converted based on the drawing interval to obtain the third coordinate of the key feature point, the method further comprises: Determine whether the number of the key feature points with a matching degree exceeding the preset matching degree threshold is greater than or equal to the number of the key feature points with a matching degree not exceeding the preset matching degree threshold. When it is detected that the number of the key feature points with a matching degree exceeding the preset matching degree threshold is greater than or equal to the number of the key feature points with a matching degree not exceeding the preset matching degree threshold, substitute the third coordinates of all the key feature points into a preset groove size parameter expression to calculate the groove size parameter of the target welding joint.
5. The method of claim 1, wherein, After the at least two groups of groove contour data of the target welding joint are acquired and the corresponding groove image is determined according to each group of the groove contour data, before the key feature points in each groove image are identified, the method further comprises: Determine whether each groove image comprises at least two curve segments. When it is detected that any one of the groove images comprises at least two curve segments, perform interpolation completion processing on the groove image.
6. A device for detecting the geometric dimensions of a weld bevel, characterized in that Comprise: An image generation module is configured to acquire at least two groups of groove contour data of a target welding joint and determine a corresponding groove image according to each group of the groove contour data. A template determination module is configured to identify key feature points in each groove image and obtain at least two feature template images corresponding to the key feature points according to preset template parameters and first coordinates of the key feature points. A coordinate acquisition module is configured to process all the feature template images based on a preset matching function to obtain a target template image, wherein the target template image comprises second coordinates of the key feature points. A parameter calculation module is configured to calculate a groove size parameter of the target welding joint according to the second coordinates of the key feature points. The identification of the key feature points in each groove image and the obtaining of at least two feature template images corresponding to the key feature points according to preset template parameters and first coordinates of the key feature points comprise: Calculate an included angle formed by each feature point and two adjacent feature points in each groove image. Take the feature points corresponding to the included angles within a preset included angle interval as key feature points and label the key feature points in each groove image. In the groove image corresponding to the key feature points, intercept a feature template image with the first coordinates of the key feature points as the center and preset template parameters as image size parameters. Classify the feature template images corresponding to the key feature points with the same label in each groove image. The target template image further comprises matching degrees of the key feature points. The second coordinate of the key feature point is converted based on the drawing interval to obtain a third coordinate of the key feature point. When the matching degree of the key feature point exceeds a preset matching degree threshold, the third coordinate of the key feature point is substituted into a preset groove size parameter expression to calculate the groove size parameter of the target welding joint. comprising a processor and a memory; 7. A device for detecting the geometric dimensions of a weld bevel, characterized in that the processor is connected with the memory; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program codes by reading the executable program codes stored in the memory, so as to execute the steps of the method according to any one of claims 1-5. The computer readable storage medium stores instructions, when the instructions run on the computer or the processor, make the computer or the processor execute the steps of the method according to any one of claims 1-5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
Welding groove detection method
CN110823090A
Image template matching method based on feature point detection
CN111160477A