Weld surface detection method, equipment and medium based on reference three-dimensional data

Through the weld surface detection method based on benchmark three-dimensional data, the bounding box algorithm and Gaussian filtering technology are used to rasterize and preprocess the weld, and regional segmentation is performed based on the connectivity of the four fields, which solves the problem of slow detection of existing welding defects. , the problem of low accuracy is achieved, and rapid and accurate detection of complex weld paths is achieved.

CN118587224BActive Publication Date: 2024-10-08SILICON TECH (CHENGDU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411074432.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-10-08
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

Existing welding defect detection methods are limited by model registration errors and large calculations, resulting in slow welding defect detection speed and low accuracy, especially in the case of complex weld paths, which is difficult to achieve effective detection.

Method used

A weld surface detection method based on benchmark three-dimensional data is adopted. The point cloud data is rasterized through the bounding box algorithm to generate a depth information image. Gaussian filtering and convolution technology are used for preprocessing, and the four-domain connectivity is combined to detect the concavity and convexity. Regions are segmented to achieve fast and accurate defect detection.

Benefits of technology

There is no need to consider the consistency between the moving device path and the weld path and the model registration. It can quickly and accurately detect the defective area of ​​the weld, improving the detection speed and accuracy, and is suitable for complex weld paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587224B_ABST
    Figure CN118587224B_ABST
Patent Text Reader

Abstract

The present invention discloses a weld surface detection method, device and medium based on reference three-dimensional data, which relates to the field of defect detection technology in the field of 3D detection. Whether the characteristic parameters calculated from the local area exceed the set threshold area is used to judge whether there is a defect. When only caring about whether there is a defect and not considering the width and height of the weld, accurate results can be obtained quickly. With this method, there is no need to make the path of the motion device consistent with the path of the weld, and there is no need to perform model alignment. The concave and convex areas can be found by the difference between the processed image and the original image, and the concave and convex areas can be segmented using the four-neighborhood connectivity to obtain the weld defect results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of defect detection technology in the field of 3D detection, and in particular to a weld surface detection method, equipment and medium based on reference three-dimensional data. Background Art

[0002] In the field of new energy, lithium battery shells require welding technology. If the welding does not meet the standards, the sealing of the lithium battery shell will be poor, which poses a great safety hazard. In response to this need, there is a need to detect whether the welds meet the standards. At present, the main weld defects are leaking and cold welding, which have a great impact on the sealing of the lithium battery shell and pose quality problems.

[0003] Nowadays, there are two main directions for the above welding defect detection:

[0004] The first direction is to use recognition technology to detect defects in the entire weld as a whole, for example, using deep learning and model registration technology to detect defects in the entire weld as a whole. Among them, the ICP algorithm is mainly used for registration, and the sum of the distances between corresponding points is compared after registration. However, for this method, the main problem of model registration is that the amount of calculation is large, the speed is very slow, and there are many uncontrolled factors. For example, there are errors in the registration itself. If the defect detected is very small, the detection result will not meet the requirements; and deep learning requires a large number of samples and cannot be deployed quickly.

[0005] The second direction is to slice the weld and compare each slice. This method mainly divides the weld into many segments and detects whether each segment meets the set requirements in turn. However, for this method, most of the current methods place the acquisition equipment on a uniform motion device, take out a part every certain period of time or every certain displacement, and directly use it as a slice point cloud. However, there is a big limitation in this part, that is, the path of the motion device needs to be consistent with the path of the weld. If the path of the weld is a straight line or a circular ring, theoretically, the path of the motion device can be controlled, but if the path of the weld is a complex path, this method cannot be implemented. Summary of the invention

[0006] Based on the problems raised by the above background technology, the purpose of the present invention is to provide a weld surface detection method, equipment and medium based on reference three-dimensional data, which solves the problem that the current welding defect detection method is limited by the error of model alignment and a large amount of calculation, resulting in slow speed and low accuracy in welding defect detection for defects such as weld undercut, leaky welds and weld holes.

[0007] The present invention is achieved through the following technical solutions:

[0008] A first aspect of the present invention provides a weld surface detection method based on reference three-dimensional data, comprising the following steps:

[0009] Step S1, obtaining point cloud data, and performing rasterization processing on the point cloud data based on a bounding box algorithm to obtain a depth information image;

[0010] Step S2, extracting a region of interest of the depth information image, taking the region of interest as a region to be detected, performing Gaussian filtering on the region to be detected, and generating an image to be detected;

[0011] Step S3, performing local concave-convex detection on the image to be detected to obtain a concave-convex area;

[0012] Step S4, using four-domain connectivity to segment the concave-convex area to obtain segmented areas, and performing defect area determination on the segmented areas to obtain defect detection results.

[0013] In the above technical solution, the point cloud data is rasterized by the bounding box algorithm, and a depth information map is regenerated in a rasterized manner. It does not need to consider the cumbersome parameters such as camera external parameters and internal parameters. It only needs point cloud data and the size of each grid to generate a new depth information map. In the depth information map, the adjacent points of each point can be quickly obtained, which is conducive to the subsequent concave-convex detection and concave-convex judgment. At the same time, fast convolution operations can also be performed in the depth information map, and Gaussian filtering and mean filtering are performed on the picture with depth information. Since the use of convolution technology on images is very mature, it can realize the rapid processing of image data. It is separated from judging whether there is an error from conventional three-dimensional data, and the three-dimensional data is reduced to an ordered picture format by projection and rasterization for processing. The picture is pre-processed by Gaussian filtering, and the difference between the image after mean filtering and the original image is used to set a suitable threshold to screen the concave-convex area, and some inconspicuous concave-convex areas are filtered according to the size of the area, thereby screening out the weld defect area. It is necessary to care about whether the entire weld area is at the same height, because the defect detection this time uses the characteristic parameters calculated from the local area to determine whether it exceeds the set threshold area to determine whether there is a defect. When only caring about whether there is a defect and not considering the width and height of the weld, accurate results can be obtained quickly. This method does not require the path of the motion device to be consistent with the path of the weld, nor does it require model alignment. The concave and convex areas can be found by the difference between the processed image and the original image, and the concave and convex areas can be segmented using the four-neighborhood connectivity to obtain the weld defect results.

[0014] In an optional embodiment, rasterizing the point cloud data based on a bounding box algorithm comprises the following steps:

[0015] Step S11, traversing the point cloud data, finding the minimum coordinate value and the maximum coordinate value of all points in the point cloud data to generate a minimum bounding box AABB;

[0016] Step S12, extracting the upper right vertex and the lower left vertex of the minimum bounding box AABB, determining the grid side length, calculating the upper right vertex, the lower left vertex and the grid side length, and obtaining the image size;

[0017] Step S13: Create a depth map according to the image size, project the point cloud data into grid cells corresponding to the depth map, and generate a depth information map.

[0018] In an optional embodiment, the calculation formula for calculating the upper right vertex, the lower left vertex and the grid side length is expressed as follows:

[0019] row = (max_point.y - min_point.y) / step;

[0020] col = (max_point.x - min_point.x) / step;

[0021] In the above formula, row is the number of rows, col is the number of columns, max_point.y is the ordinate of the upper right vertex, min_point.y is the ordinate of the lower left vertex, max_point.x is the abscissa of the upper right vertex, min_point.x is the abscissa of the lower left vertex, and step is the length of the grid side.

[0022] In an optional embodiment, performing Gaussian filtering on the area to be detected includes the following steps:

[0023] Create a Gaussian filter with a convolution kernel of 3*3 and a sigma of 1;

[0024] The Gaussian filter is used to perform a convolution operation on the area to be detected to obtain an image to be detected.

[0025] In an optional embodiment, performing local concave-convex detection on the image to be detected includes the following steps:

[0026] Create a convolution kernel with a side length of 2*N+1, and use the convolution kernel to perform mean filtering on the image to be detected to obtain a matrix Mat_M;

[0027] Calculate the difference between the depth information image and the matrix Mat_M to obtain a difference matrix Mat_S; the difference matrix Mat_S is used to represent the concave-convex change;

[0028] Normalizing the difference matrix Mat_S to obtain a matrix Mat_D;

[0029] A threshold threshold is set, the matrix Mat_D is traversed, each element in the matrix Mat_D is compared with the threshold threshold, and the concave-convex area is determined according to the comparison result.

[0030] In an optional embodiment, the expression for normalizing the difference matrix Mat_S is as follows:

[0031] Mat_S = Mat_M - Mat_o;

[0032] Mat_D = Mat_S / Mat_o;

[0033] In the above formula, Mat_S is a difference matrix; Mat_M is a W*H matrix of the detected image; Mat_o is a calculated difference matrix; Mat_D is a calculated ratio matrix. In an optional embodiment, comparing each element in the matrix Mat_D with the threshold threshold includes:

[0034] If the element in Mat_D is less than -threshold, the region is considered to be a concave region and the concave region is marked in red;

[0035] If the element in Mat_D is greater than the threshold, the region is considered to be a convex region and the convex region is marked in red.

[0036] In an optional embodiment, segmenting the concave-convex region by using four-domain connectivity includes the following steps:

[0037] Traversing the concave-convex area pixel by pixel starting from the boundary of the concave-convex area, and if the traversed pixel point is a red pixel point, marking the traversed pixel point as a pixel point to be detected;

[0038] Detect the pixels within the four areas of the pixel to be detected:

[0039] If there are red pixels among the pixels in the four regions, it is determined that the pixel to be detected and the red pixels in the four regions are in the same connected region;

[0040] If there is no red pixel in the four regions, the pixel to be detected is determined to be an isolated region, and the isolated region is segmented from the concave-convex region.

[0041] A second aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a weld surface detection method based on reference three-dimensional data when executing the program.

[0042] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a weld surface detection method based on reference three-dimensional data.

[0043] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0044] 1. There is no need to make the path of the motion device consistent with the path of the weld, nor is there any need to perform model registration. The concave and convex areas can be found by the difference between the processed image and the original image, and the concave and convex areas can be segmented using the four-neighborhood connectivity to obtain the weld defect results.

