Workpiece surface defect detection and laser repair path planning method and system based on surface structured light

The three-dimensional point cloud data of the workpiece is obtained through surface structure light, combined with color mapping model and grid algorithm, high-precision identification of workpiece surface defects and rapid planning of repair paths is realized, solving the problem of insufficient defect detection accuracy and efficiency in the existing technology, and improving the efficiency of production detection.

CN119936057BActive Publication Date: 2025-08-19ZHEJIANG UNIV OF TECH +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510402191.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-08-19
Estimated Expiration
2045-04-01

AI Technical Summary

Technical Problem

In the defect detection based on surface structured light, it is difficult to effectively obtain defect information on the surface of the workpiece, resulting in insufficient recognition accuracy and efficiency, and cannot meet production detection requirements.

Method used

By obtaining three-dimensional point cloud data of the workpiece based on surface structure light, defect detection is performed, defect identification is identified using color mapping models and feature matching, and repair path planning is carried out in combination with grid algorithms, including defect detection modules, repair path design modules and repair route execution modules, to realize high-precision identification of workpiece surface defects and rapid planning of repair paths.

Benefits of technology

It improves the accuracy and efficiency of defect detection, shortens the planning and execution time of repair paths, and realizes efficient identification and repair of workpiece surface defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119936057B_ABST
    Figure CN119936057B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for workpiece surface defect detection and laser repair path planning based on surface structured light. The method uses surface structured light to acquire three-dimensional point cloud data of a workpiece to complete defect detection. Based on the defect detection results, the coordinate points of the workpiece in the camera coordinate system of a robotic arm are determined, the point cloud data is updated, and the horizontal and vertical curves of the repair path are reconstructed. Based on the reconstructed curves, the inner discrete points located on the same stripe are preprocessed using a gridding algorithm, and an execution grid is constructed to complete repair path planning. The system includes a defect detection module, a repair path design module, and a repair route execution module, and a controller executes the method to complete workpiece surface defect detection and laser repair path planning. The present invention uses data alignment to identify defects, significantly improving detection efficiency. The method quickly forms a reshaped execution grid, shortens the planning and execution time of the repair path, and integrates defect detection results with path planning for easy verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of using optical means, namely using submillimeter waves, infrared light, visible light or ultraviolet light to test or analyze materials, and in particular to a method and system for workpiece surface defect detection and laser repair path planning based on surface structured light. Background Art

[0002] Surface structured light is a 3D reconstruction technology primarily composed of a projector and a camera. The projector projects a specific coded pattern onto the surface of an object, while the camera captures the deformation of this pattern to reconstruct the object's 3D shape. By analyzing these deformations, the 3D coordinates of the object's surface can be calculated. Surface structured light has applications in various fields, including industry, medicine, and cultural heritage. For example, in industry, it can be used for part dimensional measurement and surface defect detection. In medicine, it can be used for research on tooth and bone shape analysis and reconstruction. In cultural heritage, it can also be used for research on the preservation and restoration of ancient buildings and cultural relics.

[0003] However, after the three-dimensional reconstruction is completed, although there are defects and differences between the reconstructed object to be repaired and the standard object, the depth information of the defects cannot be detected and observed by naked eye comparison alone. In many cases, when special light sources cannot be used to make the defect features obvious, defect identification becomes more difficult. When directly processing low-information defect images with unclear features, due to the large gap between the processing method and the human eye recognition effect, long-term scientific research is still needed to meet the requirements of production inspection.

