Groove edge detection method and device

Through the frame difference method differential operation and laser line contour extraction, the problem of low accuracy of groove edge detection during welding is solved, the detection accuracy is improved, and stronger support is provided for welding.

CN118747760APending Publication Date: 2024-10-08CHENGDU XIONGGU JIASHI ELECTRICAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410741539.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

During the welding process, misdetection or missed detection of the groove edge leads to a decrease in welding quality. It is difficult for the existing linear detection method to accurately identify the groove edge in complex welding scenarios.

Method used

The frame difference method is used to perform differential operation on the grayscale groove images without laser and with laser, extract the contour in the laser line image, and obtain the groove inflection point information, thereby accurately obtaining the groove edge information.

Benefits of technology

The frame difference method removes background interference, making the laser line area more prominent, accurately identifying the inflection point of the laser line in the groove area, improving the accuracy of groove edge detection, and providing support for subsequent welding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747760A_ABST
    Figure CN118747760A_ABST
Patent Text Reader

Abstract

The invention discloses a groove edge detection method and device, and relates to the technical field of welding. The method comprises the following steps: firstly, based on a frame difference method, carrying out differential operation by utilizing an obtained gray-scale groove image without laser and an obtained gray-scale groove image with laser, and only reserving a laser line area in the gray-scale groove image with laser to obtain a laser line image; then, groove inflection point information of the laser rays is obtained by extracting the contours of the laser rays in the laser ray images, and groove edge information is obtained according to the groove inflection point information; therefore, background interference is effectively removed through differential operation of the frame difference method, and a laser line area is more prominent. Moreover, by extracting the contour of the laser line in the laser line image, the inflection point of the laser line in the groove area can be accurately identified, so that the edge information of the groove can be more accurately obtained, and powerful support is provided for subsequent procedures such as welding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of welding technology, and in particular to a groove edge detection method and device. Background Art

[0002] In the welding process, accurate detection of the groove edge is crucial to the welding quality. The groove edge is not only the limit of the movement of the welding gun, which can prevent the edge from being bitten due to excessive welding, but also a key reference point for determining the center of the welding gun swing. Therefore, how to accurately detect the groove edge has become an important research direction in the field of welding.

[0003] At present, the edge of the groove is usually a straight line, so a straight line detection method such as a Hough straight line detection method and / or a straight line fitting method based on edge information is usually used to detect the edge of the groove.

[0004] However, in actual welding scenarios, the surface of the base material usually has grinding marks, and the grinding marks are usually straight lines. In addition, the gap before welding and the edge of the weld after welding are usually straight lines. Therefore, if the straight line detection method is simply used to detect the groove edge, there is a high possibility of misdetection or missed detection of the groove edge, which greatly reduces the accuracy of groove edge detection. Summary of the invention

[0005] Based on the above problems, the present application provides a groove edge detection method and device, which can improve the accuracy of groove edge detection.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, the present application discloses a groove edge detection method, the method comprising:

[0008] Obtaining a grayscale groove image without laser and a grayscale groove image with laser;

[0009] Performing a differential operation on the grayscale groove image without laser and the grayscale groove image with laser by using a frame difference method, retaining the laser line area in the grayscale groove image with laser, and obtaining a laser line image;

[0010] By extracting the contour of the laser line in the laser line image, the groove inflection point information of the laser line is obtained;

[0011] The groove edge information is obtained according to the groove inflection point information.

[0012] Optionally, the grayscale groove image with laser includes a laser line; and extracting the contour of the laser line in the laser line image includes:

[0013] Performing Gaussian filtering on the laser line image to obtain a Gaussian image;

[0014] Obtaining a ROI Gaussian image by retaining pixel points in the Gaussian image whose pixel values ​​are higher than a preset pixel threshold;

[0015] The contour of the laser line in the laser line image is extracted according to the ROI Gaussian image.

[0016] Optionally, extracting the contour of the laser line in the laser line image according to the ROI Gaussian image includes:

[0017] By traversing the pixel points in the ROI Gaussian image by column, the pixel point with the maximum pixel value in each column of the pixel points in the ROI Gaussian image is obtained to obtain the contour of the laser line.

[0018] Optionally, the obtaining the groove inflection point information of the laser line includes:

