Intelligent detection and grading method for product packaging surface defects

By constructing a three-dimensional grid model of environmentally friendly pulp molded packaging, calculating curvature distribution and analyzing the boundary curve characteristics, the problems of low defect detection efficiency and strong subjectivity in the existing technology are solved, and accurate detection and quality grading of packaging surface defects are achieved.

CN119963505AActive Publication Date: 2025-05-09GUANGZHOU JIANGREN PRINTING & PACKAGING CO LTD

Patent Information

Application Number
CN202510034889.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-09
Estimated Expiration
2045-01-09

AI Technical Summary

Technical Problem

The prior art is inefficient and subjective in the detection and quality grading of surface defects of environmentally friendly pulp molded packaging, making it difficult to accurately identify and locate surface defects, especially depressions, protrusions and burr defects.

Method used

By obtaining point cloud data on the packaging surface, removing noise points, building a three-dimensional grid model, calculating the curvature distribution of grid vertices, analyzing the local shape characteristics of the boundary curve, quantifying defect parameters, and comparing them with preset quality standards, automated defect detection and quality grading are achieved.

Benefits of technology

Accurate detection and quantification of surface defects of environmentally friendly pulp molded packaging, improve detection efficiency, reduce subjectivity, can automatically perform quality grading, and support product quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963505A_ABST
    Figure CN119963505A_ABST
Patent Text Reader

Abstract

The invention provides a product package surface defect intelligent detection and grading method, which comprises the following steps: acquiring discrete point cloud data of an environment-friendly paper pulp molding package surface, removing outliers and noise points in the point cloud data to obtain preprocessed point cloud data, and according to the preprocessed point cloud data, carrying out classification on the surface defects of the environment-friendly paper pulp molding package surface. Connecting the discrete point clouds through triangular patches to generate an initial grid model so as to form a three-dimensional grid model representing the geometric morphology of the environment-friendly molded pulp packaging surface; drawing a surface curvature distribution diagram by calculating Gaussian curvature and average curvature of grid vertexes, and judging defect information of each grid vertex according to the surface curvature distribution diagram to obtain environment-friendly paper pulp molding package surface defect distribution information; boundary curves of the three-dimensional grid model are extracted, local shape features of the boundary curves are analyzed, if deviation exists between the local shape feature of a certain boundary curve and a typical form of a preset normal boundary, it is indicated that burr defects exist in the position, and the burr defects are added into surface defect distribution information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method for intelligently detecting and grading surface defects of product packaging. Background Art

[0002] In the quality control process of environmentally friendly pulp molded packaging, traditional manual inspection methods are inefficient and highly subjective, so it is crucial to realize automated and intelligent surface defect detection and grading. How to construct the point cloud data of the surface of pulp molded packaging into a three-dimensional mesh model that can accurately characterize the geometric morphology of the surface of pulp molded packaging is a difficult problem to be solved. Furthermore, how to use the constructed three-dimensional mesh model to accurately identify and locate common defects such as depressions and protrusions on the surface of pulp molded packaging is also a difficult problem that needs to be solved. In addition, considering the impact of burr defects on the edge of pulp molded packaging on product quality, a solution is also needed for the detection of burr defects. Finally, how to quantitatively analyze the various defects identified and automatically grade the quality of pulp molded packaging according to preset quality standards is the ultimate goal of this solution. Summary of the invention

[0003] The present invention provides a method for intelligent detection and classification of product packaging surface defects, which mainly includes:

[0004] Obtaining discrete point cloud data of the surface of the environmentally friendly pulp molded packaging, removing outliers and noise points in the point cloud data, obtaining preprocessed point cloud data, and connecting the discrete point cloud through triangular facets to generate an initial mesh model based on the preprocessed point cloud data, so as to form a three-dimensional mesh model representing the geometric morphology of the surface of the environmentally friendly pulp molded packaging;

[0005] By calculating the Gaussian curvature and average curvature of the mesh vertices, a surface curvature distribution map is drawn, and the defect information at each mesh vertex is determined according to the surface curvature distribution map to obtain the surface defect distribution information of the environmentally friendly pulp molded packaging;

[0006] Extract the boundary curve of the three-dimensional mesh model and analyze the local shape characteristics of the boundary curve. If the local shape characteristics of a boundary curve deviate from the typical shape of the preset normal boundary, it indicates that there is a burr defect at that location. The burr defect is added to the surface defect distribution information.

[0007] For the local defects such as depressions, protrusions and burrs in the surface defect distribution information, the defect area, defect depth and defect length of the local defect area are quantified respectively to obtain the key quantitative parameters of each defect. The quantitative parameters are compared with the preset threshold values ​​of the environmentally friendly pulp molded packaging quality standards. Those exceeding the threshold range are judged as unqualified.

[0008] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0009] The present invention discloses a method for detecting and grading the surface defects of environmentally friendly pulp molded packaging. The method first obtains point cloud data of the packaging surface through optical scanning, and constructs a three-dimensional model through filtering and meshing. Then, by calculating the curvature distribution of the mesh vertices, surface defects such as protrusions and depressions are identified. At the same time, the local shape characteristics of the boundary curve are analyzed to detect burr defects. For each type of defect detected, key parameters such as area, depth, and length are further quantified, and compared with preset quality standards to achieve accurate quality grading of environmentally friendly pulp molded packaging. The present invention realizes comprehensive detection and accurate quantification of surface defects of environmentally friendly pulp molded packaging by integrating technologies such as three-dimensional reconstruction, curvature analysis, and boundary feature extraction, providing effective technical support for product quality control. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 The present invention is a flow chart of a method for intelligently detecting and grading product packaging surface defects. DETAILED DESCRIPTION

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

[0012] like Figure 1 In this embodiment, a method for intelligently detecting and grading product packaging surface defects may specifically include:

[0013] S101. Obtain discrete point cloud data of the surface of the environmentally friendly pulp molded packaging, remove outliers and noise points in the point cloud data, obtain preprocessed point cloud data, and connect the discrete point cloud through triangular patches to generate an initial mesh model based on the preprocessed point cloud data, so as to form a three-dimensional mesh model that characterizes the geometric morphology of the surface of the environmentally friendly pulp molded packaging.

[0014] The three-dimensional coordinates of reflective marking points on the surface of environmentally friendly pulp molded packaging are obtained, and the reflective marking points are evenly arranged along the packaging surface; according to the three-dimensional coordinates of the marking points, scanning data of different viewing angles are aligned to obtain a first group of point cloud data, and the scanning data of different viewing angles are aligned by a least squares registration algorithm; a spherical neighborhood search is performed on the first group of point cloud data to obtain a second group of point cloud data, and the spherical neighborhood search eliminates abnormal points through dual constraints of Euclidean distance threshold and local curvature variance threshold; according to the second group of point cloud data, the local curvature value is calculated to perform regional partitioning, and the regional partitioning uses a Poisson reconstruction method to generate a triangular patch model, and the normal vector of the triangular patch model is consistent with the local curvature direction.