[0004] Chinese patent publication number CN109967292A discloses an automatic spraying system and method based on three-dimensional reconstruction of workpiece contour information, including a control system, a three-dimensional reconstruction module, a conveying system and an automatic spraying device. The conveying system is connected to the control system and the automatic spraying device respectively. The three-dimensional reconstruction module can model the contour of the workpiece to be sprayed and send it to the control system for spraying path planning. The spraying equipment includes a spray booth, which is connected to the control system and can automatically spray the workpiece to be sprayed according to the spray path. It solves the problems of single function and low spraying flexibility in the existing coating industry and improves the efficiency of the spraying production line. A Chinese patent with publication number CN115741717A discloses a three-dimensional reconstruction and path planning method, apparatus, device and storage medium. The method includes: constructing a three-dimensional sensing array based on electronic skin; then, obtaining a three-dimensional grid space and extracting a contour vector from the grid space; performing three-dimensional decomposition on the contour vector to obtain contour data and smoothing it; next, synthesizing the contour data into a three-dimensional contour and extracting time series data; obtaining three-dimensional spatial information of the object based on the time series data; based on the relative position of the robot, correcting the three-dimensional spatial information and obtaining the current global environment feature vector; finally, obtaining path planning information based on the current global environment feature vector and a reinforcement learning algorithm; the three-dimensional reconstruction and path planning method provided in the embodiment of the application can improve the response speed, realize real-time and accurate three-dimensional reconstruction of objects and path planning in unknown complex environments.

[0005] Currently, there is an increasing demand from enterprises for defect detection based on surface structured light. How to obtain more defect information for effective feature recognition is a key issue in the research of defect detection methods based on surface structured light. Summary of the Invention

[0006] In order to solve the above technical problems, the present invention provides a method and system for workpiece surface defect detection and laser repair path planning based on surface structured light. The method extracts and identifies defects on the workpiece surface based on surface structured light and plans the repair path, which greatly improves the recognition accuracy and efficiency and is conducive to online application.

[0007] The technical solution adopted by the present invention is a method for surface defect detection and laser repair path planning of workpieces based on surface structured light. The method obtains three-dimensional point cloud data of the workpiece based on surface structured light to complete defect detection; based on the defect detection results, the coordinate points of the workpiece in the camera coordinate system of the robotic arm are determined, the point cloud data is updated, and the horizontal curve reconstruction and vertical curve reconstruction of the repair path are completed; based on the reconstructed curve, the inner discrete points located on the same stripe are preprocessed by a gridding algorithm, and an execution grid is constructed to complete the repair path planning; the stripes here refer to the stripes obtained by the point cloud slicing algorithm, and after segmentation, the discrete points located on the same stripe but free are inner discrete points, including but not limited to fractures, cracks, burrs, etc. on the surface of the object.

[0008] Preferably, the defect detection comprises the following steps:

[0009] S1.1 Obtain 3D point cloud data based on surface structured light, and convert it into a mapped color image according to the point cloud color mapping model using height information;

[0010] S1.2 extracting features for matching based on the obtained mapped color image;

[0011] S1.3 Perform feature matching on the features extracted in S1.2 and the point cloud mapping plane color image of the standard workpiece. The matching results are imported into the color difference recognition model to calculate the color difference and color contrast. The color contrast results here are obtained using a color mapping table. The larger the color difference, the more obvious the defect.

[0012] S1.4 Defects are identified based on color differences and color comparisons to obtain a quality assessment. The quality assessment herein is based on the comparison of defective parts with samples without defects.

[0013] Preferably, in S1.1, the point cloud color mapping model forms a color mapping table and a color index table for index conversion according to different combinations of the three RGB components, and calculates the height value of any point cloud data based on the height information of the obtained three-dimensional point cloud data. The corresponding color index value,

[0014]

[0015] Among them, Round[ ] means rounding to the nearest integer. is the number of color segments, is the maximum height, is the minimum height;

[0016] Get the height value of any point cloud data based on the index value The corresponding color.

[0017] Preferably, in S1.2, the mapped color image is binarized using a grayscale threshold to obtain an original grayscale image, the center line is preliminarily extracted, and along the initial center line, the minimum circumscribed rectangle in the original grayscale image is extracted as the ROI, and the sub-pixel center is extracted within the ROI using an iterative Gaussian convolution algorithm for calculating the color difference.

[0018] Preferably, in S1.3, based on the contour matching algorithm, the discrete point set of the standard workpiece contour line is A discrete point set corresponding to the contour of the workpiece to be repaired Perform registration to match the feature positions of the workpiece and the standard workpiece, where the feature positions are the defect feature positions;