[0019] According to the contour of the laser line, a bottom contour point, a first contour point and a last contour point are obtained;

[0020] Connecting the bottom contour point with the first contour point and the last contour point to obtain a first straight line and a second straight line respectively;

[0021] Among all the contour points starting from the first contour point to the bottom contour point, the contour point farthest from the first straight line is selected as the first groove inflection point; among all the contour points starting from the last contour point to the bottom contour point, the contour point farthest from the second straight line is selected as the second groove inflection point.

[0022] Optionally, acquiring groove edge information according to the groove inflection point information includes:

[0023] Obtaining an edge image corresponding to the grayscale groove image without laser by using an edge detection algorithm;

[0024] Detecting straight line information in the edge image by using the Hough straight line detection method;

[0025] Among all the straight line information, two straight line information closest to the first groove inflection point and the second groove inflection point are respectively selected as groove edge information.

[0026] Optionally, the grayscale groove image with laser includes two laser lines; and extracting the contour of the laser line in the laser line image to obtain the groove inflection point information of the laser line includes:

[0027] Dividing the laser line image into a first area and a second area, wherein the first area and the second area each contain a laser line;

[0028] The groove inflection point information of the laser line is obtained by respectively extracting the contours of the laser line in the first area and the second area.

[0029] Optionally, dividing the laser line image into a first area and a second area comprises:

[0030] Obtaining a pixel value curve according to the sum of the pixel values ​​of each column in the laser line image;

[0031] Determining segmentation line information according to the pixel value of the trough between the second peak and the third peak of the pixel value curve;

[0032] The laser line image is divided into a first area and a second area according to the segmentation line information.

[0033] Optionally, the step of acquiring a grayscale groove image with a laser comprises:

[0034] Acquire a first grayscale groove image with laser and a second grayscale groove image with laser respectively, wherein the first grayscale groove image and the second grayscale groove image each contain a laser line;

[0035] The method of using the frame difference method to perform a differential operation on the grayscale groove image without laser and the grayscale groove image with laser, retaining the laser line area in the grayscale groove image with laser, and obtaining the laser line image includes:

[0036] Using a frame difference method, the grayscale groove image without laser and the first grayscale groove image with laser are respectively subjected to differential operation, and the grayscale groove image without laser and the second grayscale groove image with laser are respectively subjected to differential operation, and the laser line areas in the first grayscale groove image with laser and the second grayscale groove image with laser are respectively retained to obtain a first laser line image and a second laser line image;

[0037] The step of extracting the contour of the laser line in the laser line image to obtain the groove inflection point information of the laser line includes:

[0038] The groove inflection point information of the laser line is obtained by respectively extracting the contours of the laser line in the first laser line image and the second laser line image.

[0039] Optionally, the obtaining of a laser-free grayscale groove image includes:

[0040] A laser-free grayscale groove image is acquired using a camera module, wherein the line of sight of the camera module is horizontally aligned with the weld corresponding to the groove.

[0041] In a second aspect, the present application discloses a groove edge detection device, the device comprising: an image acquisition module, a differential operation module, an inflection point acquisition module and an edge acquisition module;

[0042] The image acquisition module is used to acquire a grayscale groove image without laser and a grayscale groove image with laser;

[0043] The differential operation module is used to perform differential operation on the grayscale groove image without laser and the grayscale groove image with laser by using a frame difference method, and only retain the laser line area in the grayscale groove image with laser to obtain a laser line image;

[0044] The inflection point acquisition module is used to acquire the groove inflection point information of the laser line by extracting the contour of the laser line in the laser line image;

[0045] The edge acquisition module is used to acquire the groove edge information according to the groove inflection point information.

[0046] Compared with the prior art, this application has the following beneficial effects:

[0047] The present application discloses a groove edge detection method and device. First, based on the frame difference method, a differential operation is performed using the acquired grayscale groove image without laser and the grayscale groove image with laser, and only the laser line area in the grayscale groove image with laser is retained to obtain a laser line image. Subsequently, the groove inflection point information of the laser line is obtained by extracting the contour of the laser line in the laser line image, and the groove edge information is obtained based on the groove inflection point information. Thus, the background interference is effectively removed by the differential operation of the frame difference method, making the laser line area more prominent. In addition, by extracting the contour of the laser line in the laser line image, the inflection point of the laser line in the groove area can be accurately identified, so that the groove edge information can be more accurately obtained, which also provides strong support for subsequent welding and other processes. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0049] Figure 1 A flow chart of a first groove edge detection method provided in an embodiment of the present application;