[0015] Specifically, according to the surface characteristics of environmentally friendly pulp molded packaging, reflective marking points are evenly arranged on its surface, and the spacing between marking points is set to one-tenth of the maximum size of the packaging surface. The three-dimensional coordinates of each marking point are recorded by a visual positioning algorithm. The acquisition parameters of the optical scanner are adjusted according to the scanning accuracy and sampling spacing, and the surface of the environmentally friendly pulp molded packaging is scanned three times at different viewing angles. The overlapping area of ​​each scanning field of view is kept to account for one-third of the total area. The least squares registration algorithm is used to align the scanning data of different viewing angles through the coordinates of the reflective marking points to obtain the first set of point cloud data. For the first set of point cloud data, the search radius is set to three times the average spacing of the point cloud, and a spherical neighborhood search is used to identify abnormal points with fewer surrounding points than the threshold. These abnormal points are eliminated by the dual constraints of the Euclidean distance threshold and the local curvature variance threshold to obtain the second set of point cloud data. The second set of point cloud data is smoothed using a Gaussian filter, and the filter kernel function size is set to twice the average spacing of the point cloud. The weight factor decays exponentially with distance to obtain the third set of point cloud data. Based on the third set of point cloud data, the local curvature of each point is calculated. The degree of change of the point cloud curvature is determined by the ratio of the eigenvalues ​​of the covariance matrix. The region growing algorithm is used to cluster similar curvature points to obtain curvature partitions. The grid partitioning parameters are set according to the curvature partitions. If the average curvature of the region is greater than the preset threshold, the grid side length is set to one time the average spacing of the point cloud, otherwise it is set to two times. Linear interpolation is used at the boundaries of adjacent partitions to achieve smooth transition of grid size. The oriented bounding box algorithm is used to determine the main direction of the point cloud, and the local coordinate system is established along the main direction. The Poisson reconstruction method is used to generate triangular facets in each grid, and the facet normal vector is consistent with the local curvature direction. When arranging reflective marking points on the surface of environmentally friendly pulp molded packaging, a special reflective material is used to make a circular marking point with a diameter of 2 mm, which is fixed on the packaging surface by a spraying process. The spacing of the marking points is dynamically adjusted according to the packaging size. For a packaging surface of 200 mm × 150 mm, the spacing of the marking points is set to 20 mm to ensure that a sufficient number of marking points can be captured at each viewing angle during the subsequent scanning process. When the optical scanner performs multi-view scanning, the scanning accuracy is set to 0.05 mm, the sampling interval is 0.1 mm, and the scanning angles are 0, 120 and 240 degrees respectively, to ensure that the scanned data has sufficient feature points in the overlapping area for registration. When the least squares registration algorithm is used, the reflective marker point is used as the reference for coarse registration. The iteration is stopped when the registration error is less than 0.1 mm during the iterative optimization process. In the point cloud outlier point identification stage, the radius of the spherical neighborhood search is set to 0.3 mm. If the number of neighborhood points around a point is less than 10, it is marked as a potential outlier. These potential outliers are further screened, and the Euclidean distance between them and the neighborhood points is calculated. Points with a distance greater than 0.5 mm and a local curvature variance greater than 0.8 are finally determined as outliers and eliminated. The kernel function size of the Gaussian filter is set to 0.2 mm, and the weight factor decays exponentially with increasing distance, with an attenuation coefficient of 2. The retained point cloud data is smoothed.By calculating the local curvature of each point, the points in the spherical neighborhood with a radius of 0.4 mm are selected to calculate the covariance matrix. The area with a matrix eigenvalue ratio greater than 4 is determined as a high curvature change area. In the meshing stage, for areas with an average curvature greater than 0.5, the mesh side length is set to 0.1 mm, while for areas with an average curvature less than 0.5, the mesh side length is set to 0.2 mm. At the boundaries of adjacent partitions, linear interpolation is used to achieve a gradual transition of the mesh size, and the width of the interpolation area is 0.5 mm. Finally, in the oriented bounding box algorithm, the main direction is determined by calculating the eigenvector of the point cloud covariance matrix, and Poisson reconstruction is performed after establishing the local coordinate system. The angle between the normal vector of the triangular facet and the local curvature direction is controlled within 15 degrees. For packaging products with multiple concave-convex structures on the surface, such as lining packaging for electronic products, the local curvature can reach more than 2 in the concave-convex transition area where the curvature changes dramatically. At this time, the mesh side length is adaptively adjusted to 0.05 mm to ensure accurate reconstruction of detailed features. In the relatively flat bottom area, the curvature is close to 0 and the grid edge length can be relaxed to 0.4 mm, which not only ensures the reconstruction accuracy but also improves the computational efficiency.

[0016] Obtain the initial grid model to be processed, determine the target encryption granularity and refinement degree of the grid model according to preset business requirements, perform layered processing on the grid model, and encrypt and refine the initial grid model using encryption methods with preset corresponding strengths according to different levels.

[0017] The curvature value of the grid node is obtained by using the Gaussian curvature calculation formula according to the grid node coordinates, and the grid is divided into three levels of high curvature area, medium curvature area and low curvature area by the octree space division method to obtain the first grid unit; for the first grid unit, the ratio of the maximum side length to the minimum side length of adjacent units is calculated. If the side length ratio exceeds a preset threshold, a new node is inserted at the center of the unit with the larger side length to obtain the second grid unit; for the newly inserted node in the second grid unit, the local grid topological connection relationship is calculated, and the connection between the new node and the surrounding nodes is established by the quadrilateral grid unit division method to obtain the third grid unit; for the third grid unit, the grid is subdivided according to the encryption strength coefficient of the high curvature area, the encryption strength coefficient of the medium curvature area, and the encryption strength coefficient of the low curvature area, and gradient units are inserted between areas with different encryption strengths to obtain refined grid units.