[0045] 2. There is no need to worry about whether the entire weld area is at the same height. When you only care about whether there are defects and ignore the width and height of the weld, you can quickly get accurate results. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:

[0047] Figure 1 A schematic flow chart of a weld surface detection method based on reference three-dimensional data provided in Example 1 of the present invention;

[0048] Figure 2 A schematic diagram of the structure of an electronic device provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0049] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0050] Embodiment 1 of the present invention provides a weld surface detection method based on reference three-dimensional data, the process of which is as follows: Figure 1 As shown, the weld surface detection method based on the reference three-dimensional data includes the following steps:

[0051] Step S1, obtaining point cloud data, and performing rasterization processing on the point cloud data based on a bounding box algorithm to obtain a depth information image;

[0052] Step S2, extracting a region of interest of the depth information image, taking the region of interest as a region to be detected, performing Gaussian filtering on the region to be detected, and generating an image to be detected;

[0053] Step S3, performing local concave-convex detection on the image to be detected to obtain a concave-convex area;

[0054] Step S4, using four-domain connectivity to segment the concave-convex area to obtain segmented areas, and performing defect area determination on the segmented areas to obtain defect detection results.

[0055] It should be noted that the bounding box algorithm is used to rasterize the point cloud data. A depth information map is regenerated in a rasterized manner. It does not need to consider the cumbersome parameters such as camera external parameters and internal parameters. It only needs point cloud data and the size of each grid to generate a new depth information map. In the depth information map, the adjacent points of each point can be quickly obtained, which is conducive to the subsequent concave-convex detection and concave-convex judgment. At the same time, fast convolution operations can also be performed in the depth information map, and Gaussian filtering and mean filtering are performed on the picture with depth information. Since the use of convolution technology on images is very mature, it can realize the rapid processing of image data. It is separated from judging whether there is an error from conventional three-dimensional data. The three-dimensional data is reduced to an ordered picture format through projection and rasterization for processing. The picture is preprocessed by Gaussian filtering. The difference between the image after mean filtering and the original image is used to set a suitable threshold to screen the concave-convex area. According to the size of the area, some inconspicuous concave-convex areas are filtered, thereby screening out the weld defect area. It is necessary to care about whether the entire weld area is at the same height, because the defect detection this time uses the characteristic parameters calculated from the local area to determine whether it exceeds the set threshold area to determine whether there is a defect. When only caring about whether there is a defect and not considering the width and height of the weld, accurate results can be obtained quickly. This method does not require the path of the motion device to be consistent with the path of the weld, nor does it require model alignment. The concave and convex areas can be found by the difference between the processed image and the original image, and the concave and convex areas can be segmented using the four-neighborhood connectivity to obtain the weld defect results.