[0050] Figure 2A schematic diagram of a camera module provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of an erroneous camera module provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of a groove edge detection method provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of a groove inflection point identification provided in an embodiment of the present application;

[0054] Figure 6 A schematic diagram of a second groove edge detection method provided in an embodiment of the present application;

[0055] Figure 7 A schematic diagram of determining whether two laser lines intersect vertically provided in an embodiment of the present application;

[0056] Figure 8 A schematic diagram of a laser dividing line calculation provided in an embodiment of the present application;

[0057] Fig. 9 A schematic diagram of groove line recognition provided in an embodiment of the present application;

[0058] Fig.10 A schematic diagram of a third groove edge detection method provided in an embodiment of the present application;

[0059] Fig.11 A schematic diagram of a fourth groove edge detection method provided in an embodiment of the present application;

[0060] Fig.12 A schematic diagram of a groove edge detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] As described above, at present, the edge of the groove is usually a straight line, so the straight line detection method such as the Hough straight line detection method and / or the straight line fitting method based on edge information is usually used to detect the edge of the groove. However, in actual welding scenarios, there are usually traces of grinding on the surface of the parent material, and the grinding traces are usually straight lines. In addition, the gap between the joints before welding and the edge of the weld after welding are usually straight lines. Therefore, if the straight line detection method is simply used to detect the edge of the groove, there is a great possibility that the edge of the groove will be misdetected or missed, resulting in a significant reduction in the accuracy of the groove edge detection.

[0062] After research, the inventor proposed a groove edge detection method and device. First, based on the frame difference method, the obtained grayscale groove image without laser and the grayscale groove image with laser are used to perform differential operation, and only the laser line area in the grayscale groove image with laser is retained to obtain the laser line image. Subsequently, the groove inflection point information of the laser line is obtained by extracting the contour of the laser line in the laser line image, and the groove edge information is obtained based on the groove inflection point information. Therefore, the background interference is effectively removed by the differential operation of the frame difference method, making the laser line area more prominent. In addition, by extracting the contour of the laser line in the laser line image, the inflection point of the laser line in the groove area can be accurately identified, so that the groove edge information can be more accurately obtained, which also provides strong support for subsequent welding and other processes.

[0063] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0064] Embodiment 1

[0065] See also Figure 1 , which is a flow chart of the first groove edge detection method provided in an embodiment of the present application.

[0066] See also Figure 2 , which is a schematic diagram of a camera module provided by an embodiment of the present application. Figure 3 , which is a schematic diagram of an incorrect camera module provided in an embodiment of the present application. The line of sight of the camera module needs to be aligned horizontally with the weld, and the camera module can be located above the side of the weld instead of directly above it, but during installation, it must be ensured that the camera module itself does not rotate or tilt, and the line of sight of the camera module is horizontal to the weld.

[0067] The groove edge detection method comprises:

[0068] S101: Capturing a grayscale groove image without laser using a camera module.

[0069] See also Figure 4, which is a schematic diagram of a groove edge detection method provided by an embodiment of the present application. After using a camera module to align the weld groove area to be detected, the camera module is used to capture a grayscale image (i.e., a grayscale groove image) of the weld groove area to be detected without laser irradiation. A grayscale image refers to an image that only contains brightness information and does not contain color information. Since the amount of data of a grayscale image is smaller than that of a color image, the use of a grayscale image helps to reduce the amount of calculation of a subsequent groove edge detection method.

[0070] S102: Obtain an edge image corresponding to the grayscale groove image through a Canny edge detection operator.

[0071] Canny edge detection technology is a technology that detects edges in grayscale groove images and generates edge images by calculating the gradient strength and direction of each pixel in the grayscale groove image, applying a double threshold method and a hysteresis threshold technology. It should be noted that the Canny edge detection technology is only an example of an edge detection technology, and this application does not limit the specific edge detection technology.

[0072] S103: Detect straight lines in the edge image using the Hough line detection method.