[0018] Specifically, the original grid unit side length is calculated according to the target grid division accuracy, the Gaussian curvature calculation formula is used to obtain the grid node curvature value, and the grid is divided into three levels of high curvature area, medium curvature area and low curvature area according to the curvature value by the octree space division method to obtain the first layer of grid units. For the first layer of grid units, the side length uniformity index is set as the ratio of the maximum side length to the minimum side length of adjacent units. If the ratio exceeds the preset threshold, a new node is inserted at the center of the unit with a larger side length, and the coordinates of the new node are calculated by the linear interpolation method to obtain the second layer of grid units. For each newly inserted node in the second layer of grid units, its local grid topological connection relationship is calculated, and the quadrilateral grid unit division method is used to establish the connection between the new node and the surrounding nodes, and the integrity of the grid topological structure is maintained to obtain the third layer of grid units. According to the node distribution of the third layer of grid units, the angle deviation and area distortion degree within the unit are calculated. If the unit quality is lower than the preset standard, the unit shape is adjusted by the node coordinate optimization method to obtain the fourth layer of grid units. For the fourth-layer grid unit, the grid encryption strength coefficient is set to three for the high curvature area, two for the medium curvature area, and one for the low curvature area. The grid is subdivided according to different encryption strengths to obtain the fifth-layer grid unit. Based on the boundary nodes of the fifth-layer grid unit, the transition area grid generation algorithm is used to insert gradient units between different encryption strength areas, and the smooth transition of the grid is achieved through the node density gradient control to obtain the final refined grid unit. In the calculation of grid division accuracy, the average side length of the original grid unit is 10 mm, and it is subdivided into finer grids with a side length of 5 mm according to the target accuracy requirements. When using Gaussian curvature calculation, a neighborhood range with a radius of 15 mm around the node is selected, and the main curvature value is obtained by fitting the quadratic surface through the points in the neighborhood. The area with a curvature value greater than 0.5 is divided into a high curvature area, the curvature value between 0.2 and 0.5 is divided into a medium curvature area, and the curvature value less than 0.2 is divided into a low curvature area. In terms of edge length uniformity control, the threshold of the ratio of the maximum edge length to the minimum edge length of adjacent units is set to 1.5, and local encryption is performed for grid units that exceed the threshold. For example, the four sides of a quadrilateral unit are 8 mm, 6 mm, 8 mm, and 6 mm, respectively, and the maximum and minimum edge length ratio is 1.33. If it is below the threshold, no encryption is required; while for units with side lengths of 9 mm, 5 mm, 9 mm, and 5 mm, the maximum and minimum edge length ratio is 1.8. If it exceeds the threshold, a new node needs to be inserted at the center of the unit. In the process of establishing grid topological connections, for newly inserted nodes, the quadrilateral grid connection relationship is established by searching for existing nodes within 20 mm around it. If there are 5 existing nodes around a new node, 4 nodes are selected to connect to it according to the minimum angle principle to ensure that the internal angles of the new unit formed are all greater than 45 degrees. The grid unit quality assessment adopts a combination of angle weight and area weight. The four internal angles of an ideal quadrilateral unit are all 90 degrees. The greater the deviation of the actual unit internal angle from 90 degrees, the lower the quality assessment score.At the same time, the ratio of the unit area to the ideal square unit area is calculated. If the ratio is too large or too small, the quality assessment score will be reduced. For example, the four internal angles of a unit are 75 degrees, 95 degrees, 85 degrees, and 105 degrees, and the area is 1.2 times that of the standard unit, and its quality assessment score is 0.85. In the encryption processing of different curvature areas, the encryption intensity coefficient of the high curvature area is 3, that is, the original unit is divided into three equal parts; the encryption intensity coefficient of the medium curvature area is 2, and the original unit is divided into two equal parts; the low curvature area maintains the original size. For example, at the rounded corner transition of a toy shell, the curvature value is 0.6, which belongs to the high curvature area. The original 10 mm side length unit is subdivided into small units with a side length of 3.33 mm; while in the straight wall area, the curvature value is 0.1, and the original unit size of 10 mm is maintained. In the transition processing between different encryption intensity areas, gradient units are used to achieve a smooth transition of mesh size. For example, at the boundary between the high curvature area and the medium curvature area, the unit side length gradually transitions from 3.33 mm to 5 mm. The transition area spans 4 layers of units, and the ratio of adjacent unit side lengths is controlled within 1.2 to avoid sudden changes in mesh size.

[0019] S102, by calculating the Gaussian curvature and the average curvature of the mesh vertices, drawing a surface curvature distribution map, judging the defect information at each mesh vertex according to the surface curvature distribution map, and obtaining the surface defect distribution information of the environmentally friendly pulp molded packaging.

[0020] According to the grid vertex coordinates, a spherical neighborhood search is used to obtain a set of points around the vertex, and a local surface function is obtained by fitting a cubic spline surface. The maximum principal curvature value and the minimum principal curvature value at the vertex are solved from the local surface function; pseudo-color mapping is performed on the maximum principal curvature value and the minimum principal curvature value, and if the maximum principal curvature value and the minimum principal curvature value at the vertex are both greater than the grid average curvature positive threshold, the vertex is marked as a convex defect point; the regional growing method of four-neighborhood diffusion is used to cluster vertices with the same marking value and adjacent positions, and the length of the boundary curve and the area of ​​the defective area are obtained from the clustering results; the average curvature value and Gaussian curvature value of the vertices in the defective area are calculated, and the main direction of the area is obtained through the eigenvalue of the regional covariance matrix. If the absolute value of the average curvature is less than the grid average curvature, it is re-marked as a non-defective area.

[0021] Specifically, according to the vertex coordinates of the three-dimensional grid of environmentally friendly pulp molded packaging, a spherical neighborhood search is used to obtain the point set around each vertex, and the search radius is set to three times the average side length of the grid. The local surface function is obtained by fitting the cubic spline surface, and the maximum and minimum principal curvature values ​​of the surface at the vertex are solved based on the surface function. The pseudo-color mapping method is used to draw the curvature distribution heat map, the maximum principal curvature value is mapped to the red channel, and the minimum principal curvature value is mapped to the blue channel. The curvature distribution characteristics are displayed by red and blue superposition. For each vertex position in the heat map, if the maximum and minimum principal curvature values ​​are both greater than the positive three times of the average curvature of the grid, the vertex is marked as a convex defect point and assigned a value of 1. If they are both less than the negative three times of the average curvature of the grid, the vertex is marked as a concave defect point and assigned a value of -1. The remaining vertices are marked as normal points and assigned a value of 0. Based on the vertex marking value, the regional growing method of four-neighborhood diffusion is used to cluster vertices with the same marking value and adjacent positions. The diffusion radius is set to twice the average side length of the grid. When the number of new vertices in the diffusion area is less than the threshold, the diffusion is stopped. According to the clustering results, the geometric features of each clustering area are calculated, including the number of vertices in the area, the length of the boundary curve of the area, and the area of ​​the area. The boundary range of the area is determined by the minimum circumscribed rectangle algorithm. For each clustering area, the average curvature value and Gaussian curvature value of the vertices in the area are calculated, and the main direction of the area is calculated based on the eigenvalue of the covariance matrix. If the absolute value of the average curvature is less than the average curvature of the grid or the Gaussian curvature is negative, the area is re-marked as a non-defective area. For the area marked as defective, a defect feature vector is constructed, including the coordinates of the center of the area, the area of ​​the area, the length of the boundary curve, the average curvature value, and the main direction angle. The defect feature database is established using the defect number index. In the surface defect detection of environmentally friendly pulp molded packaging, curvature analysis is a key technical means. Taking a typical express packaging box as an example, the average side length of its mesh model is 2 mm. When calculating the vertex curvature, a 6 mm spherical neighborhood range is selected to include about 50 adjacent vertices. These vertices are fitted with a cubic spline surface to obtain a local surface function, and then the principal curvature value is solved. In the display of the curvature distribution heat map, the red and blue two-color channel mapping method is used. The maximum principal curvature value between 0.5 and 1 is mapped to a red color scale, and the minimum principal curvature value between -1 and -0.5 is mapped to a blue color scale. Taking the corners of the packaging box as an example, the two principal curvature values ​​there are 0.8 and 0.7, respectively, showing bright red, indicating that there are obvious convex features; while in the concave area, the two principal curvature values ​​are -0.9 and -0.8, respectively, showing dark blue. For the defect marking of the vertex, considering that the average curvature of the mesh is 0.1, the judgment threshold for convex defects is 0.3, and the judgment threshold for concave defects is -0.3. For example, at the indentation of the packaging box, the maximum principal curvature was measured to be -0.35 and the minimum principal curvature was -0.4, both of which were less than the negative threshold, and were determined to be a concave defect and marked as -1.In the process of regional growth clustering, the diffusion radius is set to 4 mm, and the diffusion is stopped when the number of newly added vertices in a round of diffusion is less than 3. Taking an indentation defect as an example, the diffusion starts from the center point. The first round contains 15 defect points, the second round adds 12, the third round adds 8, and the fourth round adds only 2 points, which meets the stopping condition. Finally, the defect area contains 37 vertices. The geometric feature analysis of the clustering area shows that the boundary curve length of the indentation defect area is 28 mm, the area is 48 square millimeters, the major axis of the minimum circumscribed rectangle is 8.5 mm, and the minor axis is 7.2 mm. The covariance matrix calculation shows that the angle between the main direction of the area and the edge of the packaging box is 75 degrees, indicating that this is an oblique indentation. In the defect feature database, a complete feature vector is recorded for each defect area. For example, the characteristic vector of the above indentation defect includes the center coordinates (85.2, 64.3, 15.6), the area of ​​the region is 48, the boundary length is 28, the average curvature is -0.375, and the main direction angle is 75 degrees. These characteristic data provide the basis for the subsequent defect classification and statistical analysis. In the wrinkled area on the surface of the packaging box, although the average curvature absolute value is measured to be 0.4, the Gaussian curvature is -0.15, which is less than zero, indicating that the surface is saddle-shaped and does not belong to the concave-convex defect in the strict sense. Therefore, it is marked as a non-defective area in the final defect database.