[0019] The RGB Euclidean distance is calculated based on the corresponding points in the ROI area of the feature position and the ROI area of the standard workpiece. The average of the RGB Euclidean distances of all corresponding points is calculated. The average is used as the RGB color difference value of the ROI area of the two feature positions. Defect identification is completed based on the comparison with the difference threshold. For example, in an area of 150×150 pixels, an RGB color difference value greater than 0.2 is considered a defect.

[0020] Preferably, the constructed execution grid is verified based on the defect identification result, and the verification is displayed by outputting the reconstruction.

[0021] Preferably, planning the repair path includes the following steps:

[0022] S2.1 obtain a point cloud collection;

[0023] S2.2 downsamples the point cloud set and removes noise;

[0024] S2.3 Screen the area to be repaired, fill the point cloud in the area, and construct a repair path.

[0025] Preferably, in S2.2, the point cloud space is divided using a preset value as the side length of each voxel, and a characterization point calculation is performed on the points within each voxel to obtain a downsampled point cloud set.

[0026] Preferably, in S2.3, filling the point cloud within the region using bilinear interpolation comprises the following steps:

[0027] S2.3.1 Get the current point cloud set, set the boundary point set as boundary_points={( , ), i=1,2,…,n}, where, =( , ), =( , ), respectively i The coordinates of the starting and ending points of the boundary points;

[0028] S2.3.2 Initialize the replication point data set to an empty set;

[0029] S2.3.3 For each pair of boundary points ( , ), calculate the number of filling points numpoints= , generate a filling point set, convert each point in the filling point set into a list form and add it to the copy point data set;

[0030] S2.3.4 Repeat S2.3.3 until all points are processed and return the filled point data set.

[0031] A workpiece surface defect detection and laser repair path planning system based on surface structured light, the system comprising:

[0032] A defect detection module, used to detect three-dimensional surface defects of the workpiece to be repaired and obtain quality evaluation;

[0033] A repair path design module is used to align the world coordinate system of the workpiece to be repaired with the camera coordinate system of the repair robot and complete the horizontal and vertical curve reconstruction of the repair path based on the new point cloud data;

[0034] a repair route execution module, configured to grid the reconstructed repair path, output it, and execute the repair;

[0035] A controller is provided in conjunction with the defect detection module, the repair path design module, and the repair route execution module, and the controller executes the workpiece surface defect detection and laser repair path planning method based on surface structured light.

[0036] The present invention relates to a method and system for workpiece surface defect detection and laser repair path planning based on surface structured light. The method comprises the following steps: obtaining three-dimensional point cloud data of a workpiece based on surface structured light to complete defect detection; determining the coordinate points of the workpiece in a camera coordinate system of a robotic arm based on the defect detection results, updating the point cloud data, and completing horizontal and vertical curve reconstruction of the repair path; preprocessing the inner discrete points located on the same stripe through a gridding algorithm based on the reconstructed curve, and constructing an execution grid to complete repair path planning; the system comprises a defect detection module, a repair path design module, and a repair route execution module, and completing workpiece surface defect detection and laser repair path planning by executing a method using a controller.

[0037] The beneficial effects of the present invention are that defects are identified by aligning the data of the workpiece being tested with the determined defect-free workpiece, thereby greatly improving the detection efficiency; the horizontal and vertical curve reconstructions of the repair path are completed through new point cloud data, and the obtained curves are preprocessed by a gridding algorithm to quickly form a reshaped execution grid. After verification by the defect identification results, the planning time and execution time of the repair path are greatly shortened, and the defect detection results are integrated with the path planning, which is convenient for verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of the method of the present invention;

[0039] Figure 2 This is a flow chart of defect detection in the present invention;

[0040] Figure 3 It is a system structure block diagram of the present invention;

[0041] Figure 4 This is a comparison chart of the effects of S1.2 in the present invention;