[0073] The Hough line detection method is a method for detecting lines in edge images. It finds lines in edge images by voting in parameter space (usually polar coordinate space).

[0074] S104: Turn on a laser line, use a camera module to capture a grayscale groove image with laser, and then turn off the laser line.

[0075] It should be noted that once a grayscale groove image with laser is captured, the laser line should be turned off immediately to avoid interference with subsequent operations on groove edge detection or damage to the parent material.

[0076] S105: Based on the grayscale groove image without laser and the grayscale groove image with laser, the frame difference method is used to remove background interference, and only the laser line area in the grayscale groove image with laser is retained to obtain a laser line image.

[0077] The frame difference method is an image processing technique for detecting the difference between consecutive frames or images. In the groove edge detection method provided in the present application, in order to more accurately identify and analyze the projection of the laser line on the groove area, a grayscale groove image without laser (background frame) and a grayscale groove image with laser (current frame) can be used for difference operation, thereby removing background interference and retaining only the laser line area in the grayscale groove image with laser to generate a laser line image.

[0078] Specifically, the laser line image can be obtained by subtracting the grayscale groove image without laser (background frame) and the grayscale groove image with laser (current frame) pixel by pixel. In the laser line image, the pixel value of the background area will be close to zero or small because the two frames are the same or similar; while the pixel value of the laser line area will be large because the brightness changes significantly.

[0079] S106: extracting the laser contour in the laser line image, and identifying two inflection points of the laser line in the groove area.

[0080] The first step is to perform Gaussian filtering on the laser line image to obtain a Gaussian image. It should be noted that the purpose of performing Gaussian filtering on the laser line image is to obtain a Gaussian image with less noise and details by smoothing the laser line image, so as to more easily identify the laser contour.

[0081] The second step is to perform threshold segmentation on the Gaussian image according to a preset threshold to obtain a ROI Gaussian image. For example, only the pixel values ​​of the pixels in the Gaussian image that are higher than the preset pixel threshold are retained, and the remaining pixel values ​​are set to 0 to obtain a ROI Gaussian image. In this ROI Gaussian image, the area with non-zero pixel values ​​represents our region of interest (ROI), that is, the area where the laser line is located.

[0082] In the third step, the contour of the laser line is extracted from the ROI Gaussian image using methods such as the extreme value method, grayscale centroid method or Steger algorithm.

[0083] Taking the extreme value method as an example, in the ROI Gaussian image, scan each row (Y1~Ym) of the image by column (X1~Xn), find the pixel with the largest pixel value in the ROI row area of ​​the column (X1), and its row (Yk, Yk∈[Y1,Ym]) together with the column coordinate X1 constitutes the coordinates (X1,Yk) of the contour point of the column. By analogy, the contour line of the laser can be obtained, which is an array or matrix of n rows and two columns, where n is the number of columns of the image, that is, the number of contour points, and 2 represents that a contour point consists of X and Y coordinates.

[0084] See also Figure 5, which is a schematic diagram of a groove inflection point identification provided by an embodiment of the present application. The fourth step, after obtaining the contour of the laser line, find the contour point with the largest Y-axis coordinate, that is, the bottom contour point, by traversing the contour points. Then, the bottom contour point and the first contour point and the last contour point of the laser line are connected by straight lines to obtain the first straight line and the second straight line. Next, from the first contour point to the bottom contour point, traverse the contour points in turn, and calculate the distance from each contour point to the first straight line. The point with the largest distance is the left inflection point of the groove. Similarly, from the last contour point to the bottom contour point, traverse the contour points in turn, and calculate the distance from each contour point to the second straight line. The point with the largest distance is the right inflection point of the groove.

[0085] S107: According to the two identified inflection points, two straight lines in the edge image that are closest to the two inflection points are selected as groove edge lines.

[0086] In step S103, for each straight line detected in the edge image, the distance from the straight line to the two inflection points is calculated. Exemplarily, this can be achieved by calculating the shortest distance from the straight line to the straight line where the inflection point is located, or by using the formula for the distance from a point to a straight line. For each inflection point, the straight line closest to it is selected as the groove edge line.