[0022] According to the constructed three-dimensional mesh model, the vertex coordinates and topological relationship information of the model are obtained, the first-order and second-order surface parameters of each vertex are calculated, and the average curvature of the vertex is obtained. The calculated vertex curvature values ​​are normalized and mapped to a preset interval. According to the normalized curvature values, corresponding color attributes are assigned to each vertex to generate a surface curvature distribution map.

[0023] A spherical neighborhood search method is used to obtain a set of adjacent points based on the coordinate information of the grid vertices, and the least squares method is used to fit the set of adjacent points to obtain the parameter values ​​of the quadratic surface equation; the principal curvature data of each vertex is solved for the parameter values ​​of the quadratic surface equation, and the reference curvature data is obtained by eliminating the influence of rotation by establishing a local coordinate system based on the vertex normal vector; a vertex curvature histogram is constructed based on the reference curvature data, and a double threshold boundary is set by the percentile method to eliminate outliers, and normalized curvature data is obtained by cubic spline interpolation processing; a mapping relationship with the red, green and blue color components is established for the normalized curvature data, and the weighted average processing of the colors of adjacent vertices is performed using the inverse ratio of the distance between vertices as the weight coefficient to obtain a surface curvature distribution map.

[0024] Specifically, according to the coordinate information of the 3D grid vertices, the search radius is set to three times the average side length of the grid, and a spherical neighborhood search is used to obtain the set of adjacent points around each vertex. The least squares method is used to fit z = ax 2+by2+cxy+dx+ey+f, calculate the first-order derivative and second-order derivative of the surface at the vertex to obtain the initial curvature data. For the initial curvature data, the Gaussian curvature and mean curvature calculation formulas are used to solve the principal curvature value of each vertex. The influence of coordinate rotation is eliminated by establishing a local coordinate system with the vertex normal vector as the z-axis. The six parameters of the surface equation are solved based on the Gaussian elimination method to obtain the benchmark curvature data. According to the benchmark curvature data, a vertex curvature histogram is constructed, and the upper and lower quantiles are set to 95% and 5% as double threshold boundaries. The abnormal curvature that exceeds the threshold range is eliminated, and the curvature data is processed for continuity by cubic spline interpolation to obtain normalized curvature data. For the normalized curvature data, a linear mapping relationship between the curvature value and the red, green and blue color components is established, and the negative curvature interval is set to be mapped to the blue component, the zero curvature interval is mapped to the green component, and the positive curvature interval is mapped to the red component. Based on the color component mapping results, the hue angle mapping method is used to determine the base color of each vertex, and the color saturation is controlled by the curvature value to draw the curvature distribution heat map. The curvature distribution heat map is color-smoothed, and the vertex color weighted average method is used to mix the colors of adjacent vertices. The weight coefficient is inversely proportional to the distance between the vertices. According to the mesh connection relationship between the vertices, the triangle color interpolation method is used to color the mesh facets to achieve continuous visualization of the curvature distribution of the mesh surface. In the three-dimensional mesh curvature analysis, taking a typical mobile phone protective case model as an example, the average mesh side length is 1 mm, and the spherical search radius is set to 3 mm, so that each vertex usually contains 25 to 35 neighboring points around it, which is enough to ensure the accuracy of the surface fitting. When fitting the quadratic surface, for the vertices at the corners of the protective case, the z coordinates of the neighborhood points vary greatly, and the values ​​of the coefficients a and b are usually between 0.4 and 0.6, showing a large curvature feature. In the main curvature calculation stage, the local coordinate system is established by the vertex normal vector, eliminating the coordinate influence caused by the different orientations of the protective case surface. For the flat back panel area, the two principal curvature values ​​are close to 0, while in the side transition area, the absolute value of the principal curvature value can reach 0.3 to 0.5, and can even reach 0.8 at the four corners. These values ​​accurately reflect the geometric characteristics of the product surface. The curvature histogram analysis shows that 95% of the vertex curvature values ​​are distributed in the range of -0.6 to 0.6. This is set as a double threshold boundary, and curvature values ​​outside the range are regarded as outliers and are eliminated. Taking the vertex at a certain edge as an example, its initial curvature value is 1.2, which is obviously beyond the reasonable range. After cubic spline interpolation processing, the curvature value of the vertex is corrected to 0.58, which is more in line with the actual geometric form. In the color mapping stage, RGB color space is used for visual expression.Negative curvature values ​​are mapped to the blue channel, ranging from -0.6 to 0, and the color value range is 0 to 255; the zero curvature interval is mapped to green, ranging from -0.1 to 0.1, and the color value range is 0 to 255; the positive curvature interval is mapped to red, ranging from 0 to 0.6, and the color value range is 0 to 255. This mapping method makes the concave area appear blue, the flat area appears green, and the convex area appears red. In the color smoothing process, for vertex pairs within 2 mm apart, the weight coefficient is used for color mixing. If the distance between two vertices is d mm, the weight coefficient is set to (2-d) / 2, and a gradual transition of color is achieved. For the rounded transition area of ​​the protective shell, this smoothing process makes the curvature change more natural, gradually transitioning from dark red to light green, intuitively showing the continuous change characteristics of the surface. Finally, in the coloring of the triangular mesh facets, the color inside each facet is obtained by vertex color interpolation. Taking a typical triangular patch as an example, the RGB values ​​of its three vertices are (200, 50, 0), (180, 70, 0) and (160, 90, 0) respectively. The color of any point inside the patch is calculated by barycentric coordinate interpolation, so that the curvature distribution map shows good continuity visually.