[0056] In an optional embodiment, rasterizing the point cloud data based on a bounding box algorithm comprises the following steps:

[0057] Step S11, traversing the point cloud data, finding the minimum coordinate value and the maximum coordinate value of all points in the point cloud data to generate a minimum bounding box AABB;

[0058] Step S12, extracting the upper right vertex and the lower left vertex of the minimum bounding box AABB, determining the grid side length, calculating the upper right vertex, the lower left vertex and the grid side length, and obtaining the image size;

[0059] Step S13: Create a depth map according to the image size, project the point cloud data into grid cells corresponding to the depth map, and generate a depth information map.

[0060] It should be noted that by rasterizing the point cloud data based on the bounding box algorithm, the disordered point cloud data can be converted into an ordered two-dimensional image format, wherein the value of each pixel in the generated depth information map represents the average depth value of the point cloud data in the Z-axis direction in the corresponding grid unit. This conversion is conducive to the visualization of point cloud data and the subsequent judgment and division of concave and convex areas.

[0061] Specifically, in this embodiment, the purpose of step S1 is to convert the disordered point cloud into an ordered point cloud image. First, the minimum bounding box AABB of the point cloud cloud is calculated, and the vertex p_max at the upper right corner and the vertex p_min at the lower left corner of the minimum bounding box AABB are obtained. The grid side length step is set externally, where the side length of step> the average distance between adjacent points of the point cloud of cloud_p, where cloud_p is the original point cloud. The number of rows and columns required for the depth map is calculated through the above settings and data, and a depth map IMG is initialized, whose size is the number of rows and columns calculated above, and the initial value of each element is 0 or a specific value. Then, each point in the point cloud data is projected onto a plane with nx = 0, ny = 0, nz = 1 as the normal vector. This means that each point will be projected into the corresponding grid cell according to its position in the Z-axis direction. For each grid cell, the Z coordinate values ​​of all points in the cell are accumulated, and the average value is calculated, that is, the value of each grid is equal to the average value of all points contained in the grid in the Z direction, and the depth information map is obtained.