[0042] Figure 5 This is a schematic diagram of constructing a curve using the Bezier curve method by grouping, sorting, and sampling discrete points on different stripes and vertically adjacent discrete points in the present invention. DETAILED DESCRIPTION

[0043] The present invention will be further described in detail below with reference to the embodiments, but the protection scope of the present invention is not limited thereto.

[0044] like Figure 3 The present invention relates to a workpiece surface defect detection and laser repair path planning system based on surface structured light, the system comprising:

[0045] A defect detection module, used to detect three-dimensional surface defects of the workpiece to be repaired and obtain quality evaluation;

[0046] A repair path design module is used to align the world coordinate system of the workpiece to be repaired with the camera coordinate system of the repair robot and complete the horizontal and vertical curve reconstruction of the repair path based on the new point cloud data;

[0047] a repair route execution module, configured to grid the reconstructed repair path, output it, and execute the repair;

[0048] A controller is provided in conjunction with the defect detection module, the repair path design module, and the repair route execution module, and the controller executes the workpiece surface defect detection and laser repair path planning method based on surface structured light.

[0049] During the specific implementation process, the defect detection module converts the three-dimensional point cloud data obtained based on the surface structured light into a mapped color image using height information according to the point cloud color mapping model. The matching features are extracted from the mapped color image and matched with the point cloud mapped flat color image of the standard workpiece used for defect detection. The matching results are imported into the color difference recognition model to calculate the color difference and color contrast, complete defect identification, and obtain quality evaluation.

[0050] The repair path design module uses the robotic arm to initialize the workpiece's position based on the quality evaluation, re-determines the workpiece's location in the robotic arm's camera coordinate system, and aligns the world coordinate point with the camera coordinate system. After capturing the point cloud data, the module reconstructs the horizontal and vertical curves of the repair path based on the new point cloud data.

[0051] The repair path execution module preprocesses the inner discrete points on the same stripe through a gridding algorithm based on the reconstructed horizontal and vertical curves, and constructs an execution grid. It verifies the results based on the defect identification, and the verification is displayed through output reconstruction.

[0052] The sequential execution of the defect detection module, the repair path design module, and the repair route execution module is realized by the controller executing the workpiece surface defect detection and laser repair path planning method based on surface structured light.

[0053] like Figure 1 As shown, the present invention also relates to a method for workpiece surface defect detection and laser repair path planning based on surface structured light. The method obtains three-dimensional point cloud data of the workpiece based on surface structured light to complete defect detection; based on the defect detection result, the coordinate points of the workpiece in the camera coordinate system of the robotic arm are determined, the point cloud data is updated, and the horizontal direction curve reconstruction and vertical direction curve reconstruction of the repair path are completed; based on the reconstructed curve, the inner discrete points located on the same stripe are preprocessed by a gridding algorithm, and an execution grid is constructed to complete the repair path planning.

[0054] In this invention, after acquiring the 3D coordinate data of the workpiece being measured, the most direct method for determining whether the workpiece surface is defective is to align the measured workpiece data with a known defect-free workpiece (a standard workpiece). The constructed workpiece is then determined to be defective based on acceptable discrepancies (e.g., a color difference of less than 0.2 within a 150×150 pixel area is acceptable). 3D scanning using surface structured light reveals that deviations in the image coordinates extracted by the camera directly affect the accuracy of the workpiece's 3D coordinates. Therefore, reliably and stably extracting the position of the fringe image is crucial for 3D scanning.

[0055] like Figure 2As shown, the defect detection includes the following steps:

[0056] (1-1) Obtain three-dimensional point cloud data based on surface structured light, and convert it into a mapped color image according to the point cloud color mapping model through height information;

[0057] The point cloud color mapping model forms a color mapping table and a color index table used for index conversion according to different combinations of the three RGB components. The color index table is shown in Table 1.

[0058] Table 1 Color index table

[0059]

[0060] Calculate the height value of any point cloud data based on the height information of the obtained 3D point cloud data The corresponding color index value,