[0025] S103, extracting the boundary curve of the three-dimensional mesh model, analyzing the local shape characteristics of the boundary curve, if the local shape characteristics of a boundary curve deviate from the typical shape of the preset normal boundary, it indicates that a burr defect exists there, and the burr defect is added to the surface defect distribution information.

[0026] According to the number of adjacent edges of the vertices of the three-dimensional grid, the vertices with two adjacent edges are marked as boundary points, and the initial boundary point sequence is obtained in a clockwise direction through the common edge relationship between the boundary points; for the initial boundary point sequence, a sliding window is used to calculate the angle between the center point and the two end points in the window, and the local morphological characteristics of the boundary curve are obtained through the difference sequence of the angles; for the local morphological characteristics of the boundary curve, a cubic spline curve is used for piecewise fitting, and the inflection point distribution of the boundary curve is obtained according to the continuity of the tangent direction of the curve at the endpoints; for the inflection point of the boundary curve, the difference between the curvature value at the inflection point and the curvature values ​​of the previous and next sampling points is calculated. If the difference exceeds a preset multiple of the curvature standard deviation, it is determined that a burr defect exists at that location.

[0027] Specifically, according to the connection relationship of the vertices of the three-dimensional grid, the vertices with two adjacent edges are marked as boundary points, and the boundary points are connected in a clockwise direction in sequence through the common edge relationship. The initial boundary point sequence is formed based on the constraint condition that the distance between the boundary points is less than the average edge length of the grid. For the initial boundary point sequence, a sliding window with a length of five points is set, and the angle formed by the center point and the two end points in the window is calculated. The continuous change characteristics of the curve are identified through the angle difference sequence to obtain the local morphological characteristics of the boundary curve. The local morphological characteristics of the boundary curve are piecewise fitted, and each segment of the boundary is smoothed using a cubic spline curve. The smoothness of the curve is judged according to the continuity of the tangent direction of the curve at the endpoint. According to the smoothness of the boundary curve, an angle change rate threshold is set. When the tangent angle between two adjacent segments of the curve is greater than the threshold, the point is recorded as the inflection point of the boundary curve, and the inflection point distribution of the boundary curve is obtained. For the inflection point of the boundary curve, the difference between the curvature value at the inflection point and the curvature value of the previous and next sampling points is calculated. If the difference exceeds three times the curvature standard deviation, the point is marked as an abnormal point. Extract the local boundary segment at the abnormal point, calculate the ratio of the length of the boundary curve to the straight-line distance of the segment, and if the ratio exceeds the preset threshold, it is determined that there is a burr defect at this location. For the determined burr defect area, the regional growth method is used to obtain the burr boundary contour, calculate the area, perimeter, and direction vector of the burr area, and construct the burr feature description vector. Based on the burr feature description vector and spatial position information, the surface defect distribution data is updated, and the type identification, position coordinates, and morphological characteristics of the burr defect are recorded. In the boundary defect detection of environmentally friendly pulp molded packaging, the extraction of boundary points is the key first step. Taking a standard express packaging box as an example, the average side length of its grid is 2 mm. When extracting boundary points, the number of adjacent edges of each vertex is checked, and the vertices with two adjacent edges are marked as boundary points. For packaging boxes with complete edges, these boundary points are connected in a clockwise direction to form a closed boundary curve. In the local morphological analysis of the boundary curve, a 5-point sliding window is used for feature extraction. The angle formed by the center point of the window and the two end points is usually between 175 and 180 degrees, showing good continuity. At the burr defect, this angle will be sharply reduced to 90 degrees or even smaller. Taking the burr on the edge of a certain packaging box as an example, the angle sequence of 5 consecutive sampling points is 178 degrees, 175 degrees, 92 degrees, 88 degrees, and 172 degrees, among which the mutation from 92 degrees to 88 degrees clearly indicates the presence of burrs. In the curve fitting stage, the cubic spline curve of the normal boundary segment shows good smoothness, and the tangent direction at the endpoint changes smoothly. Taking a complete edge of the packaging box as an example, the boundary segment with a length of 100 mm is divided into 10 sub-segments for fitting, and the tangent angles between adjacent sub-segments are all less than 5 degrees. In the burr area, the 15 mm long boundary segment needs to be divided into 4 sub-segments, and the tangent angles between adjacent segments reach 25 degrees, reflecting the drastic changes in the curve. For the detected inflection points, further verification is carried out by calculating the curvature difference.In the normal rounded corner transition area of ​​the packaging box, the curvature value at the inflection point is less than 0.2 compared with the curvature of the previous and next sampling points, while at the root of the burr, this difference value often exceeds 0.6, which is more than 4 times the curvature standard deviation of 0.15. The morphological characteristic analysis of burr defects shows that typical burrs have sharp protrusions. By calculating the ratio of the actual length of the local boundary segment to the straight-line distance between the endpoints, the ratio of the normal boundary segment is within 1.1, while the ratio at the burr can reach 1.8 or even higher. For a burr with a length of 8 mm, the perimeter of its boundary contour is 20 mm, the area is 12 square millimeters, and the angle between the direction vector and the normal vector of the packaging box surface is 75 degrees. Finally, in the defect feature database, a complete feature description is recorded for each burr defect, including defect number, spatial coordinates, such as x=85.2, y=64.3, z=15.6, morphological parameters, perimeter, area, direction angle and other information. These data not only reflect the location distribution of the defect, but also describe the geometric characteristics of the defect, providing an important basis for subsequent defect classification and quality control.

[0028] Traverse along the edge of the 3D mesh model to obtain complete boundary curve data, resample the obtained complete boundary curve, calculate the local geometric features of each sampling point on the boundary curve, including curvature and torsion, and characterize the local shape features of the boundary curve.

[0029] The boundary points are determined according to the number of edges of the vertices of the three-dimensional grid, and a boundary point sequence is obtained by searching for the shared edges of the boundary points; the sum of the distances of adjacent points is calculated for the boundary point sequence, and the number of sampling points is determined by the sum of the distances, and the number of sampling points is determined by the average side length of the grid; cubic spline interpolation is performed on the boundary curve according to the number of sampling points, and the tangent direction of the boundary point sequence is used as the endpoint constraint to obtain the sampling point sequence; a Frey internal frame is constructed for the sampling point sequence, and the curvature value and the torsion value are calculated by the Frey internal frame, wherein the curvature value is determined by local arc fitting, and the torsion value is determined by the rotation angle of the normal vector.