[0087] In summary, the present application provides a groove edge detection method, which effectively removes background interference through differential operation of the frame difference method, making the laser line area more prominent. In addition, by extracting the contour of the laser line in the laser line image, the turning point of the laser line in the groove area can be accurately identified, so that the groove edge information can be obtained more accurately, and it also provides strong support for subsequent welding and other processes.

[0088] Embodiment 2

[0089] See also Figure 6 , which is a schematic diagram of a second groove edge detection method provided in an embodiment of the present application. Figure 2 As shown, the camera module can be located on the side of the weld instead of directly above it, but it must be installed so that the camera module itself does not rotate or tilt. In addition, the positions of the two laser line emitters must be adjusted so that the two laser lines do not intersect each other vertically. Figure 7 , which is a schematic diagram provided in an embodiment of the present application for determining whether two laser lines intersect vertically. Figure 7 The left picture in the middle shows that the laser lines do not intersect, and the right picture shows that the laser lines intersect.

[0090] The groove edge detection method comprises:

[0091] S601: Capture a grayscale groove image without laser using a camera module.

[0092] It should be noted that steps S601-S603 are similar to steps S101, S104 and S105, and will not be described in detail here.

[0093] S602: Turn on two laser lines, use a camera module to capture a grayscale groove image with lasers, and then turn off the laser lines.

[0094] S603: Based on the grayscale groove image without laser and the grayscale groove image with laser, the frame difference method is used to remove background interference, and only the laser line area in the grayscale groove image with laser is retained to obtain a laser line image.

[0095] S604: In the laser line image, a dividing line between two lasers is calculated, and the laser line image is divided into two regions, each region containing one laser line.

[0096] See also Figure 8 , which is a schematic diagram of a laser segmentation line calculation provided by an embodiment of the present application. In the laser line image, the sum of the pixel values ​​of all columns is calculated row by row, and the following can be obtained: Figure 8 The curve (i.e., the pixel value curve) is shown. The curve has 4 peaks, which represent the top of the first laser, the bottom of the first laser, the top of the second laser, and the bottom of the second laser. Find the row where the valley between the second peak and the third peak is located, which is the dividing line between the two lasers. The dividing line divides the image into two upper and lower regions, each of which contains a laser line.

[0097] S605: extracting the laser contours in the upper and lower regions of the laser line image respectively, and identifying two inflection points of the laser line on the groove, a total of four inflection points.

[0098] It should be noted that steps S605-S606 are similar to steps S106-S107 and will not be described in detail here.

[0099] S606: Calculate the left and right groove lines according to the image coordinates of the four inflection points.

[0100] See also Fig. 9 , which is a schematic diagram of a groove line recognition provided by an embodiment of the present application. According to the image coordinates of the four inflection points and the two-point formula for calculating the linear equation, the left groove line can be calculated from the two inflection points on the left, and the right groove line can be calculated from the two inflection points on the right.

[0101] In summary, the present application provides a groove edge detection method, which effectively removes background interference through differential operation of the frame difference method, making the laser line area more prominent. In addition, by extracting the contour of the laser line in the laser line image, the turning point of the laser line in the groove area can be accurately identified, so that the groove edge information can be obtained more accurately, and it also provides strong support for subsequent welding and other processes.

[0102] Embodiment 3

[0103] See also Fig.10 , which is a schematic diagram of the third groove edge detection method provided in the embodiment of the present application. It should be noted that the camera module can be located above the side of the weld instead of directly above it, but it must be ensured that the camera module itself does not rotate or tilt during installation.

[0104] The groove edge detection method comprises:

[0105] S1001: Capture a grayscale groove image without laser using a camera module.

[0106] S1002: Turn on a laser line, use a camera module to capture a first grayscale groove image with laser, and then turn off the laser line.

[0107] S1003: Turn on another laser line, use the camera module to capture a second grayscale groove image with laser, and then turn off the laser line.

[0108] S1004: Based on the grayscale groove image without laser and the first grayscale groove image with laser, and the grayscale groove image without laser and the second grayscale groove image with laser, a frame difference method is used to remove background interference to obtain a first laser line image and a second laser line image.