[0061]

[0062] Among them, Round[ ] means rounding to the nearest integer. is the number of color segments, is the maximum height, is the minimum height;

[0063] Calculate After that, the corresponding color value can be obtained from the corresponding color mapping table, that is, the mapped color image.

[0064] (1-2) extracting features for matching based on the obtained mapped color image;

[0065] The mapped color image is binarized using a grayscale threshold to obtain an original grayscale image, a center line is preliminarily extracted, and along the initial center line, the minimum circumscribed rectangle in the original grayscale image is extracted as a ROI, and an iterative Gaussian convolution algorithm is used within the ROI to extract the sub-pixel center.

[0066] In the present invention, the grayscale threshold is different for different photos taken, and is set to 120 in this embodiment.

[0067] In surface structured light technology, accurate detection of the center of structured light stripes is one of the key factors affecting the accuracy of the structured light 3D acquisition system. The smoothness of the center line extracted from the image is also an important factor affecting the smoothness of the 3D reconstructed workpiece surface. The present invention is based on the Steger center line extraction algorithm and the improvement effect is as follows: Figure 4 As shown, the present invention improves the processing efficiency of the iterative algorithm.

[0068] In the present invention, the sub-pixel center positioning technology is used to improve the positioning accuracy, which provides high precision and high accuracy for subsequent defect detection;

[0069] By setting ROI and adopting iterative Gaussian convolution algorithm, the efficiency of image preprocessing is improved. After the surface structured light completes the construction of the three-dimensional workpiece, it meets the requirements of online real-time scanning and detection, and has high detection efficiency.

[0070] (1-3) matching the features extracted in (1-2) with the point cloud mapping plane color image of the standard workpiece, importing the matching results into the color difference recognition model, and calculating the color difference and color contrast;

[0071] Based on the contour matching algorithm, the discrete point set of the standard workpiece contour line is A discrete point set corresponding to the contour of the workpiece to be repaired Perform registration to complete feature position matching between the workpiece and the standard workpiece;

[0072] The RGB Euclidean distance is calculated based on the corresponding points of the ROI area of the feature position and the ROI area of the standard workpiece, and the mean of the RGB Euclidean distance of all corresponding points is calculated. The mean is used as the RGB color difference value of the ROI area of the two feature positions, and defect identification is completed based on its comparison with the difference threshold.

[0073] (1-4) Complete defect identification based on color difference and color contrast to obtain quality evaluation.

[0074] In the present invention, the difference in color represents the difference in curvature, curve, thickness, etc.;

[0075] The quality evaluation is expressed as the smaller the ROI value, the more prominent the corresponding color difference value is, and the greater the difference from the standard workpiece is, and the defect detection module completes the metal surface defect repair based on laser cladding according to the reconstruction result.

[0076] In the present invention, the coordinate points of the workpiece in the camera coordinate system of the robot arm are determined, and the point cloud data is updated to obtain the three-dimensional coordinates of the workpiece after the camera coordinate system and the world coordinate system are updated and aligned; when performing horizontal curve reconstruction and vertical curve reconstruction on the repair path, the discrete points on different stripes after grouping and sampling and the discrete points in vertical adjacent positions are respectively constructed using the Bezier curve method, such as Figure 5 shown.

[0077] In the present invention, the construction of the grid is implemented by the horizontal curve and the vertical curve preprocessed by the gridding algorithm through the functions glPolygonMode(GL_FRONT_AND_BACK,GL_LINE) and glPolygonMode(GL_FRONT_AND_BACK,GL_FILL). The former is displayed in the form of lines and the latter is displayed in the form of surfaces, thereby reconstructing the three-dimensional workpiece.

[0078] The specific parameters are disclosed in detail here:

[0079] This function is part of the OpenGL standard library, which is an open source graphics library;

[0080] GL_FRONT indicates that the display mode will apply to the front face of the workpiece;

[0081] GL_BACK indicates that the display mode will apply to the back-facing surface of the workpiece;