[0030] Specifically, according to the connection relationship of the vertices of the three-dimensional grid, the vertices with two edges are marked as boundary points. By searching for the next boundary point that shares an edge with the current boundary point, the distance between vertices is set to be less than the average edge length of the grid and the direction angle is less than forty-five degrees as the connection constraint to obtain the initial boundary point sequence. For the initial boundary point sequence, the distance between adjacent points is calculated and accumulated to obtain the total length of the boundary curve. The sampling interval is set to half of the average edge length of the grid, and the number of sampling points is determined based on the arc length parameter. The boundary curve is resampled using the cubic spline interpolation method with boundary constraints. The interpolation interval is set between two adjacent original boundary points. The tangent direction at the endpoint is consistent with the original boundary, and a dense and uniform sampling point sequence is obtained. For each point in the sampling point sequence, two points before and after are selected to form a five-point fitting interval. The least squares method is used to fit the local arc, and the curvature value at the point is calculated by the inverse of the arc radius. Based on the position coordinates of the sampling point, the finite difference method is used to calculate the tangent vector and normal vector of the curve at the point, and the binormal vector is obtained by cross multiplication operation to construct the Frey internal frame of the space curve. According to the Frey internal frame at the adjacent sampling points, the rotation angle of the normal vector is calculated to obtain the curve torsion, and the curvature value, torsion value, and Frey internal frame direction of the point are recorded as local shape features. The ratio of the distance between the first and last points of the boundary curve to the total length of the curve is calculated, and the integrity and closure of the boundary curve are confirmed by setting the closure judgment threshold. In the boundary feature analysis of environmentally friendly pulp molded packaging, taking a typical express box as an example, the average side length of the grid is 2 mm. In the process of boundary point extraction, a total of 2400 boundary points are marked. These boundary points are screened by connection constraints. The distance between adjacent points must be less than 2 mm, and the direction angle is less than 45 degrees, thereby forming an ordered sequence of boundary points. In the parameterization of the boundary curve, the total length of the calculated curve is 1200 mm, and the sampling interval is set to 1 mm, thereby determining the number of sampling points to be 1200. The sampling process uses the cubic spline interpolation method to insert new sampling points between adjacent original boundary points to ensure the continuity of the curve. For the rounded corner transition area of ​​the express box, the curve length is about 30 mm. 30 new sampling points are inserted in this area to make the curve transition smoother. In the curvature calculation link, taking a typical rounded corner area as an example, a 5-point fitting interval is selected for local arc fitting. For a standard rounded corner with a radius of 20 mm, the curvature value obtained by fitting is stable at around 0.05. At the corners, the curvature value suddenly increases to 0.5, indicating that there is a large change in direction. In this way, the local geometric characteristics of the boundary curve can be accurately captured. The construction process of the Frey internal frame of the space curve shows the three-dimensional characteristics of the curve. At the vertical edge of the express box, the tangent vector is along the edge direction, the normal vector points to the inside of the box, and the binormal vector is parallel to the surface of the box. These three orthogonal vectors change as the position of the curve changes. When the curve turns 90 degrees, the normal vector and the binormal vector also rotate 90 degrees accordingly. The torsion calculation reflects the degree of torsion of the space curve.In the boundary segment within the plane, the torsion is close to 0, while in the transition area between the two surfaces, the torsion value increases significantly. For example, at the edge of the express box, the two adjacent surfaces are at an angle of 90 degrees, and the measured torsion peak reaches 0.4, which indicates that the curve has undergone a severe spatial twist at this point. For the judgment of closure, consider a complete express box top surface boundary with a total length of 800 mm and a distance between the first and last points of less than 4 mm. The ratio of the two is less than 0.005, which is much smaller than the set closure judgment threshold of 0.01. Therefore, the boundary curve is judged to be completely closed. On the contrary, if a break occurs during the boundary extraction process, this ratio will increase significantly, and it will be judged as a non-closed boundary. In the record of local shape features, each sampling point contains a complete feature vector. Taking a sampling point at the edge as an example, the recorded features include position coordinates (85.2, 64.3, 15.6), curvature value 0.5, torsion value 0.4, tangent vector (0.707, 0.707, 0), normal vector (0, 0, 1), and binormal vector (-0.707, 0.707, 0). These data completely describe the geometric characteristics of the boundary curve at this point.

[0031] S104. For local defects such as depressions, protrusions, and burrs in the surface defect distribution information, the defect area, defect depth, and defect length of the local defect region are quantified to obtain key quantitative parameters of various defects. The quantitative parameters are compared with the preset threshold values ​​of the environmentally friendly pulp molded packaging quality standards. If the threshold values ​​are exceeded, the defects are judged as unqualified.

[0032] According to the surface mesh vertex data, the defect area is segmented by the region growing method constrained by neighborhood similarity, and the initial boundary point set of the defect area is obtained by the boundary tracking algorithm; the minimum circumscribed polygon is constructed by the convex hull algorithm for the initial boundary point set of the defect area, and the geometric quantization parameters of the defect area are obtained by calculating the area value of the minimum circumscribed polygon and the arc length of the boundary curve; the surface mesh vertices are extracted according to the geometric quantization parameters of the defect area, and the local reference surface equation of the defect area is obtained by quadratic surface fitting, and the distance value from the vertex in the defect area to the reference surface is calculated; a feature description vector including the defect area, perimeter, maximum depth, average depth, and contour roundness is constructed for the distance value, and the defect category probability value and confidence score of the feature description vector are determined by a support vector machine.