[0109] In this embodiment, the laser is turned on and off twice, and the frame difference method is used twice to obtain two laser line images with only one laser line. Different from the second embodiment in which the laser is turned on and off only once and the frame difference method is used once, this embodiment mainly considers that in some cases, due to the limitation of the installation angle, the laser line images obtained after the two lasers are turned on at the same time are as follows: Figure 7 As shown in the right figure, the laser line image cannot find a dividing line to divide the image into two upper and lower laser line areas, which makes the method described in Example 2 ineffective. However, in this embodiment, by switching the lasers on and off separately, there is no situation where two laser lines appear in one image at the same time.

[0110] S1005: extracting laser contours in the first laser line image and the second laser line image respectively, and identifying two inflection points of the laser line on the groove, a total of four inflection points.

[0111] S1006: Calculate the left and right groove lines according to the image coordinates of the four inflection points.

[0112] In summary, the present application provides a groove edge detection method, which effectively removes background interference through differential operation of the frame difference method, making the laser line area more prominent. In addition, by extracting the contour of the laser line in the laser line image, the turning point of the laser line in the groove area can be accurately identified, so that the groove edge information can be obtained more accurately, and it also provides strong support for subsequent welding and other processes.

[0113] Embodiment 4

[0114] See also Fig.11 , which is a schematic diagram of the fourth groove edge detection method provided in the embodiment of the present application. It should be noted that the camera module can be located above the side of the weld instead of directly above it, but it must be ensured that the camera module itself does not rotate or tilt during installation. In addition, the positions of the two laser line emitters need to be adjusted so that the two laser lines do not intersect each other up and down.

[0115] The groove edge detection method comprises:

[0116] S1101: Install a filter on the camera module.

[0117] The function of the filter is to pass the laser of the corresponding band and filter the light of other bands.

[0118] S1102: Turn on two laser lines, use a camera module to capture a grayscale groove image with lasers, and then turn off the laser lines to obtain a laser line image.

[0119] S1103: In the laser line image, a dividing line between two lasers is calculated, and the laser line image is divided into two regions, each region containing one laser line.

[0120] like Figure 8 As shown, in the laser line image, the sum of the pixel values ​​of all columns is calculated row by row, and the following is obtained: Figure 8 The curve shown in Figure 1 has 4 peaks, which represent the top of the first laser, the bottom of the first laser, the top of the second laser, and the bottom of the second laser. Find the row where the valley between the second peak and the third peak is located, which is the dividing line between the two lasers. The dividing line divides the image into two areas, each containing a laser line.

[0121] S1104: extracting the laser contours in the upper and lower regions of the laser line image respectively, and identifying two inflection points of the laser line on the groove, for a total of four inflection points.

[0122] S1105: Calculate the left and right groove lines according to the image coordinates of the four inflection points.

[0123] In summary, the present application provides a groove edge detection method, which effectively removes background interference through differential operation of the frame difference method, making the laser line area more prominent. In addition, by extracting the contour of the laser line in the laser line image, the turning point of the laser line in the groove area can be accurately identified, so that the groove edge information can be obtained more accurately, and it also provides strong support for subsequent welding and other processes.

[0124] Embodiment 5

[0125] See also Fig.12 , which is a schematic diagram of a groove edge detection device provided in an embodiment of the present application. The groove edge detection device 1200 includes: an image acquisition module 1201, a differential operation module 1202, an inflection point acquisition module 1203 and an edge acquisition module 1204;

[0126] An image acquisition module 1201 is used to acquire a grayscale groove image without laser and a grayscale groove image with laser;

[0127] The differential operation module 1202 is used to perform differential operation on the grayscale groove image without laser and the grayscale groove image with laser by using the frame difference method, and only retain the laser line area in the grayscale groove image with laser to obtain the laser line image;

[0128] The inflection point acquisition module 1203 is used to obtain the groove inflection point information of the laser line by extracting the contour of the laser line in the laser line image;

[0129] The edge acquisition module 1204 is used to acquire the groove edge information according to the groove inflection point information.

[0130] In some specific implementations, the grayscale groove image with laser contains a laser line; the inflection point acquisition module 1203 specifically includes: a Gaussian module, a retention module and a traversal module;

[0131] Gaussian module, used to perform Gaussian filtering on the laser line image to obtain a Gaussian image;

[0132] A retaining module is used to obtain a Gaussian image of a region of interest (ROI) by retaining pixel points in the Gaussian image whose pixel values ​​are higher than a preset pixel threshold;