[0062] In an optional embodiment, the calculation formula for calculating the upper right vertex, the lower left vertex and the grid side length is expressed as follows:

[0063] row = (max_point.y - min_point.y) / step;

[0064] col = (max_point.x - min_point.x) / step;

[0065] In the above formula, row is the number of rows, col is the number of columns, max_point.y is the ordinate of the upper right vertex, min_point.y is the ordinate of the lower left vertex, max_point.x is the abscissa of the upper right vertex, min_point.x is the abscissa of the lower left vertex, and step is the length of the grid side.

[0066] In an optional embodiment, performing Gaussian filtering on the area to be detected includes the following steps:

[0067] Create a Gaussian filter with a convolution kernel of 3*3 and a sigma of 1;

[0068] The Gaussian filter is used to perform a convolution operation on the area to be detected to obtain an image to be detected.

[0069] Specifically, in this embodiment, a convolution operation is performed on the image with a convolution kernel size of 3 and sigma = 1 to obtain the image to be detected. Since a mean filter is used in rasterization, there is no need to over-blur the image, so a smaller sigma value and a 3*3 convolution kernel are selected to avoid over-blurring the image. Gaussian denoising is a linear filtering technique that has the characteristics of a low-pass filter in the frequency domain and can effectively remove high-frequency noise while retaining the low-frequency components of the image, that is, most of the visual information, and is used to reduce random noise in the image while retaining the edges and details of the image.

[0070] In an optional embodiment, performing local concave-convex detection on the image to be detected includes the following steps:

[0071] Create a convolution kernel with a side length of 2*N+1, and use the convolution kernel to perform mean filtering on the image to be detected to obtain a matrix Mat_M;

[0072] Calculate the difference between the depth information image and the matrix Mat_M to obtain a difference matrix Mat_S; the difference matrix Mat_S is used to represent the concave-convex change;

[0073] Normalizing the difference matrix Mat_S to obtain a matrix Mat_D;

[0074] A threshold threshold is set, the matrix Mat_D is traversed, each element in the matrix Mat_D is compared with the threshold threshold, and the concave-convex area is determined according to the comparison result.

[0075] It should be noted that the purpose of this step is to perform local concave-convex detection to obtain concave-convex areas. Specifically, first, according to the given radius N, create a convolution kernel with a side length of 2*N + 1; use the created convolution kernel to perform mean filtering on the image to be detected to obtain the filtered matrix Mat_M. Mean filtering helps smooth the image and reduce noise. Then, the local concave-convexity in the image is displayed by calculating the difference matrix. Normalizing the difference matrix helps to express the concave-convexity as a relative change rather than an absolute difference. Set a threshold threshold to distinguish concave-convex areas. The choice of threshold depends on the specific application scenario and data characteristics.