[0033] Specifically, according to the surface defect distribution information, the defect area is segmented by the region growing method constrained by neighborhood similarity, the growth threshold is set to three times the local curvature standard deviation, the defect contour is extracted by the boundary tracking algorithm, and the initial boundary point set of the defect area is obtained. For the boundary point set of the defect area, the convex hull algorithm is used to construct the minimum circumscribed polygon, the area value of the polygon is calculated as the defect area parameter, the perimeter parameter of the defect area is calculated by the arc length of the boundary curve, and the geometric quantitative data of the defect area is recorded. For the defect area, the search radius is set to twice the longest axis of the defect area, the surface mesh vertices within the range are extracted, and the local reference surface equation is obtained by quadratic surface fitting. Based on the local reference surface, the distance from each vertex in the defect area to the reference surface is calculated, the protrusion height is determined by the positive distance, the depression depth is determined by the negative distance, and the burr length is determined by the vertical distance. The defect feature description vector is constructed, which contains five feature components: defect area, perimeter, maximum depth, average depth, and contour roundness. The feature value is mapped to the range of zero to one through normalization preprocessing. The defect feature vector is classified by support vector machine with radial basis kernel function. The kernel function parameters are determined by cross-validation, and the defect category probability value and confidence score are output. The defect parameters are scored based on the preset quality standard threshold. The area parameter weight is set to 0.3, the depth parameter weight is set to 0.4, and the length parameter weight is set to 0.3 to calculate the weighted quality score. The quality score is graded by four-level threshold intervals, and the spatial position, geometric parameters, quality grade, confidence probability and other information of the defect area are recorded in the defect database. In the defect detection of environmentally friendly pulp molded packaging, taking a typical express packaging box as an example, the depressions, protrusions and burrs on its surface have different characteristic manifestations. For the depression defect area, the regional growth method constrained by neighborhood similarity is used for boundary extraction. The standard deviation of the local curvature is 0.15, and the growth threshold is set to 0.45. When the curvature difference of adjacent points exceeds the threshold, the growth stops. In the geometric quantification process of the defect area, taking a typical depression as an example, the minimum circumscribed polygon area obtained by the convex hull algorithm of its boundary point set is 200 square millimeters, and the actual arc length of the boundary curve is 52 millimeters. For a burr defect, the area of ​​its circumscribed polygon is 15 square millimeters and the length of the boundary arc is 18 millimeters. This difference intuitively reflects the scale characteristics of different types of defects. In the construction of the local reference surface, taking the concave defect as an example, its longest axis is 16 millimeters, and the search radius is set to 32 millimeters. About 500 surface mesh vertices are extracted within this range. The reference surface equation obtained by quadratic surface fitting can accurately describe the normal surface morphology around the defect. For the concave area, the maximum negative distance measured is 2.8 millimeters and the average depth is 1.5 millimeters. In the construction of the defect feature vector, the feature quantification results of different types of defects show obvious differences. The outline of the concave defect is usually a relatively regular circle or ellipse, with a roundness value between 0.8 and 0.95.The contour of burr defects is more irregular, and the roundness value is usually less than 0.6. After normalization, these eigenvalues ​​are mapped to the range of 0 to 1. In the defect classification of support vector machine, radial basis kernel function is used, and its parameter is set to 0.8 through cross validation. For a batch of test samples, the recognition accuracy of concave defects reaches 95%, and the confidence is above 0.85. For burr defects with more complex morphology, the recognition accuracy is 88%, and the confidence is between 0.75 and 0.9. In the quality scoring process, the area parameter weight is 0.3, the depth parameter weight is 0.4, and the length parameter weight is 0.3. Taking a concave defect as an example, its normalized area score is 0.75, the depth score is 0.85, the length score is 0.7, and the calculated weighted quality score is 0.78. According to the four-level threshold interval [0.9, 0.8, 0.6, 0.4], the defect is classified as a secondary defect. In the defect database, each defect record contains complete feature information. Typical data records include defect type (depression), center coordinates (85.2, 64.3, 15.6), area 200 square millimeters, maximum depth 2.8 millimeters, average depth 1.5 millimeters, boundary length 52 millimeters, quality level 2, and confidence level 0.92. These data provide important basis for subsequent quality control and process improvement.

[0034] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for intelligent detection and grading of product packaging surface defects, characterized in that: The method comprises: Obtaining discrete point cloud data of the surface of the environmentally friendly pulp molded packaging, removing outliers and noise points in the point cloud data, obtaining preprocessed point cloud data, and connecting the discrete point cloud through triangular facets to generate an initial mesh model based on the preprocessed point cloud data, so as to form a three-dimensional mesh model representing the geometric morphology of the surface of the environmentally friendly pulp molded packaging; By calculating the Gaussian curvature and average curvature of the mesh vertices, a surface curvature distribution map is drawn, and the defect information at each mesh vertex is determined according to the surface curvature distribution map to obtain the surface defect distribution information of the environmentally friendly pulp molded packaging; Extract the boundary curve of the three-dimensional mesh model and analyze the local shape characteristics of the boundary curve. If the local shape characteristics of a boundary curve deviate from the typical shape of the preset normal boundary, it indicates that there is a burr defect at that location. The burr defect is added to the surface defect distribution information. For the local defects such as depressions, protrusions and burrs in the surface defect distribution information, the defect area, defect depth and defect length of the local defect area are quantified respectively to obtain the key quantitative parameters of each defect. The quantitative parameters are compared with the preset threshold values ​​of the environmentally friendly pulp molded packaging quality standards. Those exceeding the threshold range are judged as unqualified.

2. The method according to claim 1, characterized in that The method of obtaining discrete point cloud data of the surface of the environmentally friendly paper pulp molded packaging, removing outliers and noise points in the point cloud data, obtaining preprocessed point cloud data, and connecting the discrete point cloud through triangular facets to generate an initial mesh model according to the preprocessed point cloud data to form a three-dimensional mesh model representing the geometric morphology of the surface of the environmentally friendly paper pulp molded packaging, includes: Obtain the three-dimensional coordinates of the reflective marking points on the surface of the environmentally friendly pulp molded packaging, and the reflective marking points are evenly arranged along the packaging surface; Aligning scan data from different viewing angles according to the three-dimensional coordinates of the marking points to obtain a first set of point cloud data, wherein the scan data from different viewing angles are aligned using a least squares registration algorithm; Performing a spherical neighborhood search on the first set of point cloud data to obtain a second set of point cloud data, wherein the spherical neighborhood search removes abnormal points through dual constraints of a Euclidean distance threshold and a local curvature variance threshold; Calculating local curvature values ​​according to the second set of point cloud data to perform regional partitioning, wherein the regional partitioning uses a Poisson reconstruction method to generate a triangular patch model, wherein the normal vector of the triangular patch model is consistent with the local curvature direction; It also includes: obtaining the initial grid model to be processed, determining the target encryption granularity and refinement degree of the grid model according to preset business requirements, layering the grid model, and encrypting and refining the initial grid model using encryption methods with preset corresponding strengths according to different levels.

3. The method according to claim 2, characterized in that The method of obtaining an initial grid model to be processed, determining a target encryption granularity and refinement degree of the grid model according to preset business requirements, performing layered processing on the grid model, and performing encryption refinement of the initial grid model using an encryption method with preset corresponding strength according to different layers, includes: The curvature value of the grid node is obtained by using the Gaussian curvature calculation formula according to the grid node coordinates, and the grid is divided into three levels of high curvature area, medium curvature area and low curvature area by using the octree space partitioning method to obtain the first grid unit; For the first grid unit, a ratio of the maximum side length to the minimum side length of adjacent units is calculated. If the side length ratio exceeds a preset threshold, a new node is inserted at the center of the unit with the larger side length to obtain a second grid unit. Calculating the local grid topological connection relationship for the newly inserted node in the second grid unit, and using a quadrilateral grid unit division method to establish a connection between the new node and surrounding nodes to obtain a third grid unit; For the third grid unit, the grid is subdivided according to the high curvature area encryption strength coefficient, the medium curvature area encryption strength coefficient, and the low curvature area encryption strength coefficient, and gradient units are inserted between different encryption strength areas to obtain refined grid units.