[0133] The traversal module is used to extract the contour of the laser line in the laser line image according to the ROI Gaussian image.

[0134] In some specific implementations, the traversal module is specifically used to traverse the pixel points in the ROI Gaussian image by column, and obtain the pixel point with the largest pixel value in each column of the pixel points in the ROI Gaussian image to obtain the contour of the laser line.

[0135] In some specific implementations, the inflection point acquisition module 1203 specifically includes: a point module, a connection module and a first selection module;

[0136] Point module, used to obtain the bottom contour point, the first contour point and the last contour point according to the contour of the laser line;

[0137] A connection module, used to connect the bottom contour point with the first contour point and the last contour point respectively, to obtain a first straight line and a second straight line respectively;

[0138] The first selection module is used to select the contour point farthest from the first straight line as the first groove turning point among all the contour points starting from the first contour point to the bottom contour point; and select the contour point farthest from the second straight line as the second groove turning point among all the contour points starting from the last contour point to the bottom contour point.

[0139] In some specific implementations, the edge acquisition module 1204 includes: an acquisition module, a detection module, and a second selection module;

[0140] An acquisition module is used to acquire an edge image corresponding to the grayscale groove image without laser by using an edge detection algorithm;

[0141] A detection module, used for detecting straight line information in an edge image by using a Hough straight line detection method;

[0142] The second selection module is used to select two straight line information closest to the first groove turning point and the second groove turning point from all the straight line information as the groove edge information.

[0143] In some specific implementations, the grayscale groove image with laser contains two laser lines; the inflection point acquisition module 1203 specifically includes a segmentation module and an extraction module;

[0144] A segmentation module, used for dividing the laser line image into a first area and a second area, wherein the first area and the second area each contain a laser line;

[0145] The extraction module is used to obtain the groove inflection point information of the laser line by respectively extracting the contours of the laser line in the first area and the second area.

[0146] In some specific implementations, the segmentation module specifically includes: a curve acquisition module, an information determination module and an image segmentation module;

[0147] A curve acquisition module, used for obtaining a pixel value curve according to the sum of the pixel values ​​of each column in the laser line image;

[0148] An information determination module, used to determine the segmentation line information according to the pixel value of the valley between the second peak and the third peak of the pixel value curve;

[0149] The image segmentation module is used to divide the laser line image into a first area and a second area according to the segmentation line information.

[0150] In some specific implementations, the image acquisition module 1201 is specifically used to respectively acquire a first grayscale groove image with laser and a second grayscale groove image with laser, wherein the first grayscale groove image and the second grayscale groove image each contain a laser line; the differential operation module 1202 is specifically used to respectively perform differential operations on the grayscale groove image without laser and the first grayscale groove image with laser using a frame difference method, and perform differential operations on the grayscale groove image without laser and the second grayscale groove image with laser, and respectively retain the laser line areas in the first grayscale groove image with laser and the second grayscale groove image with laser to obtain the first laser line image and the second laser line image; the inflection point acquisition module 1203 is specifically used to obtain the groove inflection point information of the laser line by respectively extracting the contours of the laser line in the first laser line image and the second laser line image.

[0151] In some specific implementations, the image acquisition module 1201 is specifically used to use a camera module to acquire a laser-free grayscale groove image, and the line of sight of the camera module is horizontally aligned with the weld corresponding to the groove.

[0152] In summary, the present application provides a groove edge detection device, which effectively removes background interference through differential operation of the frame difference method, making the laser line area more prominent. In addition, by extracting the contour of the laser line in the laser line image, the turning point of the laser line in the groove area can be accurately identified, so that the groove edge information can be obtained more accurately, and it also provides strong support for subsequent welding and other processes.

[0153] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0154] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A groove edge detection method, characterized in that: The method comprises: Obtaining a grayscale groove image without laser and a grayscale groove image with laser; Performing a differential operation on the grayscale groove image without laser and the grayscale groove image with laser by using a frame difference method, retaining the laser line area in the grayscale groove image with laser, and obtaining a laser line image; By extracting the contour of the laser line in the laser line image, the groove inflection point information of the laser line is obtained; The groove edge information is obtained according to the groove inflection point information.

