A method and system for weld feature extraction using a line laser sensor
By extracting the central line and feature points of the weld, combined with the automatic multi -scale peak finding algorithm and the polar point screening method of the control range, the line laser sensor is solved in the welding scenario Feature extraction difficulties have achieved high -precision weld positioning and three -dimensional reconstruction.
Patent Information
- Application Number
- CN202410080226.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-01-18
AI Technical Summary
In welding scenes, the linear laser sensor is difficult to extract weld features due to uneven light, reflection and arc noise interference, which affects the accuracy and stability of weld positioning.
Adopt a welding seam feature extraction method, pre -processing by obtaining the laser striped image of the welded slope, extract the central line and feature points of the weld, combined with automatic multi -scale peak finding algorithm and the extreme point screening method of the control range. Realize the three -dimensional reconstruction and positioning of the weld.
This method can effectively extract the central lines and feature points of a variety of typical welds, with strong anti -interference capabilities, and improve the accuracy of weld positioning and system stability.
Smart Images

Figure CN117911516B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of welding vision sensors, and in particular to a weld feature extraction method and system for a line laser sensor. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Welding robots are widely used in industrial production, and their use scenarios cover many aspects such as large quantities of standardized components and small batches of customized parts. At present, the operation and control of welding robots are still mainly based on teaching programming and offline programming. In order to improve welding accuracy and programming efficiency, installing a line laser sensor at the end of the robot arm for weld scanning and tracking has become an important development trend in the field of welding robots.
[0004] Line laser sensors have the characteristics of non-contact measurement and high precision, and can obtain weld information in real time. However, due to factors such as uneven lighting in the welding scene, reflection on the workpiece surface, and welding arc noise interference, it is difficult for line laser sensors to extract weld features, thus affecting the accuracy and stability of weld positioning. Summary of the invention
[0005] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a weld feature extraction method and system for a line laser sensor, which extracts the center lines and feature points of a variety of typical welds, and can realize three-dimensional reconstruction and weld positioning of the weld in conjunction with the line laser sensor, and has a certain anti-interference ability.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A first aspect of the present invention provides a weld feature extraction method for a line laser sensor.
[0008] A weld feature extraction method for a line laser sensor, comprising:
[0009] Acquire the laser stripe image of the weld groove and perform preprocessing to obtain a denoised binary image;
[0010] Traverse each pixel in the denoised binary image, calculate the distance between each pixel and its nearest zero pixel, and obtain the corresponding distance heat map;
[0011] Find the maximum value of each column in the distance heat map by column, use the pixel coordinates corresponding to the maximum value of each column as the coordinates of the point on the center line of the corresponding column, and extract the center line of the weld;
[0012] Perform a second-order difference on the center line of the weld in the image column direction to find the slope mutation point on the center line and obtain a second-order difference image;
[0013] The automatic multi-scale peak search algorithm is used to search for the extreme points of the second-order difference image, and a number of extreme points corresponding to the weld type are selected as weld feature points to obtain the pixel coordinates corresponding to the weld feature points.
[0014] As an implementation method, based on the extreme point screening method of the control range, a number of extreme points corresponding to the weld type are selected as weld feature points.
[0015] As an implementation method, based on the extreme point screening method of the control range, the process of selecting the number of extreme points corresponding to the weld type as the weld characteristic points is as follows:
[0016] A control band is defined at the average value of the second-order difference image, and the peak points within the control band are determined as noise points;
[0017] Expand the second-order difference image at the mean value toward the two sides of the control band, and pay attention to the number of extreme points outside the control band during the expansion process;
[0018] When the number of peak points outside the control band is reduced to the number of key points of the corresponding weld type, the expansion is stopped and the points outside the control band are selected as the final weld feature points.
[0019] Among them, there are various types of weld grooves, including V-type, I-type, Y-type, overlap and corner joints, and different grooves contain different numbers of weld feature points, which is reflected in different numbers of peak points on the second-order difference image, and the peak points are positive and negative. For example, three peak points are required for V-type (depending on the arrangement of the sensor camera, there will be one positive and two negative or one negative and two positive cases), two for overlap (one positive and one negative), and one for corner joint. When using control belts to screen peak points, there is no need to consider the positive and negative issues of peak points, as long as the screening finally meets the requirement on the number of feature points.
[0020] The extreme point screening method based on the control range improves the accuracy of weld feature point recognition: a control band is defined at the average value of the second-order difference image, and the peak points within the control band are judged as noise points. This method can effectively suppress noise and thus improve the accuracy of weld feature point recognition.
[0021] The extreme point screening method based on the control range improves the flexibility of weld feature point identification: expand in the two side directions of the control band at the mean of the second-order difference image, and pay attention to the number of extreme points outside the control band during the expansion process. When the number of peak points outside the control band is reduced to the number of key points of the corresponding weld type, stop the expansion and select the points outside the control band as the final weld feature points. This method can improve the flexibility of weld feature point identification, so that the technical solution can adapt to various types of welds.
[0022] As an implementation method, the process of searching for extreme points of the second-order difference image using the automatic multi-scale peak search algorithm is as follows:
[0023] Calculate the local extreme point matrix of the value of v at the horizontal coordinate u corresponding to the pixel in the second-order difference image under each preset window size;
[0024] Sum each element in the corresponding local extreme point matrix by column to obtain the corresponding sum vector;
[0025] Find the u value corresponding to the maximum value in the corresponding summed vector, where the signal v(u) corresponding to the u value is the peak value.
[0026] The advantage of this technical solution is that the automatic multi-scale peak search algorithm can effectively find the peak point of the data without any adjustable parameters. It is an algorithm based on local maximum search and is suitable for peak detection of non-stationary signals.
[0027] As an implementation manner, in the second-order difference image, the second-order difference result of each column of the center line is set to the average value of a preset number of second-order difference results in its neighborhood.
[0028] The advantages of this technical solution are: since the extracted center line is not a perfect straight line, the slope mutation point not only appears at the inflection point of the groove, and any pixel-level jitter of the center line will be reflected as an obvious peak on the second-order difference image. By setting the second-order difference results of each column of the center line to the average of a preset number of second-order difference results in its neighborhood, the jitter at the pixel level can be improved, thereby improving the accuracy of centerline extraction.
[0029] As an implementation manner, before performing a second-order difference on the center line of the weld in the image column direction, the method further includes:
[0030] The centerline of the weld is smoothed using an average filter method for a discrete set of points.
[0031] The advantage of this technical solution is that it can reduce pixel-level jitter of the extracted center line coordinates.
[0032] As an implementation method, the process of preprocessing the laser stripe image includes:
[0033] The laser stripe image is converted into a grayscale image, and median filtering, contrast enhancement, binarization and morphological opening operations are performed in sequence to obtain a binary image;
[0034] The connected domain information of the binary image is counted, the preset noise is removed, and the denoised binary image is obtained.
[0035] The advantages of this technical solution are: median filtering is used to reduce isolated and small salt and pepper noise and impulse noise in the image, the contrast enhancement part uses the Sigmoid function as a contrast enhancement method, and the morphological opening operation is performed after the image is binarized to remove small bright spots and burrs in the image. The connected domain information of the binary image is counted, and for weld grooves with no interruptions in the middle (such as V-shaped, overlapped, and fillet joints), only the connected domains with an area greater than the set pixel and a width greater than a set proportion of the total image width are retained, and other connected domains are removed. Large-area noise in the image is filtered out by this area filtering method.
[0036] A second aspect of the present invention provides a weld feature extraction system for a line laser sensor.
[0037] A weld feature extraction system for a line laser sensor, comprising:
[0038] An image preprocessing module is used to obtain the laser stripe image of the weld groove and perform preprocessing to obtain a denoised binary image;
[0039] The distance transformation module is used to traverse each pixel in the denoised binary image, calculate the distance between each pixel and its nearest zero pixel, and obtain the corresponding distance heat map;
[0040] The centerline extraction module is used to find the maximum value of each column in the distance heat map by column, and use the pixel coordinates corresponding to the maximum value of each column as the coordinates of the point on the centerline of the corresponding column to extract the centerline of the weld;
[0041] A second-order difference calculation module is used to perform a second-order difference on the center line of the weld in the image column direction to find the slope mutation point on the center line and obtain a second-order difference image;
[0042] The feature point extraction module is used to search for extreme points of the second-order difference image using an automatic multi-scale peak search algorithm, and select a number of extreme points corresponding to the weld type as weld feature points to obtain the pixel coordinates corresponding to the weld feature points.
[0043] A third aspect of the present invention provides a computer-readable storage medium.
[0044] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in the weld feature extraction method for a line laser sensor as described above.
[0045] A fourth aspect of the present invention provides an electronic device.
[0046] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the weld feature extraction method for a line laser sensor as described above are implemented.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The present invention adopts the method of searching the maximum value of each column in the distance heat map corresponding to the weld groove by column, determines the center line of the weld, calculates the second-order difference of the center line of the weld in the image column direction, obtains the corresponding second-order difference image, and then uses the automatic multi-scale peak search algorithm to effectively find the extreme points in the second-order difference image without any adjustable parameters, and has strong anti-interference ability. Finally, according to the weld type, the corresponding number of extreme points are selected to obtain the pixel coordinates of the corresponding weld feature points, and the weld stripe center lines and weld feature points of various typical welds (such as V-shaped, overlapped, and filleted) can be accurately extracted, and the function of using a line laser sensor to perform three-dimensional reconstruction and weld tracking of the weld is realized, so that the welding robot system obtains visual perception ability and improves the weld positioning accuracy of the welding robot system.
[0049] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0051] Figure 1 This is a diagram showing the effect of extracting the center line of the weld stripe in an embodiment of the present invention;
[0052] FIG2( a ) is an original point image in an embodiment of the present invention;
[0053] FIG2( b ) is a second-order difference image calculated based on the center line in an embodiment of the present invention;
[0054] Figure 3 is a schematic diagram of automatic multi-scale peak search and extreme point screening in an embodiment of the present invention;
[0055] Figure 4is a schematic diagram of welding feature point extraction in an embodiment of the present invention;
[0056] Figure 5 It is a flow chart of the weld feature extraction method in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0058] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0059] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0060] Embodiment 1
[0061] like Figure 5 As shown, this embodiment provides a weld feature extraction method for a line laser sensor, which specifically includes the following steps:
[0062] Step 1: Obtain the laser stripe image of the weld groove and preprocess it to obtain a denoised binary image.
[0063] In some optional embodiments, a line laser sensor installed at the end of a robot arm is used to capture a laser stripe image of the weld groove.
[0064] It should be noted here that, in other embodiments, other devices may also be used to acquire the laser stripe image of the weld groove.
[0065] In the specific implementation process, the process of preprocessing the laser stripe image includes:
[0066] When the line laser sensor uses a color RGB camera instead of a grayscale camera, the color image is first converted into a grayscale image, and then median filtering, contrast enhancement, binarization, and morphological opening operations are performed in sequence to obtain a binary image.
[0067] Among them, value filtering is a nonlinear signal processing method, which sets the gray value of each pixel to the median of the gray values of all pixels in a neighborhood window of the point, which can effectively reduce the isolated small salt and pepper noise and impulse noise in the image.
[0068] The contrast enhancement part uses the Sigmoid function as the contrast enhancement method. After binarizing the image, a morphological opening operation is performed to remove small bright spots and burrs in the image.
[0069] The contrast enhancement method based on the Sigmoid function improves the contrast compared to the traditional method based on grayscale histogram and linear transformation. The mathematical representation of the Sigmoid function is as follows:
[0070]
[0071] Among them, Greyscale represents the grayscale distribution of the original image, C is the saturation coefficient of the Sigmoid function. The larger its value is, the steeper the change trend of the Sigmoid function is, and the more obvious the change of the image edge will be. Offset represents the offset of the grayscale distribution, which is used to eliminate the influence of different grayscale distribution ranges of images taken by different devices. NewGreyscale is the new grayscale distribution after contrast enhancement.
[0072] In the binarization part, the appropriate binarization threshold is determined according to the grayscale distribution information obtained from the contrast enhancement part. Specifically, 1.3 times the average grayscale value of the image is used as the binarization threshold, but the maximum binarization threshold does not exceed 220. Its mathematical expression is as follows:
[0073]
[0074] Among them, grey avg Represents the average gray value of the image, and Threshold represents the binarization threshold.
[0075] Perform a binarization operation and traverse each pixel of the image. If its grayscale value is higher than the Threshold, modify the grayscale value to 255, otherwise set its grayscale value to 0, and then use the morphological opening operation to remove small bright spots and burrs to obtain a binary image.
[0076] Next, statistics are performed on the connected domain information of the binary image, and the preset noise is removed to obtain the denoised binary image. In this way, for the weld grooves without interruptions in the middle (such as V-shaped, overlapped, and fillet joints), only the connected domains with an area greater than the set pixel and a width greater than a set ratio of the total image width are retained, and other connected domains are removed. This area filtering method is used to filter out large areas of noise in the image. For example, only the connected domains with an area greater than 10,000 pixels and a width (the laser beam must be horizontal on the image) greater than 3 / 4 of the total image width are retained.
[0077] Step 2: Traverse each pixel in the denoised binary image, calculate the distance between each pixel and its nearest zero pixel, and obtain the corresponding distance heat map.
[0078] Specifically, the distanceTransform() function in OpenCV is used to implement the distance transformation of the image, that is, to count the minimum distance between all pixels in the image and 0 pixel.
[0079] In the specific implementation process, the distance formula for calculating each pixel and its corresponding nearest zero pixel is as follows:
[0080]
[0081] Among them, (i, j) represents the pixel coordinates, B represents the set of all pixels with a pixel value of 0, and D(x, y) represents the distance between the coordinates (x, y) and the nearest pixel value of 0.
[0082] Step 3: Find the maximum value of each column in the distance heat map by column, use the pixel coordinates corresponding to the maximum value of each column as the coordinates of the point on the center line of the corresponding column, and extract the center line of the weld.
[0083] Find the maximum value of each column in the distance heat map by column, and use the pixel coordinates corresponding to the maximum value as the coordinates of the point on the center line of the corresponding column. This method may cause pixel-level jitter in the center line coordinates, which is not conducive to the subsequent second-order difference processing. In order to improve this situation, the average filtering method for the discrete point set is used to smooth the extracted center line to obtain the final center line. The effect diagram of the weld stripe center line extraction is shown in the figure below. Figure 1 shown.
[0084] Step 4: Perform a second-order difference on the center line of the weld in the image column direction to find the slope mutation point on the center line and obtain a second-order difference image, as shown in Figure 2(a) and Figure 2(b).
[0085] A second-order difference operation is performed in the column direction based on the extracted center line point set. The mathematical representation of the second-order difference operation is as follows:
[0086] Δ 2 I(x,y)=I(x,y+1)-2·I(x,y)+I(x,y-1)
[0087] Among them, Δ 2 I(x,y) is the result of the second-order difference; I(x,y) represents the element in the x-th row and y-th column in the pixel matrix of the second-order difference image, then I(x,y+1) and I(x,y-1) represent the elements in the x-th row and y+1-th column and the x-th row and y-1-th column in the matrix, that is, the elements of the adjacent previous and next rows.
[0088] In the second-order difference image, the second-order difference result of each column of the center line is set to the average value of a preset number (such as 50) of second-order difference results in its neighborhood.
[0089] Since the extracted centerline is not a perfect straight line, the slope mutation point not only appears at the inflection point of the groove, and any pixel-level jitter of the centerline will be reflected as an obvious peak on the second-order difference image. By setting the second-order difference results of each column of the centerline to the average of a preset number of second-order difference results in its neighborhood, the jitter at the pixel level can be improved, thereby improving the accuracy of centerline extraction.
[0090] Step 5: Use the automatic multi-scale peak search algorithm to search for the extreme points of the second-order difference image, and select a number of extreme points corresponding to the weld type as weld feature points to obtain the pixel coordinates corresponding to the weld feature points.
[0091] Among them, the automatic multi-scale peak finding algorithm (AMPD) can effectively find the peak point of the data without any adjustable parameters. AMPD is an algorithm based on local maximum search, which is suitable for peak detection of non-stationary signals. The algorithm finds the peak of the signal by calculating the local extreme point (LMP) matrix. For the input signal x(t), first define a window size range [1,L], where L is the maximum window size. t is the value in the u direction in the image coordinate system. The algorithm obtains the LMP matrix by scanning the image in the column direction, and then sums the LMP matrix in the first dimension. The index with the largest sum value is the u direction coordinate of the peak point. Then calculate the local extreme point (LMP) matrix R of the signal at each window size, and its elements are defined as:
[0092]
[0093] Among them, i represents the window size and t represents the time.
[0094] Then sum each element of the R matrix column by column to get a new vector S(t):
[0095]
[0096] Finally, find the t value corresponding to the maximum value in S(t). The signal x(t) corresponding to this t value is the peak value, such as Figure 4 shown.
[0097] In this embodiment, the horizontal coordinate corresponding to the pixel in the second-order difference image is u; the input signal x(t) is the value of v at the horizontal coordinate u corresponding to the pixel in the second-order difference image, that is, v(u).
[0098] In the specific implementation process, the process of searching the extreme points of the second-order difference image using the automatic multi-scale peak search algorithm is as follows:
[0099] Calculate the local extreme point matrix of the value of v at the horizontal coordinate u corresponding to the pixel in the second-order difference image under each preset window size;
[0100] Sum each element in the corresponding local extreme point matrix by column to obtain the corresponding sum vector;
[0101] Find the u value corresponding to the maximum value in the corresponding summation vector. The signal v(u) corresponding to this u value is the peak value.
[0102] Different weld types have different numbers of feature points. After using peak search, different numbers of extreme points need to be selected as weld feature points according to different weld types.
[0103] Among them, the weld characteristic points of I-type weld are 4, the weld characteristic points of V-type weld are 3, the weld characteristic points of lap weld are 2, and the weld characteristic point of fillet weld is 1.
[0104] like Figure 3 As shown, in this embodiment, based on the extreme point screening method of the control range, a number of extreme points corresponding to the weld type are selected as weld feature points, and the process is as follows:
[0105] A control band is defined at the average value of the second-order difference image, and the peak points within the control band are determined as noise points;
[0106] Expand the second-order difference image at the mean value toward the two sides of the control band, and pay attention to the number of extreme points outside the control band during the expansion process;
[0107] When the number of peak points outside the control band is reduced to the number of key points of the corresponding weld type, the expansion is stopped and the points outside the control band are selected as the final weld feature points.
[0108] Embodiment 2
[0109] This embodiment provides a weld feature extraction system for a line laser sensor, which specifically includes the following modules:
[0110] An image preprocessing module is used to obtain the laser stripe image of the weld groove and perform preprocessing to obtain a denoised binary image;
[0111] The distance transformation module is used to traverse each pixel in the denoised binary image, calculate the distance between each pixel and its nearest zero pixel, and obtain the corresponding distance heat map;
[0112] The centerline extraction module is used to find the maximum value of each column in the distance heat map by column, and use the pixel coordinates corresponding to the maximum value of each column as the coordinates of the point on the centerline of the corresponding column to extract the centerline of the weld;
[0113] A second-order difference calculation module is used to perform a second-order difference on the center line of the weld in the image column direction to find the slope mutation point on the center line and obtain a second-order difference image;
[0114] The feature point extraction module is used to search for extreme points of the second-order difference image using an automatic multi-scale peak search algorithm, and select a number of extreme points corresponding to the weld type as weld feature points to obtain the pixel coordinates corresponding to the weld feature points.
[0115] It should be noted here that each module in this embodiment corresponds one-to-one to each step in Example 1, and the specific implementation process is the same.
[0116] Embodiment 3
[0117] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the weld feature extraction method for a line laser sensor as described above are implemented.
[0118] Embodiment 4
[0119] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the weld feature extraction method for a line laser sensor as described above are implemented.
[0120] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A weld feature extraction method for a line laser sensor, characterized in that: include: Acquire the laser stripe image of the weld groove and perform preprocessing to obtain a denoised binary image; Traverse each pixel in the denoised binary image, calculate the distance between each pixel and its nearest zero pixel, and obtain the corresponding distance heat map; Find the maximum value of each column in the distance heat map by column, use the pixel coordinates corresponding to the maximum value of each column as the coordinates of the point on the center line of the corresponding column, and extract the center line of the weld; Perform a second-order difference on the center line of the weld in the image column direction to find the slope mutation point on the center line and obtain a second-order difference image; The automatic multi-scale peak search algorithm is used to search for the extreme points of the second-order difference image, and a number of extreme points corresponding to the weld type are selected as weld feature points to obtain the pixel coordinates corresponding to the weld feature points.
2. The weld feature extraction method for a line laser sensor according to claim 1, characterized in that: Based on the extreme point screening method of the control range, a number of extreme points corresponding to the weld type are selected as weld characteristic points.
3. The weld feature extraction method for a line laser sensor according to claim 2, characterized in that: Based on the extreme point screening method of the control range, the process of selecting the number of extreme points corresponding to the weld type as the weld characteristic points is as follows: A control band is defined at the average value of the second-order difference image, and the peak points within the control band are determined as noise points; Expand the second-order difference image at the mean value toward the two sides of the control band, and pay attention to the number of extreme points outside the control band during the expansion process; When the number of peak points outside the control band is reduced to the number of key points of the corresponding weld type, the expansion is stopped and the points outside the control band are selected as the final weld feature points.
4. The weld feature extraction method for a line laser sensor according to claim 1, characterized in that: The process of searching for the extreme points of the second-order difference image using the automatic multi-scale peak search algorithm is as follows: Calculate the local extreme point matrix of the value of v at the horizontal coordinate u corresponding to the pixel in the second-order difference image under each preset window size; Sum each element in the corresponding local extreme point matrix by column to obtain the corresponding sum vector; Find the u value corresponding to the maximum value in the corresponding summed vector, where the signal v(u) corresponding to the u value is the peak value.
5. The weld feature extraction method for a line laser sensor according to claim 1, characterized in that: In the second-order difference image, the second-order difference result of each column of the center line is set to the average value of a preset number of second-order difference results in its neighborhood.
6. The weld feature extraction method for a line laser sensor according to claim 1, characterized in that: Before performing the second-order difference on the center line of the weld in the image column direction, the following steps are also included: The centerline of the weld is smoothed using an average filtering method for discrete point sets.
7. The weld feature extraction method for a line laser sensor according to claim 1, characterized in that: The process of preprocessing laser stripe images includes: The laser stripe image is converted into a grayscale image, and median filtering, contrast enhancement, binarization and morphological opening operations are performed in sequence to obtain a binary image; The connected domain information of the binary image is counted, and the preset noise is removed to obtain the denoised binary image.
8. A weld feature extraction system for a line laser sensor, characterized in that: include: An image preprocessing module is used to obtain the laser stripe image of the weld groove and perform preprocessing to obtain a denoised binary image; The distance transformation module is used to traverse each pixel in the denoised binary image, calculate the distance between each pixel and its nearest zero pixel, and obtain the corresponding distance heat map; The centerline extraction module is used to find the maximum value of each column in the distance heat map by column, and use the pixel coordinates corresponding to the maximum value of each column as the coordinates of the point on the centerline of the corresponding column to extract the centerline of the weld; A second-order difference calculation module is used to perform a second-order difference on the center line of the weld in the image column direction to find the slope mutation point on the center line and obtain a second-order difference image; The feature point extraction module is used to search for extreme points of the second-order difference image using an automatic multi-scale peak search algorithm, and select a number of extreme points corresponding to the weld type as weld feature points to obtain the pixel coordinates corresponding to the weld feature points.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the weld feature extraction method for a line laser sensor as described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the weld feature extraction method for a line laser sensor according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for machine vision detection in allusion to self-focusing lens surface defect
CN107255641A
Weld joint image feature point extraction method based on improved mean filtering method
CN111695575A