[0082] GL_FRONT_AND_BACK means that the display mode will apply to all faces of the workpiece;

[0083] The mode parameter determines how the selected workpiece face is displayed;

[0084] GL_LINE means displaying line segments and polygons with outlines;

[0085] GL_FILL indicates the display surface, and the polygon is filled.

[0086] The constructed execution grid is verified based on the defect identification results, and the verification is displayed through output reconstruction.

[0087] Planning the repair path includes the following steps:

[0088] (2-1) Obtaining a point cloud collection;

[0089] (2-2) Downsampling the point cloud set and removing noise;

[0090] (2-2-1) A point cloud collection usually contains a large number of points, which in many cases makes data processing very slow and complicated. The purpose of downsampling is to reduce the number of points in the point cloud, thereby reducing the amount of data and improving the efficiency of subsequent processing (such as feature extraction, registration, classification, etc.), while trying to retain the main structure and feature information of the point cloud.

[0091] With voxel_size=5, it means that the side length of each voxel is 5 units. The entire point cloud space will be divided into a cubic grid with a side length of 5. For each point in each voxel, the voxel is generally represented by calculating the average value of all points in the voxel or selecting the first point in the voxel. Taking the calculation of the average value as an example, if there are 10 points in a voxel, then the coordinates of these 10 points are averaged to obtain the coordinates of a new point, which represents the voxel.

[0092] If the average value of all points in a voxel is used to represent the voxel, assuming that there are n points in the voxel, their coordinates are ( ),( , ),…,( , ), then the coordinates of the new point representing the voxel are ;

[0093] In this way, if there are 100,000 points in the original point cloud, after voxel downsampling, the number of points may be reduced to a few thousand, which is convenient for subsequent calculations.

[0094] (2-2-2) Noise removal is a statistical method to remove outliers (noise) in the point cloud. For each point in the point cloud, the algorithm searches for its neighboring points.

[0095] Let there be two points in the point cloud ( )and ( ), the Euclidean distance between them is The algorithm calculates the distance between the target point and the surrounding points, finds the neighboring points within a certain range, and for each point, calculates the average distance to the surrounding nb_neighbors neighboring points and the standard deviation of these distances.

[0096] The average distance μ is: ;

[0097] Standard deviation formula σ: ;

[0098] For a point P, if its average distance to its neighboring points satisfy: >μ+k·σ, then P is considered an outlier. As a screening basis, remove outliers.

[0099] (2-3) Screen the area to be repaired, fill the point cloud in the area, and construct the repair path.

[0100] Filtering points that meet specific conditions in the point cloud data (filtering defect areas) is achieved through a series of logical judgments. Points that meet specific conditions are filtered out from the point cloud data arr2, and these points are stored in the temp list. Then, temp and arr2 are converted.

[0101] Filling the point cloud in the area with bilinear interpolation includes the following steps:

[0102] (2-3-1) Get the current point cloud set, set the boundary point set to boundary_points={( , ), i=1,2,…,n}, where, =( , ), =( , ), respectively i The coordinates of the starting and ending points of the boundary points;

[0103] (2-3-2) Initialize the replication point data set to an empty set;

[0104] (2-3-3) For each pair of boundary points ( , ), calculate the number of filling points numpoints= , generate a set of filling points {np.linspace( , ,numpoints)}, convert each point in the filling point set into a list form and add it to the copy point data set;

[0105] (2-3-4) Repeat until all points are processed and return the filled point data set.

[0106] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, 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 flowcharts and / or block diagrams. 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.

