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 structured light, combined with point cloud color mapping and feature matching technology, the surface defects of the workpiece are identified, and the repair path is reconstructed based on the detection results, which solves the problem of insufficient detection efficiency and accuracy of surface structured light defects, and realizes efficient defect detection and repair path planning.
Patent Information
- Application Number
- CN202510402191.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-04-01
AI Technical Summary
The defect detection method based on surface structured light is difficult to effectively identify defects on the workpiece surface with low information, and the defect recognition efficiency and accuracy are insufficient, making it difficult to meet the needs of industrial production.
The three-dimensional point cloud data of the workpiece is obtained through surface structure light, and the point cloud color mapping model is used to convert it into a mapped color image, extract features and match them with the standard workpiece, calculate the color difference and comparison, and complete defect recognition. Based on the defect detection results, the point cloud data is updated and the repair path is reconstructed, and the execution grid is constructed through a grid algorithm to complete the repair path planning.
It improves the accuracy and efficiency of workpiece surface defect detection, can quickly identify and verify defects, shorten repair path planning and execution time, and is suitable for online applications.
Smart Images

Figure CN119936057A_ABST
Abstract
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, which mainly consists of a projector and a camera. The projector is responsible for projecting a specific coded pattern onto the surface of an object, and the camera is used to collect the deformation of these patterns and then reconstruct the 3D shape of the object. By analyzing these deformations, the 3D coordinates of the surface of the object can be calculated. Surface structured light can be applied to many fields such as industry, medicine, and cultural heritage. For example, in the industrial field, it can be used for the size measurement and surface defect detection of parts. In the medical field, it can be used for the shape analysis and reconstruction of teeth and bones. In the field of cultural heritage, it can also be used for the protection 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] A Chinese patent with 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 spraying room, which is connected to the control system and can automatically spray the workpiece to be sprayed according to the spraying 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, device, equipment and storage medium, the method comprising: 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 the three-dimensional space information of the object based on the time series data; based on the relative position and posture of the robot, correcting the three-dimensional space 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 companies 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 defects on the workpiece surface are extracted and identified based on surface structured light, and the repair path is planned, 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 result, 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 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 pre-processed 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: S1.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; S1.2 extracting features for matching based on the obtained mapped color image; S1.3 The features extracted in S1.2 are matched with the point cloud mapping plane color image of the standard workpiece, and the matching results are imported into the color difference recognition model to calculate the color difference and color contrast. The color contrast result here is obtained through the color mapping table. The larger the color difference, the more obvious the defect. S1.4 Defect identification is completed based on color difference and color comparison to obtain quality evaluation; the quality evaluation here is the result obtained by comparing defective parts with samples without defects.
[0009] 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 according to the height information of the obtained three-dimensional point cloud data. The corresponding color index value,
[0010] 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.
[0011] 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 a ROI, and the sub-pixel center is extracted within the ROI using an iterative Gaussian convolution algorithm for calculating the color difference.
[0012] Preferably, in S1.3, based on the contour matching algorithm, a discrete point set of the standard workpiece contour line is obtained. 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 position is the defect feature position; 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 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, and the defect identification is completed based on the comparison with the difference threshold; for example, in an area of 150×150 pixels, if the RGB color difference value is greater than 0.2, it is a defect.
[0013] Preferably, the constructed execution grid is verified based on the defect identification result, and the verification is displayed by outputting the reconstruction.
[0014] Preferably, planning the repair path comprises the following steps: S2.1 obtain a point cloud collection; S2.2 downsamples the point cloud set and removes noise; S2.3 selects the area to be repaired, fills the point cloud in the area, and constructs a repair path.
[0015] Preferably, in S2.2, the point cloud space is divided using a preset value as the side length of each voxel, and characterization point calculation is performed on the points in each voxel to obtain a downsampled point cloud set.
[0016] Preferably, in S2.3, filling the point cloud in the area by bilinear interpolation comprises the following steps: S2.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; 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.
[0017] A workpiece surface defect detection and laser repair path planning system based on surface structured light, the system comprising: 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, 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 direction curve reconstruction and vertical direction curve reconstruction of the repair path based on the new point cloud data; A repair route execution module, used for gridding, outputting and executing the repair of the reconstructed repair path; 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.
[0018] 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 coordinate points of the workpiece in a camera coordinate system of a robot arm based on defect detection results, updating point cloud data, and completing horizontal curve reconstruction and vertical curve reconstruction of a repair path; preprocessing inner discrete points 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 a controller execution method is used to complete workpiece surface defect detection and laser repair path planning.
[0019] The beneficial effects of the present invention are that defects are identified by aligning the data of the workpiece under test with the determined defect-free workpiece, thereby greatly improving the detection efficiency; the horizontal curve reconstruction and the vertical curve reconstruction 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, and 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 to facilitate verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of the method of the present invention; Figure 2 is a flow chart of defect detection in the present invention; Figure 3 is a system structure block diagram of the present invention; Figure 4 This is a comparison diagram of the effects of S1.2 in the present invention; Figure 5 It is a schematic diagram of constructing a curve by using the Bezier curve method to group, sort and sample discrete points on different stripes and vertically adjacent discrete points in the present invention. DETAILED DESCRIPTION
[0021] The present invention is further described in detail below in conjunction with embodiments, but the protection scope of the present invention is not limited thereto.
[0022] like Figure 3 As shown, the present invention relates to a workpiece surface defect detection and laser repair path planning system based on surface structured light, the system comprising: 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, 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 direction curve reconstruction and vertical direction curve reconstruction of the repair path based on the new point cloud data; A repair route execution module, used for gridding, outputting and executing the repair of the reconstructed repair path; 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.
[0023] In 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 according to the point cloud color mapping model through height information, extracts the features for matching in the mapped color image, performs feature matching with the point cloud mapped plane color image of the standard workpiece used for defect detection, imports the matching results into the color difference recognition model, calculates the color difference and color contrast, completes defect recognition, and obtains quality evaluation; The repair path design module completes the initialization of the workpiece position through the robot arm device according to the obtained quality evaluation, re-determines the position of the workpiece in the robot arm's camera coordinate system, and realizes the alignment of the world coordinate point and the camera coordinate system. After shooting, the point cloud data is obtained again, and the horizontal and vertical curve reconstruction of the repair path is completed based on the new point cloud data. The repair path execution module preprocesses the inner discrete points on the same stripe through a gridding algorithm according to the reconstructed horizontal and vertical curves, and constructs an execution grid. It verifies based on the defect recognition results, and the verification is displayed through output reconstruction.
[0024] 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.
[0025] 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, wherein 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 robot 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 through a gridding algorithm, and an execution grid is constructed to complete the repair path planning.
[0026] In the present invention, after obtaining the three-dimensional coordinate data of the workpiece to be measured, the most direct method to determine whether the workpiece surface has defects is to align the measured workpiece data with the determined defect-free workpiece (standard workpiece), and then determine whether the constructed workpiece has defects through acceptable difference values (such as within the 150×150 pixel area, the color difference is less than 0.2, which is acceptable). From the three-dimensional scanning of surface structured light, it can be seen that there is a deviation in the image coordinate extraction of the workpiece in the camera, which will directly affect the acquisition accuracy of the three-dimensional coordinates of the workpiece. Therefore, how to stably and reliably extract the position of the stripe image is the key in three-dimensional scanning.
[0027] like Figure 2 As shown, the defect detection includes the following steps: (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; 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. Table 1 Color index table
[0028] According to the height information of the obtained 3D point cloud data, calculate the height value of any point cloud data The corresponding color index value,
[0029] Among them, Round[ ] means rounding to the nearest integer. is the number of color segments, is the maximum height, is the minimum height; Calculate After that, the corresponding color value can be obtained from the corresponding color mapping table, that is, the mapped color image.
[0030] (1-2) extracting features for matching based on the obtained mapped color image; 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 to extract the sub-pixel center within the ROI.
[0031] In the present invention, the grayscale threshold is different for different photos taken, and is set to 120 in this embodiment.
[0032] In the surface structured light technology, accurate detection of the center of the structured light stripe 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 surface of the 3D reconstructed workpiece. The present invention is based on the Steger center line extraction algorithm. The improvement effect is as follows: Figure 4 As shown, the present invention improves the processing efficiency of the iterative algorithm.
[0033] In the present invention, the sub-pixel center positioning technology is used to improve the positioning accuracy, which provides high precision and high accuracy guarantee for subsequent defect detection; 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, the requirements of online real-time scanning and detection are met, and the detection efficiency is high.
[0034] (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; 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 the feature position matching between the workpiece and the standard workpiece; The RGB Euclidean distance is calculated according to 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 distances of all corresponding points is calculated. The mean is used as the RGB color difference value of the ROI areas of the two feature positions, and defect identification is completed based on its comparison with the difference threshold.
[0035] (1-4) Defect identification is completed based on color difference and color contrast to obtain quality evaluation.
[0036] In the present invention, the difference in color represents the difference in curvature, curve, thickness, etc.; 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.
[0037] In the present invention, the coordinate points of the workpiece in the camera coordinate system of the robot 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 the horizontal direction curve reconstruction and the vertical direction curve reconstruction are performed 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.
[0038] 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.
[0039] The specific parameters are disclosed in detail here: This function is part of the OpenGL standard library, which is an open source graphics library; GL_FRONT means that the display mode will apply to the front face of the workpiece; GL_BACK indicates that the display mode will apply to the back-facing surface of the workpiece; GL_FRONT_AND_BACK means that the display mode will apply to all faces of the workpiece; The mode parameter determines how the selected workpiece face is displayed; GL_LINE means displaying line segments and polygons with outlines; GL_FILL indicates the display surface, and the polygon is filled.
[0040] For the constructed execution grid, verification is performed based on the defect identification results, and the verification is displayed through output reconstruction.
[0041] Planning the repair path includes the following steps: (2-1) Obtain a point cloud set; (2-2) Downsampling the point cloud set and removing noise; (2-2-1) A point cloud set usually contains a large number of points, which in many cases will make 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.
[0042] Voxel_size=5 means that the side length of each voxel is 5 units, and 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 a strategy such as 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, the coordinates of these 10 points are averaged to obtain a new point coordinate, and this new point represents the voxel.
[0043] 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 ; 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.
[0044] (2-2-2) Noise removal is a statistical method to remove outliers (noise points) in the point cloud. For each point in the point cloud, the algorithm searches for neighboring points around it. 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 distance range, and for each point, calculates the average distance to the surrounding nb_neighbors neighboring points and the standard deviation of these distances. The average distance μ is: ; Standard deviation formula σ: ; 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.
[0045] (2-3) Screen the area to be repaired, fill the point cloud in the area, and construct the repair path.
[0046] 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, and then temp and arr2 are converted; Filling the point cloud in the area with bilinear interpolation includes the following steps: (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; (2-3-2) Initialize the replication point data set to an empty set; (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; (2-3-4) Repeat until all points are processed and return the filled point data set.
[0047] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, 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 disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0048] 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 flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0049] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 A function specified in one or more boxes.
[0050] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0051] 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.
[0052] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for workpiece surface defect detection and laser repair path planning based on surface structured light, characterized in that: The method acquires 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 robot arm are determined, the point cloud data is updated, and the horizontal and vertical curve reconstructions of the repair path are completed; based on the reconstructed curves, the inner discrete points on the same stripe are preprocessed through a gridding algorithm, and an execution grid is constructed to complete the repair path planning.
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: The defect detection comprises the following steps: S1.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; S1.2 extracting features for matching based on the obtained mapped color image; S1.3 feature matching is performed on the features extracted in S1.2 and the point cloud mapping plane color image of the standard workpiece, and the matching results are imported into the color difference recognition model to calculate the color difference and color contrast; S1.4 Complete defect identification based on color difference and color contrast to obtain quality evaluation.
3. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 2, 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, and calculates the height value of any point cloud data according to 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.
4. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 3, characterized in that: 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.
5. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 4, characterized in that: 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 complete the feature position matching between the workpiece and the standard workpiece; The RGB Euclidean distance is calculated according to 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 distances of all corresponding points is calculated. The mean is used as the RGB color difference value of the ROI areas of the two feature positions, and defect identification is completed based on its comparison with the difference threshold.
6. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 1, characterized in that: For the constructed execution grid, verification is performed based on the defect identification results, and the verification is displayed through output reconstruction.
7. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 1, characterized in that: Planning the repair path includes the following steps: S2.1 obtain a point cloud collection; S2.2 downsamples the point cloud set and removes noise; S2.3 selects the area to be repaired, fills the point cloud in the area, and constructs a repair path.
8. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 7, characterized in that: In S2.2, the point cloud space is divided with a preset value as the side length of each voxel, and the characterization point calculation is performed on the points in each voxel to obtain a downsampled point cloud set.
9. The method for workpiece surface defect detection and laser repair path planning based on surface structured light according to claim 7, characterized in that: In S2.3, the point cloud in the area is filled with bilinear interpolation, including the following steps: S2.3.1 Get the current point cloud set, set the boundary point set to boundary_points={( , ), i=1,2,…,n}, where, =( , ), =( , ), are the coordinates of the starting point and the ending point 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.
10. A method for workpiece surface defect detection and laser repair path planning based on surface structured light, characterized in that: 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, 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 direction curve reconstruction and vertical direction curve reconstruction of the repair path based on the new point cloud data; A repair route execution module, used for gridding, outputting and executing the repair of the reconstructed repair path; 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 as described in one of claims 1 to 9.
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
Building surveying and mapping method based on unmanned aerial vehicle remote sensing and unmanned aerial vehicle
CN116295279A
Pipeline repairing method based on defect detection and three-dimensional reconstruction
CN119399596A
Cited By
Printing piece flaw detection method and system based on machine vision
CN120334236A
Aluminum rod production quality online detection method and system
CN120726050A
A method and system for online quality inspection in aluminum rod production
CN120726050B
Display panel laser repairing method and device, electronic equipment and storage medium
CN120882275A
Intelligent laser welding system capable of reducing joint defects and slope forming rewelding method
CN122400802A