4. The method according to claim 1, characterized in that The method calculates the Gaussian curvature and the average curvature of the mesh vertices, draws a surface curvature distribution map, and determines the defect information at each mesh vertex according to the surface curvature distribution map to obtain the surface defect distribution information of the environmentally friendly pulp molded packaging, including: A spherical neighborhood search is used to obtain a point set around the vertex according to the coordinates of the grid vertex, a local surface function is obtained by cubic spline surface fitting, and the maximum principal curvature value and the minimum principal curvature value at the vertex are obtained by solving the local surface function; Performing pseudo color mapping processing on the maximum principal curvature value and the minimum principal curvature value, if the maximum principal curvature value and the minimum principal curvature value at the vertex are both greater than the positive threshold of the grid average curvature, marking the vertex as a convex defect point; The four-neighborhood diffusion region growing method is used to cluster the vertices with the same label value and adjacent positions, and the length of the defect region boundary curve and the region area are obtained from the clustering results; Calculate the average curvature value and Gaussian curvature value of the vertices in the defective area, and obtain the main direction of the area through the eigenvalue of the regional covariance matrix. If the absolute value of the average curvature is less than the average curvature of the grid, re-mark it as a non-defective area; The method also includes: obtaining the vertex coordinates and topological relationship information of the model according to the constructed three-dimensional mesh model, calculating the first-order and second-order surface parameters of each vertex, obtaining the average curvature of the vertex, normalizing the calculated vertex curvature values, mapping the curvature values ​​to a preset interval, assigning corresponding color attributes to each vertex according to the normalized curvature values, and generating a surface curvature distribution map.

5. The method according to claim 4, characterized in that The method comprises: obtaining vertex coordinates and topological relationship information of the model according to the constructed three-dimensional mesh model, calculating the first-order and second-order surface parameters of each vertex, obtaining the average curvature of the vertex, normalizing the calculated vertex curvature value, mapping the curvature value to a preset interval, assigning a corresponding color attribute to each vertex according to the normalized curvature value, and generating a surface curvature distribution map, including: A spherical neighborhood search method is used to obtain a set of adjacent points according to the coordinate information of the mesh vertices, and a parameter value of a quadratic surface equation is obtained by fitting the set of adjacent points using a least square method; According to the parameter value of the quadratic surface equation, the principal curvature data of each vertex is solved, and the reference curvature data is obtained by establishing a local coordinate system based on the vertex normal vector to eliminate the rotation effect; Constructing a vertex curvature histogram according to the reference curvature data, using the percentile method to set a double threshold boundary to eliminate outliers, and obtaining normalized curvature data through cubic spline interpolation processing; A mapping relationship between the normalized curvature data and the red, green and blue color components is established, and the inverse ratio of the distance between vertices is used as a weight coefficient to perform weighted averaging processing on the colors of adjacent vertices to obtain a surface curvature distribution map.

6. The method according to claim 1, characterized in that The step of extracting the boundary curve of the three-dimensional mesh model and analyzing the local shape features of the boundary curve, if the local shape features of a boundary curve deviate from the typical form of a preset normal boundary, it indicates that there is a burr defect at that location, and the burr defect is added to the surface defect distribution information, including: According to the number of adjacent edges of the 3D mesh vertices, the vertices with two adjacent edges are marked as boundary points, and the initial boundary point sequence is obtained in a clockwise direction through the common edge relationship between the boundary points; For the initial boundary point sequence, a sliding window is used to calculate the angle between the center point and the two end points in the window, and the local morphological features of the boundary curve are obtained through the difference sequence of the angles; According to the local morphological features of the boundary curve, a cubic spline curve is used for piecewise fitting, and the inflection point distribution of the boundary curve is obtained according to the continuity of the tangent direction of the curve at the endpoints; For the inflection point of the boundary curve, the difference between the curvature value at the inflection point and the curvature values ​​of the previous and next sampling points is calculated, and if the difference exceeds a preset multiple of the curvature standard deviation, it is determined that a burr defect exists at the location; The method also includes: traversing along the edge of the three-dimensional mesh model to obtain complete boundary curve data, resampling the obtained complete boundary curve, calculating the local geometric features of each sampling point on the boundary curve, including curvature and torsion, and describing the local shape features of the boundary curve.

7. The method according to claim 6, characterized in that The method of traversing along the edge of the three-dimensional mesh model to obtain complete boundary curve data, resampling the obtained complete boundary curve, calculating the local geometric features of each sampling point on the boundary curve, including curvature and torsion, and describing the local shape features of the boundary curve, includes: Determine the boundary points according to the number of edges of the three-dimensional mesh vertices, and obtain a boundary point sequence by searching for shared edges of the boundary points; Calculating the sum of distances between adjacent points in the boundary point sequence, and using the sum of distances to determine the number of sampling points, wherein the number of sampling points is determined by the average side length of the grid; Performing cubic spline interpolation on the boundary curve according to the number of sampling points, and using the tangent direction of the boundary point sequence as an endpoint constraint to obtain a sampling point sequence; A Frey internal frame is constructed for the sampling point sequence, and a curvature value and a torsion value are calculated by the Frey internal frame, wherein the curvature value is determined by local arc fitting, and the torsion value is determined by a normal vector rotation angle.

8. The method according to claim 1, characterized in that The defect area, defect depth and defect length of the local defect area are quantified for the local defect defects such as depressions, protrusions and burrs in the surface defect distribution information, respectively, to obtain key quantitative parameters of various defects, and the quantitative parameters are compared with the preset threshold values ​​of the environmentally friendly pulp molded packaging quality standards. If the threshold value is exceeded, it is judged as unqualified, including: According to the surface mesh vertex data, the defect area is segmented by using the region growing method constrained by neighborhood similarity, and the initial boundary point set of the defect area is obtained by using the boundary tracking algorithm; A convex hull algorithm is used to construct a minimum circumscribed polygon for the initial boundary point set of the defect area, and a geometric quantitative parameter of the defect area is obtained by calculating the area value of the minimum circumscribed polygon and the arc length of the boundary curve; Extracting surface mesh vertices according to the geometric quantization parameters of the defect area, obtaining a local reference surface equation of the defect area by quadratic surface fitting, and calculating the distance value from the vertex in the defect area to the reference surface; A feature description vector including defect area, perimeter, maximum depth, average depth and contour roundness is constructed for the distance value, and a defect category probability value and a confidence score of the feature description vector are determined by a support vector machine.

Citation Information

Patent Citations

  • Point cloud defect detection method and device based on grid model

    CN113658166A

  • Improved LCCP point cloud segmentation method based on Gaussian curvature and local concavity and convexity

    CN117152446A

  • Geometric defect detection method for cold-formed section steel based on machine vision

    CN117853419A

  • Crimping pipe burr identification method

    CN117911332A

  • Workpiece surface defect detection and early warning method based on 3D vision

    CN118644456A

Cited By

  • Quality detection system and method for automobile bumper

    CN120741789A

  • Antenna phase shifter surface defect detection method and system

    CN120948550A

  • Three-dimensional reconstruction method and system for embossing depth of specialty paper

    CN121280628A

  • Shoe body quality detection method based on image visual analysis

    CN121459160A

  • Method and system for identifying burrs on surface of high-pressure casting through mechanical arm laser scanning

    CN121582230A