[0076] In an optional embodiment, the expression for normalizing the difference matrix Mat_S is as follows:

[0077] Mat_S = Mat_M - Mat_o;

[0078] Mat_D = Mat_S / Mat_o;

[0079] In the above formula, Mat_S is the difference matrix; Mat_M is the W*H matrix of the detected image; Mat_o is the calculated difference matrix; Mat_D is the calculated ratio matrix. It should be noted that in this embodiment, the normalization of the difference matrix is ​​to divide each element in the difference matrix by the corresponding element in the original image, that is, the depth information image, so as to realize the normalization of the difference matrix.

[0080] In an optional embodiment, comparing each element in the matrix Mat_D with the threshold threshold comprises:

[0081] If the element in Mat_D is less than -threshold, the region is considered to be a concave region and the concave region is marked in red;

[0082] If the element in Mat_D is greater than the threshold, the region is considered to be a convex region and the convex region is marked in red.

[0083] In this embodiment, a threshold threshold is set, Mat_D is traversed, all concave areas less than -threshold in Mat_D are extracted and marked in red. All convex areas greater than threshold in Mat_D are extracted and marked in red. In this embodiment, concave and convex areas are visualized as the same color.

[0084] In an optional embodiment, segmenting the concave-convex region by using four-domain connectivity includes the following steps:

[0085] Traversing the concave-convex area pixel by pixel starting from the boundary of the concave-convex area, and if the traversed pixel point is a red pixel point, marking the traversed pixel point as a pixel point to be detected;

[0086] Detect the pixels within the four areas of the pixel to be detected:

[0087] If there are red pixels among the pixels in the four regions, it is determined that the pixel to be detected and the red pixels in the four regions are in the same connected region;

[0088] If there is no red pixel in the four regions, the pixel to be detected is determined to be an isolated region, and the isolated region is segmented from the concave-convex region.

[0089] It should be noted that the purpose of this step is to determine the connectivity of the concave and convex areas, and to segment the unconnected areas using the four-neighborhood connectivity. After the connection and segmentation, different areas are represented by different colors.

[0090] In this embodiment, segmenting the area to determine the defective area includes the following steps:

[0091] Set the threshold threshold_min and threshold threshold_max, which represent the minimum and maximum number of grids occupied by the defect area. Traverse each connected area in the segmented area and calculate the number of grids in each area. For each connected area, determine whether its number of grids is within the set threshold range:

[0092] If the number of grid cells is less than threshold_min, the area is considered too small to constitute a defect.

[0093] If the number of grid cells is greater than threshold_max, the region is considered too large and may be background or other non-defect features.

[0094] The connected areas with grid numbers between threshold_min and threshold_max are marked as potential defect areas.

[0095] Create a new image IMG_S to display the defective area after screening. Initially, IMG_S can be a completely black image, indicating that there are no defects. The screened defective area is marked or filled with a specific color on IMG_S to generate the defect detection result.

[0096] Embodiment 2 of the present invention further provides an electronic device, such as Figure 2As shown, the electronic device includes a processor 21, a memory 22, an input device 23 and an output device 24; the number of processors 21 in the computer device can be one or more. Figure 2 A processor 21 is taken as an example; the processor 21, the memory 22, the input device 23 and the output device 24 in the electronic device can be connected by a bus or other means. Figure 2 The example of connecting through bus is taken in the following.

[0097] The memory 22 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and modules. The processor 21 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 22, that is, the weld surface detection method based on the reference three-dimensional data of Example 1 is implemented.

[0098] The memory 22 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 22 may further include a memory remotely arranged relative to the processor 21, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0099] The input device 23 can be used to receive the ID and password input by the user, etc. The output device 24 is used to output the network configuration page.

[0100] Embodiment 3 of the present invention further provides a computer-readable storage medium, wherein the computer-executable instructions, when executed by a computer processor, are used to implement the weld surface detection method based on reference three-dimensional data as provided in Embodiment 1.

[0101] An embodiment of the present invention provides a storage medium containing computer executable instructions, and its computer executable instructions are not limited to the method operations provided in Example 1, and can also execute related operations in the weld surface detection method based on reference three-dimensional data provided in any embodiment of the present invention.

