Method and system for identifying colloid based on point cloud algorithm
By generating calibration matrix and hand-eye matrix for equipment calibration, and using histogram analysis to extract point cloud feature data, the problem of insufficient calibration in existing colloid recognition technology is solved, and more accurate and reliable colloid recognition is achieved result.
Patent Information
- Application Number
- CN202411865268.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The existing colloid recognition technology relies on manual calibration, which leads to insufficient accuracy and comprehensiveness of point cloud data, affecting the reliability of colloid recognition. In addition, point cloud feature extraction is limited, and more comprehensive feature data cannot be extracted, resulting in colloid area recognition results and The actual situation is quite different.
By acquiring the point cloud data of the calibration board, the calibration matrix is generated, the detection head is calibrated, and the hand-eye matrix is generated to calibrate the robot arm to ensure the accuracy and comprehensiveness of the point cloud data. The surface-shaped point cloud data is analyzed through histograms. Feature extraction, colloid area identification and three-dimensional data calculation.
It improves the accuracy and reliability of colloid recognition, avoids the deviation between the colloid area recognition results and the actual situation, and outputs more reliable colloid three-dimensional data, so that colloid recognition can achieve a more ideal effect.
Smart Images

Figure CN119314168A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision technology, and in particular to a method and system for identifying colloids based on a point cloud algorithm. Background Art
[0002] Gluing of vehicle body parts is a very important part of automobile manufacturing process, which is related to the level of vibration reduction, noise reduction and lightweight of automobiles. Therefore, after gluing, it is necessary to identify the vehicle parts for colloid detection. In the current colloid identification, relevant scanning equipment is needed to obtain point cloud data of vehicle parts. Before obtaining point cloud data, the scanning equipment needs to be calibrated to ensure that accurate and comprehensive point cloud data can be obtained. At present, the calibration of scanning equipment mostly relies on manual implementation, but this method is too dependent on the professional quality of relevant personnel and cannot guarantee the accuracy of equipment calibration, resulting in insufficient accuracy and comprehensiveness of the acquired point cloud data, affecting the reliability of colloid identification. Point cloud feature extraction is one of the important links of target recognition, which affects the accuracy of target recognition. At present, point cloud feature extraction is usually realized by normal change calculation, but the feature data extracted by this method is relatively limited, and it is impossible to extract more comprehensive point cloud feature data. At the same time, its accuracy of feature extraction is also insufficient, resulting in a large deviation between the final colloid area recognition result and the actual situation, so that colloid recognition fails to achieve the expected effect. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art. The present invention provides a method and system for identifying colloids based on a point cloud algorithm, which can avoid excessive deviation between the obtained colloid area identification results and the actual situation, so that colloid identification can achieve a more ideal effect.
[0004] In order to solve the above technical problems, the present invention provides a method for identifying colloids based on a point cloud algorithm, the method comprising: Acquiring point cloud data of a calibration plate based on a detection head, generating a calibration matrix based on the point cloud data, and performing calibration processing on the detection head based on the calibration matrix to obtain a calibrated detection head; Generate a hand-eye matrix based on the calibration matrix, and perform calibration processing on the robotic arm based on the hand-eye matrix to obtain a calibrated robotic arm; Based on the calibrated robotic arm, the calibrated detection head is controlled to obtain workpiece point cloud data of the vehicle workpiece, and the workpiece point cloud data is subjected to planar splicing processing to obtain planar point cloud data; Extracting features from the planar point cloud data based on histogram analysis to obtain point cloud feature data; Performing colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result; Colloid three-dimensional data calculation is performed based on the colloid region recognition result to obtain target colloid three-dimensional data.
[0005] Optionally, generating a calibration matrix based on the point cloud data, and calibrating the detection head based on the calibration matrix to obtain the calibrated detection head includes: Obtaining the reference coordinates of the calibration plate, and determining an angle correction matrix using a transformation matrix based on the reference coordinates and point cloud data; Acquire the posture data of the detection head, perform position deviation fitting based on the posture data to obtain position deviation data, generate a compensation matrix based on the position deviation data, and generate a calibration matrix based on the compensation matrix and the angle correction matrix; The conversion relationship between the gluing coordinate system and the detection head coordinate system is acquired based on the calibration matrix, and the detection head is calibrated based on the conversion relationship to obtain the calibrated detection head.
[0006] Optionally, generating a hand-eye matrix based on the calibration matrix, and calibrating the robotic arm based on the hand-eye matrix to obtain the calibrated robotic arm includes: Based on the point cloud data, a rotation and translation matrix is constructed using an iterative closest point algorithm to obtain position and posture data of the robotic arm in different spaces; Generate a hand-eye matrix using the calibration matrix based on the rotation and translation matrix and the position and posture data; Acquire a robot arm transformation matrix, and optimize the hand-eye matrix using a cost function based on the robot arm transformation matrix to obtain an optimized hand-eye matrix; The robotic arm is calibrated based on the optimized hand-eye matrix to obtain the calibrated robotic arm.
[0007] Optionally, optimizing the hand-eye matrix using a cost function based on the robot arm transformation matrix to obtain an optimized hand-eye matrix includes: Calculating the registration error using the hand-eye calibration equations based on the robot arm transformation matrix, and constructing a cost function based on the registration error; The hand-eye matrix is iteratively optimized based on the cost function to obtain an optimized hand-eye matrix.
[0008] Optionally, performing planar stitching processing on the workpiece point cloud data to obtain planar point cloud data includes: Performing filtering processing on the workpiece point cloud data to obtain workpiece point cloud data after filtering processing; Selecting a seed point from the workpiece point cloud data after filtering, and determining whether the seed point and the non-seed points around the seed point are located in the same plane; if it is determined that the seed point and the non-seed points around the seed point are located in the same plane, using the non-seed point as a new seed point; Iteratively determine whether the new seed point and new non-seed points around the new seed point are located in the same plane to obtain a number of target seed points; Construct planar point cloud data based on all target seed points.
[0009] Optionally, the extracting features of the planar point cloud data based on histogram analysis to obtain point cloud feature data includes: Extracting a viewpoint feature histogram descriptor from the planar point cloud data to obtain a viewpoint feature histogram descriptor; Calculating Gaussian curvature extreme points based on the surface point cloud data to obtain Gaussian curvature extreme points; Determining point cloud feature points of the planar point cloud data using curvature directions based on the Gaussian curvature extreme points; The neighborhood of the point cloud feature point is layered to obtain a layered neighborhood, and histogram mapping of the point cloud feature point is performed based on the layered neighborhood to obtain a target feature histogram, and point cloud feature data is generated based on the target feature histogram and a viewpoint feature histogram descriptor.
[0010] Optionally, extracting a viewpoint feature histogram descriptor from the planar point cloud data to obtain a viewpoint feature histogram descriptor includes: Calculating the centroid of the planar point cloud data and the normal vector of each data point, and calculating the angle feature based on the centroid and the normal vector of each data point; A histogram descriptor is combined based on the angle feature, the centroid and the normal vector of each data point to obtain a viewpoint feature histogram descriptor.
[0011] Optionally, performing colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result includes: The point cloud feature data is input into a colloid recognition model, and the colloid recognition model performs colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result.
[0012] Optionally, the calculating of colloid three-dimensional data based on the colloid region identification result to obtain target colloid three-dimensional data includes: Determine the center line of the colloid region using a skeleton algorithm based on the colloid region recognition result; Dividing the center line into point arrays to obtain a plurality of point arrays, and performing singular point elimination processing on each point array to obtain a plurality of point arrays after the singular point elimination processing; Determine the three-dimensional point cloud data based on the point array after several singular points are eliminated, and obtain the height data of the colloid based on the laser triangulation method; The target colloid three-dimensional data is generated based on the three-dimensional point cloud data and the height data.
[0013] In addition, the present invention also provides a system for identifying colloids based on a point cloud algorithm, the system comprising: A detection head calibration module: used for acquiring point cloud data of a calibration plate based on a detection head, generating a calibration matrix based on the point cloud data, and performing calibration processing on the detection head based on the calibration matrix to obtain a calibrated detection head; A robotic arm calibration module: used to generate a hand-eye matrix based on the calibration matrix, and perform calibration processing on the robotic arm based on the hand-eye matrix to obtain the calibrated robotic arm; Point cloud planar splicing module: used to control the calibrated detection head based on the calibrated robotic arm to obtain workpiece point cloud data of the vehicle workpiece, and perform planar splicing processing on the workpiece point cloud data to obtain planar point cloud data; Feature extraction module: used for extracting features from the planar point cloud data based on histogram analysis to obtain point cloud feature data; Colloid region identification module: used for performing colloid region identification processing based on the point cloud feature data to obtain a colloid region identification result; Colloid three-dimensional data calculation module: used to calculate the colloid three-dimensional data based on the colloid region recognition result to obtain the target colloid three-dimensional data.
[0014] In an embodiment of the present invention, the detection head is calibrated based on the calibration matrix generated by the compensation matrix and the angle correction matrix, and the robotic arm is calibrated based on the hand-eye matrix generated by the calibration matrix, which can ensure the accuracy of the calibration of the detection head and the robotic arm, and ensure the accuracy and comprehensiveness of the acquired vehicle workpiece point cloud data. Surface splicing processing of the workpiece point cloud data can eliminate the gaps between the point cloud data and form more complete point cloud data to improve the utilization rate of the point cloud data. Feature extraction of surface point cloud data based on histogram analysis can extract more comprehensive point cloud feature data and improve the accuracy of point cloud data feature extraction. By performing colloid area recognition processing on point cloud feature data, it is possible to avoid excessive deviation between the obtained colloid area recognition result and the actual situation, so that more reliable colloid three-dimensional data can be output, so that colloid recognition can achieve a more ideal effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 is a flow chart of a method for identifying colloids based on a point cloud algorithm in an embodiment of the present invention; Figure 2 is a flow chart of a method for identifying colloids based on a point cloud algorithm in another embodiment of the present invention; Figure 3 It is a schematic diagram of the structural composition of a system for identifying colloids based on a point cloud algorithm in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] Embodiment 1 See also Figure 1 , Figure 1 : is a flow chart of a method for identifying colloids based on a point cloud algorithm in an embodiment of the present invention, the method comprising: S11: acquiring point cloud data of a calibration plate based on a detection head, generating a calibration matrix based on the point cloud data, and performing calibration processing on the detection head based on the calibration matrix to obtain a calibrated detection head; In the specific implementation process of the present invention, the calibration matrix is generated based on the point cloud data, and the detection head is calibrated based on the calibration matrix to obtain the detection head after the calibrated processing, including: obtaining the reference coordinates of the calibration plate, and determining the angle correction matrix based on the reference coordinates and the point cloud data using the transformation matrix; obtaining the posture data of the detection head, performing position deviation fitting based on the posture data to obtain position deviation data, and generating a compensation matrix based on the position deviation data, and generating a calibration matrix based on the compensation matrix and the angle correction matrix; obtaining the conversion relationship between the glue coating coordinate system and the detection head coordinate system based on the calibration matrix, and calibrating the detection head based on the conversion relationship to obtain the detection head after the calibrated processing.
[0019] Specifically, the point cloud data of the calibration plate is obtained based on the detection head, and the point cloud data of the calibration plate includes point cloud data of at least four corner points. The detection head is a component of the 3D laser contour scanning module. The reference coordinates of the calibration plate are obtained, and the angle correction matrix is determined based on the reference coordinates and the point cloud data using the conversion matrix, the conversion matrix from the point cloud to the world coordinate system is determined according to the point cloud data and the reference coordinates of the corner points of the calibration plate, the deviation value between the actual angle of the detection head and the preset angle is determined according to the conversion matrix, and the angle correction matrix is determined according to the deviation value. The posture data of the detection head is obtained, the position deviation is fitted based on the posture data, the position deviation is fitted based on the posture data and the theoretical posture data, the position deviation data is obtained, and a compensation matrix is generated based on the position deviation data, and a calibration matrix is generated based on the compensation matrix and the angle correction matrix. The conversion relationship between the gluing coordinate system and the detection head coordinate system is obtained based on the calibration matrix, and the conversion relationship between the gluing coordinate system and the detection head coordinate system is obtained using the indirect adjustment function according to the calibration matrix. The detection head is calibrated based on the conversion relationship, the reprojection target point coordinates of the calibration plate in the glue-coated coordinate system are obtained according to the conversion relationship, the reprojection error in the glue-coated coordinate system is obtained according to the reprojection target point coordinates, the detection head is calibrated according to the reprojection error and the conversion relationship, and the calibrated detection head is obtained.
[0020] S12: generating a hand-eye matrix based on the calibration matrix, and calibrating the robotic arm based on the hand-eye matrix to obtain a calibrated robotic arm; In the specific implementation process of the present invention, the hand-eye matrix is generated based on the calibration matrix, and the robotic arm is calibrated based on the hand-eye matrix to obtain the calibrated robotic arm, including: constructing a rotation and translation matrix based on the point cloud data using an iterative closest point algorithm to obtain the posture data of the robotic arm changing in different spaces; generating a hand-eye matrix based on the rotation and translation matrix and the posture data using the calibration matrix; obtaining a robotic arm transformation matrix, and optimizing the hand-eye matrix based on the robotic arm transformation matrix using a cost function to obtain an optimized hand-eye matrix; calibrating the robotic arm based on the optimized hand-eye matrix to obtain a calibrated robotic arm.
[0021] Furthermore, the hand-eye matrix is optimized using a cost function based on the robot arm transformation matrix to obtain an optimized hand-eye matrix, including: calculating the registration error using a hand-eye calibration equation group based on the robot arm transformation matrix, and constructing a cost function based on the registration error; and iteratively optimizing the hand-eye matrix based on the cost function to obtain an optimized hand-eye matrix.
[0022] Specifically, the rotation and translation matrix is constructed based on the point cloud data using the iterative closest point algorithm. The iterative closest point algorithm is a point cloud registration algorithm. The point cloud data is preliminarily coarsely registered to obtain an initial transformation matrix. Sampling is performed based on the point cloud data to obtain a matching point set and the nearest neighboring points. The rotation matrix and the translation matrix are calculated based on the matching point set and the nearest neighboring points. The rotation matrix and the translation matrix are rotated and translated to obtain a corresponding point set. The initial transformation matrix calculates the transformation matrix based on the corresponding point set using the perspective projection transformation vector, and calculates the error function. The above process is repeated to a preset number of iterations to minimize the error, obtain the rotation and translation matrix, and obtain the posture data of the robot arm in different spaces. Based on the rotation and translation matrix and the posture data, the hand-eye matrix is generated using the calibration matrix. The rotation and translation matrix and the posture data are used to calculate the posture matrix. According to the posture matrix and the calibration matrix, the equation under the preset robot arm motion state is combined with the least squares method to perform matrix solution to obtain the hand-eye matrix. Based on the robot transformation matrix, the registration error is calculated using the hand-eye calibration equation group, the first transformation matrix of the calibration plate relative to the detection head coordinate system and the second transformation matrix of the robot end relative to the robot base coordinate system are obtained, and the hand-eye calibration equation group is constructed according to the first transformation matrix and the second transformation matrix. The registration error is calculated by the robot transformation matrix using the quaternion solution method combined with the hand-eye calibration equation group, and a cost function is constructed based on the registration error. Based on the cost function, the hand-eye matrix is iteratively optimized, the hand-eye transformation matrix is converted to the Lie algebraic space, the cost function is converted in the Lie algebraic space to obtain the transformation cost function, the hand-eye matrix is iteratively optimized using the least squares estimation algorithm combined with the transformation cost function to obtain the optimized hand-eye matrix, and the influence of the robot positioning accuracy on the solution of the transformation matrix is taken into account, thereby improving the optimization accuracy of the hand-eye matrix. Based on the optimized hand-eye matrix, the robot is calibrated to obtain the calibrated robot.
[0023] S13: Based on the calibrated robotic arm, controlling the calibrated detection head to obtain workpiece point cloud data of the vehicle workpiece, and performing planar splicing processing on the workpiece point cloud data to obtain planar point cloud data; In the specific implementation process of the present invention, the workpiece point cloud data is subjected to planar stitching processing to obtain planar point cloud data, including: filtering the workpiece point cloud data to obtain filtered workpiece point cloud data; selecting seed points in the filtered workpiece point cloud data, and judging whether the seed points and non-seed points around the seed points are located in the same plane, if it is judged that the seed points and non-seed points around the seed points are located in the same plane, then the non-seed points are used as new seed points; iteratively judging whether the new seed points and new non-seed points around the new seed points are located in the same plane to obtain a number of target seed points; constructing planar point cloud data based on all target seed points.
[0024] Specifically, based on the calibrated robotic arm, the calibrated detection head is controlled to obtain the workpiece point cloud data of the vehicle workpiece. The calibrated robotic arm moves the calibrated detection head to the target position to collect the point cloud data of the vehicle workpiece, and obtains the workpiece point cloud data. The workpiece point cloud data is filtered, the workpiece point cloud data is divided into blocks, and a number of workpiece point cloud data blocks are obtained. The adjacent point cloud blocks of each workpiece point cloud data block are obtained, and the projection plane of the adjacent point cloud blocks is determined. The adjacent reconstruction points of the boundary points in the workpiece point cloud data block are determined according to the projection plane, and the point cloud filtering process is performed according to the adjacent reconstruction points of the boundary points to obtain the workpiece point cloud data after filtering. A seed point is selected from the filtered workpiece point cloud data, and a data point is randomly selected as a seed point from the filtered workpiece point cloud data, and it is determined whether the seed point and the non-seed points around the seed point are located in the same plane, wherein the normal vector of the seed point is perpendicular to the ground normal vector. If it is determined that the seed point and the non-seed points around the seed point are located in the same plane, the non-seed point is used as a new seed point. Iteratively judge whether the new seed point and the new non-seed points around the new seed point are located in the same plane. At the same time, in the iterative judgment process, all seed points are counted by regional growing to obtain a number of target seed points. Planar point cloud data is constructed based on all target seed points, and planar point cloud blocks are constructed according to all counted seed points. All constructed planar point cloud blocks are merged to obtain planar point cloud data. Planar splicing processing of workpiece point cloud data can eliminate gaps between point cloud data and form more complete point cloud data to improve the utilization rate of point cloud data.
[0025] S14: extracting features from the planar point cloud data based on histogram analysis to obtain point cloud feature data; In the specific implementation process of the present invention, the feature extraction of the surface point cloud data based on the histogram analysis to obtain the point cloud feature data includes: extracting the viewpoint feature histogram descriptor of the surface point cloud data to obtain the viewpoint feature histogram descriptor; calculating the Gaussian curvature extreme point based on the surface point cloud data to obtain the Gaussian curvature extreme point; determining the point cloud feature points of the surface point cloud data using the curvature direction based on the Gaussian curvature extreme point; stratifying the neighborhood of the point cloud feature point to obtain the stratified neighborhood, and performing histogram mapping of the point cloud feature points based on the stratified neighborhood to obtain the target feature histogram, and generating the point cloud feature data based on the target feature histogram and the viewpoint feature histogram descriptor.
[0026] Furthermore, the extracting of viewpoint feature histogram descriptors from the planar point cloud data to obtain the viewpoint feature histogram descriptors includes: calculating the centroid of the planar point cloud data and the normal vector of each data point, and calculating the angle feature based on the centroid and the normal vector of each data point; and combining histogram descriptors based on the angle feature, the centroid and the normal vector of each data point to obtain the viewpoint feature histogram descriptor.
[0027] Specifically, the centroid of the planar point cloud data and the normal vector of each data point are calculated, and the angle feature is calculated based on the centroid and the normal vector of each data point. For each data point, the angle between the normal vector of the data point and the centroid line is calculated, and the angle between the normal vectors of each data point is calculated. The angle feature is formed according to the angle between the normal vector of the data point and the centroid line and the angle between the normal vectors of each data point. A histogram descriptor is combined based on the angle feature, the centroid and the normal vector of each data point, and several viewpoint feature histogram representations are calculated through the angle feature, the centroid and the normal vector of each data point. Several viewpoint feature histograms are connected in a preset order to obtain a viewpoint feature histogram descriptor. Gaussian curvature extreme value points are calculated based on the planar point cloud data, and the planar point cloud data is gridded in blocks to obtain planar point cloud data of each grid block, and Gaussian curvature extreme value points are obtained in the planar point cloud data of each grid block to obtain Gaussian curvature extreme value points. Based on the Gaussian curvature extreme point, the point cloud feature points of the planar point cloud data are determined by using the curvature direction, and the extreme points in the other main directions of the neighborhood of the Gaussian curvature extreme point are located along the direction of the main curvature, and feature point retrieval is performed along the main direction to obtain point cloud feature points. The neighborhood of the point cloud feature point is layered to obtain a layered neighborhood, and a histogram mapping of the point cloud feature point is performed based on the layered neighborhood, and the depth of the point cloud feature point to the projection surface in the layered neighborhood is calculated. The inclination of each layered neighborhood relative to the point cloud feature point is calculated based on the depth, and the inclination is mapped to a preset histogram to obtain a target feature histogram, and point cloud feature data is generated based on the target feature histogram and the viewpoint feature histogram descriptor.
[0028] S15: performing colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result; In the specific implementation process of the present invention, the colloid area recognition processing is performed based on the point cloud feature data to obtain the colloid area recognition result, including: inputting the point cloud feature data into a colloid recognition model, and the colloid recognition model performs colloid area recognition processing based on the point cloud feature data to obtain the colloid area recognition result.
[0029] Specifically, the point cloud feature data is input into a colloid recognition model, and the colloid recognition model performs colloid region recognition processing based on the point cloud feature data. The colloid recognition model is a convergence model obtained by inputting a sample data set into a deep neural network for training. The deep neural network includes a conventional convolution layer, a hole convolution layer, a feature fusion layer and an upsampling layer. The conventional convolution layer is used to generate low-level features based on the point cloud feature data, the hole convolution layer is used to generate a number of high-level abstract features based on the point cloud feature data, the feature fusion layer is used to fuse a number of high-level abstract features to obtain a high-level fused feature, and the upsampling layer is used to integrate the high-level fused features and the underlying features and then perform upsampling processing to obtain the colloid region in the vehicle workpiece, that is, to obtain the colloid region recognition result.
[0030] S16: Calculating colloid three-dimensional data based on the colloid region recognition result to obtain target colloid three-dimensional data.
[0031] In the specific implementation process of the present invention, the colloid three-dimensional data calculation is performed based on the colloid area recognition result to obtain the target colloid three-dimensional data, including: determining the center line of the colloid area using a skeleton algorithm based on the colloid area recognition result; dividing the center line into a point array to obtain a plurality of point arrays, and performing singular point elimination processing on each point array to obtain a plurality of point arrays after singular point elimination processing; determining three-dimensional point cloud data based on the plurality of point arrays after singular point elimination processing, and obtaining the height data of the colloid based on the laser triangulation method; generating the target colloid three-dimensional data based on the three-dimensional point cloud data and the height data.
[0032] Specifically, the target point cloud image of the colloid area in the vehicle workpiece is determined according to the colloid area recognition result, and the center line of the colloid area is determined in the target point cloud image using the skeleton algorithm. The center line is divided into a point array to obtain a plurality of point arrays. Singular point exclusion processing is performed on each point array, the result array is initialized, the median of each point array is calculated, each point in the point array is traversed, the first distance between each point and the median is calculated, the second distance between each point and the adjacent point is calculated, and the target distance is calculated according to the first distance and the second distance. If the target distance is greater than or equal to the preset threshold, the point is a singular point, and the determined singular point is excluded to obtain a plurality of point arrays after the singular point exclusion processing. Determine the three-dimensional point cloud data based on the point array after several singular points are eliminated, use the least squares approximation method to perform curve fitting based on the point array after several singular points are eliminated, obtain the optimized center line, determine the detection points of the optimized center line, determine the corresponding detection line based on the detection points, calculate the intersection of the detection line and the colloid area, determine the three-dimensional point cloud data of the colloid, such as the width and length of the colloid, based on the intersection of the detection line and the colloid area, and obtain the height data of the colloid based on the laser triangulation method, that is, obtain the height data of the colloid area through the principle of laser triangulation. Generate the three-dimensional data of the target colloid based on the three-dimensional point cloud data and the height data.
[0033] In an embodiment of the present invention, the detection head is calibrated based on the calibration matrix generated by the compensation matrix and the angle correction matrix, and the robotic arm is calibrated based on the hand-eye matrix generated by the calibration matrix, which can ensure the accuracy of the calibration of the detection head and the robotic arm, and ensure the accuracy and comprehensiveness of the acquired vehicle workpiece point cloud data. Surface splicing processing of the workpiece point cloud data can eliminate the gaps between the point cloud data and form more complete point cloud data to improve the utilization rate of the point cloud data. Feature extraction of surface point cloud data based on histogram analysis can extract more comprehensive point cloud feature data and improve the accuracy of point cloud data feature extraction. By performing colloid area recognition processing on point cloud feature data, it is possible to avoid excessive deviation between the obtained colloid area recognition result and the actual situation, so that more reliable colloid three-dimensional data can be output, so that colloid recognition can achieve a more ideal effect.
[0034] Embodiment 2 See also Figure 2 , Figure 2 FIG. 1 is a flow chart of a method for identifying colloids based on a point cloud algorithm in another embodiment of the present invention, the method comprising: S201: acquiring point cloud data of a calibration plate based on a detection head, generating a calibration matrix based on the point cloud data, and calibrating the detection head based on the calibration matrix to obtain a calibrated detection head; S202: generating a hand-eye matrix based on the calibration matrix, and calibrating the robotic arm based on the hand-eye matrix to obtain a calibrated robotic arm; S203: controlling the calibrated detection head based on the calibrated robotic arm to obtain workpiece point cloud data of the vehicle workpiece, and performing planar splicing processing on the workpiece point cloud data to obtain planar point cloud data; S204: extracting a viewpoint feature histogram descriptor from the planar point cloud data to obtain a viewpoint feature histogram descriptor; In the specific implementation process of the present invention, the centroid of the planar point cloud data and the normal vector of each data point are calculated, and the angle feature is calculated based on the centroid and the normal vector of each data point. For each data point, the angle between the normal vector of the data point and the centroid line is calculated, and the angle between the normal vectors of each data point is calculated. The angle feature is formed according to the angle between the normal vector of the data point and the centroid line and the angle between the normal vectors of each data point. Based on the angle feature, the centroid and the normal vector of each data point, a histogram descriptor is combined, and several viewpoint feature histogram representations are calculated through the angle feature, the centroid and the normal vector of each data point. Several viewpoint feature histograms are connected in a preset order to obtain a viewpoint feature histogram descriptor.
[0035] S205: Calculating Gaussian curvature extreme points based on the planar point cloud data to obtain Gaussian curvature extreme points; In the specific implementation process of the present invention, Gaussian curvature extreme points are calculated based on the surface point cloud data, the surface point cloud data is gridded in blocks to obtain the surface point cloud data of each grid block, and the Gaussian curvature extreme points are obtained in the surface point cloud data of each grid block to obtain the Gaussian curvature extreme points.
[0036] S206: Determine the point cloud feature points of the planar point cloud data by using the curvature direction based on the Gaussian curvature extreme point; In the specific implementation process of the present invention, the point cloud feature points of the surface point cloud data are determined based on the Gaussian curvature extreme point using the curvature direction, the extreme points on the remaining main directions in the neighborhood of the Gaussian curvature extreme point are located along the direction of the main curvature, and feature point retrieval is performed along the main direction to obtain point cloud feature points.
[0037] S207: stratifying the neighborhood of the point cloud feature point to obtain a stratified neighborhood, performing histogram mapping of the point cloud feature point based on the stratified neighborhood to obtain a target feature histogram, and generating point cloud feature data based on the target feature histogram and a viewpoint feature histogram descriptor; In the specific implementation process of the present invention, the neighborhood of the point cloud feature point is layered to obtain a layered neighborhood, and a histogram mapping of the point cloud feature point is performed based on the layered neighborhood, the depth of the point cloud feature point to the projection surface in the layered neighborhood is calculated, and the inclination of each layered neighborhood relative to the point cloud feature point is calculated based on the depth, and the inclination is mapped into a preset histogram to obtain a target feature histogram, and point cloud feature data is generated based on the target feature histogram and the viewpoint feature histogram descriptor.
[0038] S208: performing colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result; S209: Calculating colloid three-dimensional data based on the colloid region recognition result to obtain target colloid three-dimensional data.
[0039] In an embodiment of the present invention, the detection head is calibrated based on the calibration matrix generated by the compensation matrix and the angle correction matrix, and the robotic arm is calibrated based on the hand-eye matrix generated by the calibration matrix, which can ensure the accuracy of the calibration of the detection head and the robotic arm, and ensure the accuracy and comprehensiveness of the acquired vehicle workpiece point cloud data. Surface splicing processing of the workpiece point cloud data can eliminate the gaps between the point cloud data and form more complete point cloud data to improve the utilization rate of the point cloud data. Feature extraction of surface point cloud data based on histogram analysis can extract more comprehensive point cloud feature data and improve the accuracy of point cloud data feature extraction. By performing colloid area recognition processing on point cloud feature data, it is possible to avoid excessive deviation between the obtained colloid area recognition result and the actual situation, so that more reliable colloid three-dimensional data can be output, so that colloid recognition can achieve a more ideal effect.
[0040] Embodiment 3 See also Figure 3 , Figure 3 : is a schematic diagram of the structural composition of a system for identifying colloids based on a point cloud algorithm in an embodiment of the present invention, the system comprising: The detection head calibration module 31 is used for acquiring point cloud data of a calibration plate based on the detection head, generating a calibration matrix based on the point cloud data, and performing calibration processing on the detection head based on the calibration matrix to obtain a calibrated detection head; A robot arm calibration module 32 is used to generate a hand-eye matrix based on the calibration matrix, and perform calibration processing on the robot arm based on the hand-eye matrix to obtain a calibrated robot arm; The point cloud planar splicing module 33 is used to control the calibrated detection head based on the calibrated robot arm to obtain the workpiece point cloud data of the vehicle workpiece, and perform planar splicing processing on the workpiece point cloud data to obtain planar point cloud data; Feature extraction module 34: used to extract features from the planar point cloud data based on histogram analysis to obtain point cloud feature data; The colloid region identification module 35 is used to perform colloid region identification processing based on the point cloud feature data to obtain a colloid region identification result; The colloid three-dimensional data calculation module 36 is used to calculate the colloid three-dimensional data based on the colloid region recognition result to obtain the target colloid three-dimensional data.
[0041] In the specific implementation process of the present invention, the specific implementation method of the system item can refer to the implementation method of the above-mentioned method item, which will not be repeated here.
[0042] In an embodiment of the present invention, the detection head is calibrated based on the calibration matrix generated by the compensation matrix and the angle correction matrix, and the robotic arm is calibrated based on the hand-eye matrix generated by the calibration matrix, which can ensure the accuracy of the calibration of the detection head and the robotic arm, and ensure the accuracy and comprehensiveness of the acquired vehicle workpiece point cloud data. Surface splicing processing of the workpiece point cloud data can eliminate the gaps between the point cloud data and form more complete point cloud data to improve the utilization rate of the point cloud data. Feature extraction of surface point cloud data based on histogram analysis can extract more comprehensive point cloud feature data and improve the accuracy of point cloud data feature extraction. By performing colloid area recognition processing on point cloud feature data, it is possible to avoid excessive deviation between the obtained colloid area recognition result and the actual situation, so that more reliable colloid three-dimensional data can be output, so that colloid recognition can achieve a more ideal effect.
[0043] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0044] In addition, the above is a detailed introduction to a method and system for identifying colloids based on a point cloud algorithm provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for identifying colloids based on a point cloud algorithm, characterized in that: The method comprises: Acquiring point cloud data of a calibration plate based on a detection head, generating a calibration matrix based on the point cloud data, and performing calibration processing on the detection head based on the calibration matrix to obtain a calibrated detection head; Generate a hand-eye matrix based on the calibration matrix, and perform calibration processing on the robotic arm based on the hand-eye matrix to obtain a calibrated robotic arm; Based on the calibrated robotic arm, the calibrated detection head is controlled to obtain workpiece point cloud data of the vehicle workpiece, and the workpiece point cloud data is subjected to planar splicing processing to obtain planar point cloud data; Extracting features from the planar point cloud data based on histogram analysis to obtain point cloud feature data; Performing colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result; Colloid three-dimensional data calculation is performed based on the colloid region recognition result to obtain target colloid three-dimensional data.
2. The method for identifying colloids based on point cloud algorithm according to claim 1, characterized in that: The generating a calibration matrix based on the point cloud data, and performing calibration processing on the detection head based on the calibration matrix to obtain the calibrated detection head includes: Obtaining the reference coordinates of the calibration plate, and determining the angle correction matrix using a transformation matrix based on the reference coordinates and point cloud data; Acquire the posture data of the detection head, perform position deviation fitting based on the posture data to obtain position deviation data, generate a compensation matrix based on the position deviation data, and generate a calibration matrix based on the compensation matrix and the angle correction matrix; The conversion relationship between the gluing coordinate system and the detection head coordinate system is acquired based on the calibration matrix, and the detection head is calibrated based on the conversion relationship to obtain the calibrated detection head.
3. The method for identifying colloids based on point cloud algorithm according to claim 1, characterized in that: The generating a hand-eye matrix based on the calibration matrix, and calibrating the robotic arm based on the hand-eye matrix to obtain the calibrated robotic arm includes: Based on the point cloud data, a rotation and translation matrix is constructed using an iterative closest point algorithm to obtain position and posture data of the robotic arm in different spaces; Generate a hand-eye matrix using the calibration matrix based on the rotation and translation matrix and the position and posture data; Obtaining a robot arm transformation matrix, and optimizing the hand-eye matrix using a cost function based on the robot arm transformation matrix to obtain an optimized hand-eye matrix; The robotic arm is calibrated based on the optimized hand-eye matrix to obtain the calibrated robotic arm.
4. The method for identifying colloids based on point cloud algorithm according to claim 3, characterized in that: The step of optimizing the hand-eye matrix using a cost function based on the robot arm transformation matrix to obtain an optimized hand-eye matrix includes: Calculating the registration error using the hand-eye calibration equations based on the robot arm transformation matrix, and constructing a cost function based on the registration error; The hand-eye matrix is iteratively optimized based on the cost function to obtain an optimized hand-eye matrix.
5. The method for identifying colloids based on point cloud algorithm according to claim 1, characterized in that: The step of performing planar splicing processing on the workpiece point cloud data to obtain planar point cloud data includes: Performing filtering processing on the workpiece point cloud data to obtain workpiece point cloud data after filtering processing; Selecting a seed point from the workpiece point cloud data after filtering, and determining whether the seed point and the non-seed points around the seed point are located in the same plane; if it is determined that the seed point and the non-seed points around the seed point are located in the same plane, taking the non-seed point as a new seed point; Iteratively determine whether the new seed point and new non-seed points around the new seed point are located in the same plane to obtain a number of target seed points; Construct planar point cloud data based on all target seed points.
6. The method for identifying colloids based on point cloud algorithm according to claim 1, characterized in that: The step of extracting features from the planar point cloud data based on histogram analysis to obtain point cloud feature data includes: Extracting a viewpoint feature histogram descriptor from the planar point cloud data to obtain a viewpoint feature histogram descriptor; Calculating Gaussian curvature extreme points based on the surface point cloud data to obtain Gaussian curvature extreme points; Determining point cloud feature points of the planar point cloud data using curvature directions based on the Gaussian curvature extreme points; The neighborhood of the point cloud feature point is layered to obtain a layered neighborhood, and histogram mapping of the point cloud feature point is performed based on the layered neighborhood to obtain a target feature histogram, and point cloud feature data is generated based on the target feature histogram and a viewpoint feature histogram descriptor.
7. The method for identifying colloids based on point cloud algorithm according to claim 6, characterized in that: The extracting of viewpoint feature histogram descriptors from the planar point cloud data to obtain viewpoint feature histogram descriptors includes: Calculating the centroid of the planar point cloud data and the normal vector of each data point, and calculating the angle feature based on the centroid and the normal vector of each data point; A histogram descriptor is combined based on the angle feature, the centroid and the normal vector of each data point to obtain a viewpoint feature histogram descriptor.
8. The method for identifying colloids based on point cloud algorithm according to claim 1, characterized in that: The performing colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result includes: The point cloud feature data is input into a colloid recognition model, and the colloid recognition model performs colloid region recognition processing based on the point cloud feature data to obtain a colloid region recognition result.
9. The method for identifying colloids based on point cloud algorithm according to claim 1, characterized in that: The step of calculating the colloid three-dimensional data based on the colloid region recognition result to obtain the target colloid three-dimensional data includes: Determine the center line of the colloid region using a skeleton algorithm based on the colloid region recognition result; Dividing the center line into point arrays to obtain a plurality of point arrays, and performing singular point elimination processing on each point array to obtain a plurality of point arrays after the singular point elimination processing; Determine the three-dimensional point cloud data based on the point array after several singular points are eliminated, and obtain the height data of the colloid based on the laser triangulation method; The target colloid three-dimensional data is generated based on the three-dimensional point cloud data and the height data.
10. A system for identifying colloids based on point cloud algorithm, characterized in that: The system comprises: A detection head calibration module: used for acquiring point cloud data of a calibration plate based on a detection head, generating a calibration matrix based on the point cloud data, and performing calibration processing on the detection head based on the calibration matrix to obtain a calibrated detection head; A robotic arm calibration module is used to generate a hand-eye matrix based on the calibration matrix, and to calibrate the robotic arm based on the hand-eye matrix to obtain the calibrated robotic arm; Point cloud planar splicing module: used to control the calibrated detection head based on the calibrated robotic arm to obtain workpiece point cloud data of the vehicle workpiece, and perform planar splicing processing on the workpiece point cloud data to obtain planar point cloud data; Feature extraction module: used for extracting features from the planar point cloud data based on histogram analysis to obtain point cloud feature data; Colloid region identification module: used for performing colloid region identification processing based on the point cloud feature data to obtain a colloid region identification result; Colloid three-dimensional data calculation module: used to calculate the colloid three-dimensional data based on the colloid region recognition result to obtain the target colloid three-dimensional data.
Citation Information
Patent Citations
Mechanical arm and binocular camera hand-eye calibration method based on 3D point cloud
CN115830127A
Weld joint identification method based on deep learning and 3D point cloud
CN115965960A
Point cloud measurement method and system
CN116026252A
Colloid detection method, device and equipment and storage medium
CN117876297A
Robot 3D visual guidance grabbing method
CN118143929A
Cited By
Dispensing detection method, dispensing detection system and electronic equipment
CN119850627A