[0108] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0110] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0111] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A method for workpiece surface defect detection and laser repair path planning based on surface structured light, characterized by: The method acquires three-dimensional point cloud data of the workpiece based on surface structured light to complete defect detection; Defect detection includes the following steps: S1.1 Obtain 3D point cloud data based on surface structured light, and convert it into a mapped color image according to the point cloud color mapping model using height information; S1.2 extracting features for matching based on the obtained mapped color image; binarizing the mapped color image using a grayscale threshold to obtain an original grayscale image, preliminarily extracting a centerline, extracting a minimum circumscribed rectangle in the original grayscale image along the initial centerline as a region of interest (ROI), and extracting sub-pixel centers within the ROI using an iterative Gaussian convolution algorithm; S1.3 is based on the contour matching algorithm, through the discrete point set of the standard workpiece contour line A discrete point set corresponding to the contour of the workpiece to be repaired Perform registration to match the feature positions of the workpiece and the standard workpiece; import the matching results into the color difference recognition model to calculate the color difference and color contrast; S1.4 Calculate the RGB Euclidean distance between the corresponding points in the ROI area of the feature position and the ROI area of the standard workpiece, and calculate the average of the RGB Euclidean distances of all corresponding points. Use the average as the RGB color difference value of the ROI areas of the two feature positions, and complete defect identification based on the comparison with the difference threshold; obtain quality evaluation; Based on the defect detection results, the coordinate points of the workpiece in the camera coordinate system of the robot arm are determined, the point cloud data is updated, and the horizontal and vertical curve reconstruction of the repair path is completed. When performing horizontal and vertical curve reconstruction on the repair path, the discrete points on different stripes after grouping and sampling and the vertically adjacent discrete points are respectively constructed using the Bezier curve method. Based on the reconstructed curves, the inner discrete points on the same stripe are preprocessed using a gridding algorithm, and the execution grid is constructed to complete the repair path planning. Planning the repair path includes the following steps: S2.1 obtain a point cloud collection; S2.2 divides the point cloud space into two parts, using a preset value as the side length of each voxel, and calculates the representation points for each point in each voxel to obtain a downsampled point cloud set; and removes noise points. S2.3 screens the area to be repaired and fills the point cloud within the area, including the following steps: S2.3.1 Get the current point cloud set, set the boundary point set as boundary_points={( , ), i=1,2,…,n}, where, =( , ), =( , ), which are the coordinates of the starting and ending points of the i-th pair of boundary points respectively; S2.3.2 Initialize the replication point data set to an empty set; S2.3.3 For each pair of boundary points ( , ), calculate the number of filling points numpoints= , generate a filling point set, convert each point in the filling point set into a list form and add it to the copy point data set; S2.3.4 Repeat S2.3.3 until all points are processed and return the filled point data set; Build a repair path.

2. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 1, characterized in that: In S1.1, the point cloud color mapping model forms a color mapping table and a color index table for index conversion according to different combinations of the three RGB components. The height value of any point cloud data is calculated based on the height information of the obtained three-dimensional point cloud data. The corresponding color index value, , Among them, Round[ ] means rounding to the nearest integer. is the number of color segments, is the maximum height, is the minimum height; Get the height value of any point cloud data based on the index value The corresponding color.

3. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 1, characterized in that: The constructed execution grid is verified based on the defect identification results, and the verification is displayed through output reconstruction.

4. A workpiece surface defect detection and laser repair path planning system based on surface structured light, characterized by: The system comprises: A defect detection module, used to detect three-dimensional surface defects of the workpiece to be repaired and obtain quality evaluation; A repair path design module is used to align the world coordinate system of the workpiece to be repaired with the camera coordinate system of the repair robot and complete the horizontal and vertical curve reconstruction of the repair path based on the new point cloud data; a repair route execution module, configured to grid the reconstructed repair path, output it, and execute the repair; A controller is provided in conjunction with the defect detection module, the repair path design module, and the repair route execution module, and the controller executes the workpiece surface defect detection and laser repair path planning method based on surface structured light according to one of claims 1 to 3.

Citation Information

Patent Citations

  • Automatic spraying system and method based on workpiece contour information three-dimensional reconstruction

    CN109967292A

  • Three-dimensional reconstruction and path planning method and device, equipment and storage medium

    CN115741717A

  • High-rise building fireproof plugging module defect detection device and method based on line structured light

    CN114812440A

  • Cable repairing method based on layered path planning and related equipment

    CN119625051A