2. The method according to claim 1, characterized in that The grayscale groove image with laser includes a laser line; and extracting the contour of the laser line in the laser line image includes: Performing Gaussian filtering on the laser line image to obtain a Gaussian image; Obtaining a region of interest (ROI) Gaussian image by retaining pixel points in the Gaussian image whose pixel values ​​are higher than a preset pixel threshold; The contour of the laser line in the laser line image is extracted according to the ROI Gaussian image.

3. The method according to claim 2, characterized in that The extracting the contour of the laser line in the laser line image according to the ROI Gaussian image comprises: By traversing the pixel points in the ROI Gaussian image by column, the pixel point with the maximum pixel value in each column of the pixel points in the ROI Gaussian image is obtained to obtain the contour of the laser line.

4. The method according to claim 2, characterized in that: The step of obtaining the groove inflection point information of the laser line includes: According to the contour of the laser line, a bottom contour point, a first contour point and a last contour point are obtained; Connecting the bottom contour point with the first contour point and the last contour point to obtain a first straight line and a second straight line respectively; Among all the contour points starting from the first contour point to the bottom contour point, the contour point farthest from the first straight line is selected as the first groove inflection point; among all the contour points starting from the last contour point to the bottom contour point, the contour point farthest from the second straight line is selected as the second groove inflection point.

5. The method according to claim 4, characterized in that The step of obtaining groove edge information according to the groove inflection point information includes: Obtaining an edge image corresponding to the grayscale groove image without laser by using an edge detection algorithm; Detecting straight line information in the edge image by using the Hough straight line detection method; Among all the straight line information, two straight line information closest to the first groove inflection point and the second groove inflection point are respectively selected as groove edge information.

6. The method according to claim 1, characterized in that The grayscale groove image with laser includes two laser lines; and extracting the contour of the laser line in the laser line image to obtain the groove inflection point information of the laser line includes: Dividing the laser line image into a first area and a second area, wherein the first area and the second area each contain a laser line; The groove inflection point information of the laser line is obtained by respectively extracting the contours of the laser line in the first area and the second area.

7. The method according to claim 6, characterized in that The step of dividing the laser line image into a first area and a second area comprises: Obtaining a pixel value curve according to the sum of the pixel values ​​of each column in the laser line image; Determining segmentation line information according to the pixel value of the trough between the second peak and the third peak of the pixel value curve; The laser line image is divided into a first area and a second area according to the segmentation line information.

8. The method according to claim 1, characterized in that: The step of obtaining a grayscale groove image with laser comprises: Acquire a first grayscale groove image with laser and a second grayscale groove image with laser respectively, wherein the first grayscale groove image and the second grayscale groove image each contain a laser line; The method of using the frame difference method to perform a differential operation on the grayscale groove image without laser and the grayscale groove image with laser, retaining the laser line area in the grayscale groove image with laser, and obtaining the laser line image includes: Using a frame difference method, the grayscale groove image without laser and the first grayscale groove image with laser are respectively subjected to differential operation, and the grayscale groove image without laser and the second grayscale groove image with laser are respectively subjected to differential operation, and the laser line areas in the first grayscale groove image with laser and the second grayscale groove image with laser are respectively retained to obtain a first laser line image and a second laser line image; The step of extracting the contour of the laser line in the laser line image to obtain the groove inflection point information of the laser line includes: The groove inflection point information of the laser line is obtained by respectively extracting the contours of the laser line in the first laser line image and the second laser line image.

9. The method according to claim 1, characterized in that: The step of obtaining a laser-free grayscale groove image comprises: A laser-free grayscale groove image is acquired using a camera module, wherein the line of sight of the camera module is horizontally aligned with the weld corresponding to the groove.

10. A groove edge detection device, characterized in that: The device comprises: an image acquisition module, a differential operation module, an inflection point acquisition module and an edge acquisition module; The image acquisition module is used to acquire a grayscale groove image without laser and a grayscale groove image with laser; The differential operation module is used to perform differential operation on the grayscale groove image without laser and the grayscale groove image with laser by using a frame difference method, and only retain the laser line area in the grayscale groove image with laser to obtain a laser line image; The inflection point acquisition module is used to acquire the groove inflection point information of the laser line by extracting the contour of the laser line in the laser line image; The edge acquisition module is used to acquire the groove edge information according to the groove inflection point information.