[0102] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A weld surface detection method based on reference three-dimensional data, characterized in that: The steps include: Step S1, obtaining point cloud data, and performing rasterization processing on the point cloud data based on a bounding box algorithm to obtain a depth information image; Step S2, extracting a region of interest of the depth information image, taking the region of interest as a region to be detected, performing Gaussian filtering on the region to be detected, and generating an image to be detected; Step S3, performing local concave-convex detection on the image to be detected to obtain a concave-convex area; Step S4, using four-neighborhood connectivity to segment the concave-convex area to obtain segmented areas, and performing defect area determination on the segmented areas to obtain defect detection results; Using four-neighborhood connectivity to segment the concave-convex region includes the following steps: Starting from the boundary of the concave-convex area, the concave-convex area is traversed pixel by pixel, and if the traversed pixel point is a red pixel point, the traversed pixel point is marked as a pixel point to be detected; wherein the red pixel point represents the concave area and the convex area in the concave-convex area; Detect the pixels in the four neighborhoods of the pixel to be detected: If there is a red pixel in the four neighborhoods, it is determined that the pixel to be detected and the red pixel in the four neighborhoods are the same connected area; If there is no red pixel in the four neighborhoods, the pixel to be detected is determined to be an isolated area, and the isolated area is segmented from the concave-convex area.

2. The weld surface detection method based on reference three-dimensional data according to claim 1, characterized in that: The rasterization processing of the point cloud data based on the bounding box algorithm includes the following steps: Step S11, traversing the point cloud data, finding the minimum coordinate value and the maximum coordinate value of all points in the point cloud data to generate a minimum bounding box AABB; Step S12, extracting the upper right vertex and the lower left vertex of the minimum bounding box AABB, determining the grid side length, calculating the upper right vertex, the lower left vertex and the grid side length, and obtaining the image size; Step S13: Create a depth map according to the image size, project the point cloud data into grid cells corresponding to the depth map, and generate a depth information map.

3. The weld surface detection method based on reference three-dimensional data according to claim 2, characterized in that: The calculation formula for calculating the upper right vertex, lower left vertex and grid edge length is as follows: row = (max_point.y - min_point.y) / step; col = (max_point.x - min_point.x) / step; In the above formula, row is the number of rows, col is the number of columns, max_point.y is the ordinate of the upper right vertex, min_point.y is the ordinate of the lower left vertex, max_point.x is the abscissa of the upper right vertex, min_point.x is the abscissa of the lower left vertex, and step is the length of the grid side.

4. The weld surface detection method based on reference three-dimensional data according to claim 1, characterized in that: Performing Gaussian filtering on the area to be detected includes the following steps: Create a Gaussian filter with a convolution kernel of 3*3 and a sigma of 1; The Gaussian filter is used to perform a convolution operation on the area to be detected to obtain an image to be detected.

5. The weld surface detection method based on reference three-dimensional data according to claim 1, characterized in that: Performing local concave-convex detection on the image to be detected includes the following steps: Create a convolution kernel with a side length of 2*N+1, and use the convolution kernel to perform mean filtering on the image to be detected to obtain a matrix Mat_M; Calculate the difference between the depth information image and the matrix Mat_M to obtain a difference matrix Mat_S; the difference matrix Mat_S is used to represent the concave-convex change; Normalizing the difference matrix Mat_S to obtain a matrix Mat_D; A threshold threshold is set, the matrix Mat_D is traversed, each element in the matrix Mat_D is compared with the threshold threshold, and the concave-convex area is determined according to the comparison result.

6. The weld surface detection method based on reference three-dimensional data according to claim 5, characterized in that: The expression for normalizing the difference matrix Mat_S is as follows: Mat_S = Mat_M - Mat_o; Mat_D = Mat_S / Mat_o; In the above formula, Mat_S is the difference matrix; Mat_M is the W*H matrix of the detection image; Mat_o is the depth information image; Mat_D is the calculated ratio matrix.

7. The weld surface detection method based on reference three-dimensional data according to claim 6, characterized in that: Comparing each element in the matrix Mat_D with the threshold threshold comprises: If the element in Mat_D is less than -threshold, the region is considered to be a concave region and the concave region is marked in red; If the element in Mat_D is greater than the threshold, the region is considered to be a convex region and the convex region is marked in red.

8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for detecting a weld surface based on reference three-dimensional data as claimed in any one of claims 1 to 7 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a weld surface detection method based on reference three-dimensional data as described in any one of claims 1 to 7 is implemented.