A workpiece surface quality detection method and device based on point cloud analysis, an electronic device, and a storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本发明实施例提供一种基于点云分析的工件表面质量检测方法、装置、电子设备及存储介质,能够解决现有技术中无法准确反映工件表面的真实状况的问题
[0118]本发明实施例提供一种基于点云分析的工件表面质量检测方法、装置、电子设备及存储介质。所述方法首先获取待检测工件的三维点云数据并处理生成规则点云高度图像;接着,从该高度图像中计算生成涵盖基础形貌、复合特征、材料体积和空间特性的四组关键参数;最终,将这些参数组输入预设的多维度加权融合模型得到表面质量综合评分,并依据此评分确定工件的质量等级。
Smart Images

Figure CN120468166B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of workpiece quality inspection technology, specifically to a workpiece surface quality inspection method, device, electronic device, and storage medium based on point cloud analysis. Background Technology
[0002] The surface quality of a workpiece directly affects its performance, lifespan, and reliability, influencing factors such as friction and wear, fatigue resistance, fit accuracy, and appearance. Therefore, accurate surface quality inspection is a crucial aspect of modern precision manufacturing and quality control. Analysis methods based on 3D point cloud data, due to their non-contact and high-precision acquisition of three-dimensional surface morphology information, provide an important technical means for comprehensive surface quality assessment and are increasingly valued and widely used in industrial inspection.
[0003] However, current point cloud-based methods for workpiece surface quality inspection still have limitations in practical applications. These methods often focus on calculating a few statistically significant or highly correlated basic morphological parameters, such as average roughness, to characterize the overall surface profile. While this approach reflects the surface undulations to some extent, it lacks the comprehensive ability to describe complex three-dimensional morphologies and fails to fully reveal the surface's micro-geometric features, texture information in specific directions, and three-dimensional properties related to load-bearing capacity or volume. Therefore, evaluation results relying solely on a limited number of parameters may not be comprehensive or objective enough to accurately reflect the true condition of the workpiece surface. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and storage medium for detecting the surface quality of a workpiece based on point cloud analysis, which can solve the problem that the prior art cannot accurately reflect the true condition of the workpiece surface.
[0005] One embodiment of the present invention provides a workpiece surface quality inspection method based on point cloud analysis, comprising:
[0006] Acquire the 3D point cloud data of the workpiece to be inspected;
[0007] The three-dimensional point cloud data is processed into a grid to generate a regular point cloud height image;
[0008] Based on the rule-based point cloud height image, a basic topographic parameter set is calculated and generated through integral and normalized moment operations.
[0009] Based on the rule-based point cloud height image, a composite parameter set is generated through gradient calculation and curvature extremum calculation;
[0010] The pixel distribution of each height interval in the height image of the regular point cloud is statistically analyzed to generate a height distribution histogram. Based on the height distribution histogram, a load curve is generated with the height value on the vertical axis and the cumulative probability percentage on the horizontal axis.
[0011] Based on the load curve, a set of material volume parameters is calculated and generated using a preset load area ratio threshold.
[0012] Based on the rule-based point cloud height image, a set of spatial parameters is generated through spatial autocorrelation calculation and frequency domain angular spectrum analysis.
[0013] Based on the basic morphology parameter set, the composite parameter set, the volume parameter set, and the spatial parameter set, a comprehensive surface quality score is generated through a preset multi-dimensional weighted fusion model.
[0014] The quality grade of the workpiece to be inspected is determined based on the comprehensive surface quality score.
[0015] Furthermore, the step of calculating and generating a basic topographic parameter set based on the rule-based point cloud height image through integration and normalized moment operations includes:
[0016] Perform global integration on the regular point cloud height image to generate an arithmetic mean height;
[0017] Perform root mean square (RMS) calculation on the regular point cloud height image to generate the root mean square (RMS) height;
[0018] Calculate the third moment of the regular point cloud height image, and perform standardization processing on the calculation result based on the root mean square height to generate skewness;
[0019] Calculate the fourth moment of the regular point cloud height image, and perform normalization processing on the calculation result based on the root mean square height to generate kurtosis;
[0020] The arithmetic mean height, the root mean square height, the skewness, and the kurtosis are used as the basic topographic parameter set.
[0021] The arithmetic mean height is generated using the following formula:
[0022]
[0023] In the formula, S a is the arithmetic mean height; A is the effective area of the regular point cloud height image; (z(x,y) is the height deviation value at coordinates (x,y) in the regular point cloud height image;
[0024] The root mean square height is generated using the following formula:
[0025]
[0026] In the formula, S q The root mean square height;
[0027] The skewness is generated using the following formula:
[0028]
[0029] In the formula, S sk The degree of skewness;
[0030] Kurtosis is generated using the following formula:
[0031]
[0032] In the formula, S su For peak value.
[0033] Furthermore, the step of generating a composite parameter set based on the rule-based point cloud height image through gradient calculation and curvature extremum calculation includes:
[0034] Gradient calculation is performed on the height image of the regular point cloud to generate the root mean square tilt.
[0035] Perform surface integration on the regular point cloud height image to generate the surface unfolded area ratio;
[0036] Curvature extrema detection is performed on the regular point cloud height image to generate the arithmetic mean curvature of the peak vertices;
[0037] The root mean square inclination, the surface unfolded area ratio, and the arithmetic mean curvature of the peak are used as a composite parameter set.
[0038] The root mean square slope is generated using the following formula:
[0039]
[0040] In the formula, S dq The root mean square slope;
[0041] The surface unfolded area ratio is generated using the following formula:
[0042]
[0043] In the formula, S dr The ratio of the surface unfolded area;
[0044] The arithmetic mean curvature of the peak vertices is generated using the following formula:
[0045]
[0046] In the formula, S pcdenoted as , where is the arithmetic mean curvature at the peak; n is the number of curvature maxima.
[0047] Furthermore, the load area ratio threshold includes a first load area ratio threshold and a second load area ratio threshold; the first load area ratio threshold is greater than the second load area ratio threshold.
[0048] The step of calculating and generating a set of material volume parameters based on the load curve and a preset load area ratio threshold includes:
[0049] Perform an integral operation on the region of the load curve above the height corresponding to the first load area ratio threshold to generate the peak material volume;
[0050] Perform an integral operation on the load curve in the region between the first load area ratio threshold and the second load area ratio threshold to generate the core material volume;
[0051] Perform a reverse integration operation on the load curve in the region between the first load area ratio threshold and the second load area ratio threshold to generate the core layer invalid volume;
[0052] Perform an integral operation on the load curve in the region below the height corresponding to the second load area ratio threshold to generate the valley invalid volume;
[0053] The peak material volume, the core layer material volume, the core layer ineffective volume, and the valley ineffective volume are used as a material volume parameter group;
[0054] The peak material volume is generated using the following formula:
[0055]
[0056] In the formula, V mp Z represents the volume of the material at the peak. p1 The height value corresponding to the cumulative probability percentage on the load curve equal to the first load area ratio threshold p1; z max C(z) represents the maximum height of the regular point cloud height image; C(z) represents the cumulative probability percentage of the load curve.
[0057] The core material volume is generated using the following formula:
[0058]
[0059] In the formula, V mc For the core material volume; z p2 This is the height value corresponding to the cumulative probability percentage on the load curve equal to the second load area ratio threshold p2.
[0060] The core layer invalid volume is generated using the following formula:
[0061]
[0062] In the formula, V vc This represents the ineffective volume of the core layer.
[0063] The valley ineffective volume is generated using the following formula:
[0064]
[0065] In the formula, V vv For the ineffective volume of the valley; z min The minimum height of the regular point cloud height image.
[0066] Furthermore, the step of generating a spatial parameter set based on the rule-based point cloud height image through spatial autocorrelation calculation and frequency domain angular spectrum analysis includes:
[0067] Perform spatial autocorrelation function operation on the regular point cloud height image to generate anisotropy index and minimum autocorrelation length;
[0068] Perform frequency domain angular spectrum energy integration on the regular point cloud height image to generate the texture principal direction deviation angle;
[0069] The anisotropy index, the minimum autocorrelation length, and the texture principal direction deviation angle are used as a set of spatial parameters.
[0070] The anisotropy index is generated using the following formula:
[0071]
[0072] In the formula, S tr S is the anisotropy index; al_long S is the vertical offset distance at which the autocorrelation function decays along the principal direction of the texture to a preset autocorrelation decay threshold; al_trans The lateral offset distance when the autocorrelation function decays perpendicular to the main texture direction to a preset autocorrelation decay threshold;
[0073] The minimum autocorrelation length is generated using the following formula:
[0074] S al =min(S) al_long S d_trans )
[0075] In the formula, S al The minimum autocorrelation length;
[0076] The texture principal direction deviation angle is generated using the following formula:
[0077]
[0078] In the formula, θ is the texture principal direction deviation angle; F(r,φ) is the frequency domain amplitude of the regular point cloud height image in polar coordinates; r is the radial frequency; φ is the frequency domain direction angle; r min The radial minimum frequency of the spectral integral; r max φ is the radial maximum frequency of the spectral integral; design The theoretical design direction angle for the surface texture of the workpiece.
[0079] Furthermore, the step of generating a comprehensive surface quality score based on the basic morphology parameter set, the composite parameter set, the volume parameter set, and the spatial parameter set through a preset multi-dimensional weighted fusion model includes:
[0080] The basic morphological parameter set is standardized to generate a morphological feature vector:
[0081] Perform a logarithmic transformation on the composite parameter set to generate a functional feature vector:
[0082] Perform a proportional coupling operation on the material volume parameter set to generate a material distribution vector:
[0083] Perform nonlinear gain processing on the spatial parameter set to generate texture feature vectors:
[0084] The morphological feature vector, functional feature vector, material distribution vector, and texture feature vector are input into a preset multi-dimensional weighted fusion model to generate a comprehensive surface quality score.
[0085] Specifically, the generated morphological feature vector is as follows:
[0086]
[0087] In the formula, F1 is the morphological feature vector; σ a σ is the standard deviation of the arithmetic mean height. q The root mean square height standard deviation; μ sk σ is the mean skewness. sk The standard deviation of skewness; μ ku σ is the mean kurtosis. ku The standard deviation of kurtosis;
[0088] The functional feature vector is specifically:
[0089] F2=[ln(S dq +1),ln(S dr +1),ln(|S pc |+1)]
[0090] In the formula, F2 is the functional feature vector;
[0091] The material distribution vector is specifically:
[0092]
[0093] In the formula, F3 is the material distribution vector; ∈ is the stabilization constant;
[0094] The texture feature vector is specifically:
[0095]
[0096] In the formula, F4 is the texture feature vector; K θ K is the direction deviation gain factor. θ =1+0.5sin 2 θ; α is the texture normalization coefficient; β is the orientation sensitivity coefficient.
[0097] The multi-dimensional weighted fusion model is specifically as follows:
[0098] Q=||w1·F1+w2·F2+w3·F3+w4·F4||
[0099] In the formula, Q is the overall surface quality score; w1 is the weight coefficient of the morphological feature vector; ω2 is the weight coefficient of the functional feature vector; w3 is the weight coefficient of the material distribution vector; and w4 is the weight coefficient of the texture feature vector.
[0100] Furthermore, after performing meshing processing on the 3D point cloud data to generate a regular point cloud height image, the method further includes:
[0101] Calculate the arithmetic mean of the heights of all pixels in the regular point cloud height image to generate the average height;
[0102] For each pixel in the regular point cloud height image, calculate the difference between the height value of the current pixel and the average height, and update the height value of the current pixel with the difference result.
[0103] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0104] An embodiment of the present invention provides a workpiece surface quality detection device based on point cloud analysis, comprising: a three-dimensional point cloud data acquisition module, a point cloud meshing processing module, a basic morphology parameter group generation module, a composite parameter group generation module, a material volume parameter group generation module, a spatial parameter group generation module, a surface quality comprehensive score generation module, and a workpiece quality grade determination module;
[0105] The three-dimensional point cloud data acquisition module is used to acquire the three-dimensional point cloud data of the workpiece to be inspected;
[0106] The point cloud meshing processing module is used to perform meshing processing on the three-dimensional point cloud data to generate a regular point cloud height image;
[0107] The basic topography parameter set generation module is used to calculate and generate the basic topography parameter set based on the rule point cloud height image through integral operation and normalized moment operation.
[0108] The composite parameter group generation module is used to generate a composite parameter group based on the rule point cloud height image through gradient calculation and curvature extremum calculation.
[0109] The material volume parameter group generation module is used to statistically analyze the pixel distribution of each height interval in the regular point cloud height image, generate a height distribution histogram, and generate a load curve with the height value on the vertical axis and the cumulative probability percentage on the horizontal axis based on the height distribution histogram; and calculate and generate the material volume parameter group based on the load curve and a preset load area ratio threshold.
[0110] The spatial parameter set generation module is used to generate a spatial parameter set based on the rule point cloud height image through spatial autocorrelation operation and frequency domain angular spectrum analysis.
[0111] The surface quality comprehensive score generation module is used to generate a surface quality comprehensive score based on the basic morphology parameter group, the composite parameter group, the volume parameter group, and the spatial parameter group through a preset multi-dimensional weighted fusion model.
[0112] The workpiece quality grade determination module is used to determine the quality grade of the workpiece to be inspected based on the comprehensive surface quality score.
[0113] Based on the above method embodiments, the present invention provides corresponding electronic device embodiments.
[0114] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the workpiece surface quality detection method based on point cloud analysis as described in any of the above-described method embodiments.
[0115] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0116] One embodiment of the present invention provides a storage medium storing a computer program thereon, wherein, when the computer program is running, it controls the device where the storage medium is located to execute any of the point cloud analysis-based workpiece surface quality detection methods described in the above-described method embodiments.
[0117] Compared with the prior art, the present invention has the following beneficial effects:
[0118] This invention provides a method, apparatus, electronic device, and storage medium for workpiece surface quality inspection based on point cloud analysis. The method first acquires three-dimensional point cloud data of the workpiece to be inspected and processes it to generate a regular point cloud height image. Next, it calculates four sets of key parameters from this height image, covering basic morphology, composite features, material volume, and spatial properties. Finally, it inputs these parameter sets into a preset multi-dimensional weighted fusion model to obtain a comprehensive surface quality score, and determines the workpiece's quality level based on this score.
[0119] This invention systematically calculates and generates a multi-dimensional parameter set from regular point cloud height images, encompassing composite features of basic morphology, micro-geometry, load-bearing-related material volume properties, and spatial properties of surface texture. This overcomes the shortcomings of existing technologies, which rely on single parameters and thus cannot comprehensively and accurately characterize complex three-dimensional surface morphologies. Furthermore, this solution employs a pre-defined multi-dimensional weighted fusion model to comprehensively evaluate these diverse parameter sets, generating a unified comprehensive surface quality score. This addresses the problems of traditional methods providing one-sided evaluation results and lacking objective and unified evaluation standards, achieving a more accurate and comprehensive assessment of workpiece surface quality. Attached Figure Description
[0120] Figure 1 This is a flowchart illustrating a workpiece surface quality detection method based on point cloud analysis, provided by an embodiment of the present invention.
[0121] Figure 2 This is a schematic diagram of a workpiece surface quality detection device based on point cloud analysis provided in an embodiment of the present invention. Detailed Implementation
[0122] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0123] like Figure 1 As shown, to address the problem that existing technologies cannot accurately reflect the true condition of a workpiece surface, an embodiment of the present invention provides a workpiece surface quality detection method based on point cloud analysis, comprising at least the following steps:
[0124] Step S1: Obtain the 3D point cloud data of the workpiece to be inspected;
[0125] Specifically, high-precision 3D scanning equipment (such as laser scanners or structured light cameras) is used to perform non-contact data acquisition on the surface of the workpiece to be inspected. A complete 3D coordinate dataset of the surface is constructed using multi-view point cloud stitching technology, and noise points and outliers are removed based on point cloud filtering algorithms. Simultaneously, the scanning resolution and field of view are automatically adapted according to the workpiece's geometric features and inspection requirements to ensure complete coverage of key details of the surface microstructure (such as grooves, scratches, and vibration lines). The 3D point cloud data output in this step provides the raw input for subsequent analysis, and its data quality directly affects the reliability of surface parameter calculations.
[0126] Step S2: Perform meshing processing on the three-dimensional point cloud data to generate a regular point cloud height image;
[0127] Specifically, the grid division parameters are determined based on the spatial distribution range of the point cloud data, generating a uniformly distributed two-dimensional grid node array. An interpolation algorithm is used to map the height values of the irregular point cloud to the grid nodes, where the grid spacing is smaller than the minimum sampling step size of the original point cloud to ensure detail preservation. Finally, a height image consistent with the digital image matrix structure is formed, with each pixel value corresponding to the three-dimensional height coordinates of a grid node. This step transforms the discrete point cloud into a regular image structure, providing standardized input for subsequent surface parameter calculations.
[0128] In a preferred embodiment, after performing meshing processing on the 3D point cloud data to generate a regular point cloud height image, the method further includes:
[0129] Calculate the arithmetic mean of the heights of all pixels in the regular point cloud height image to generate the average height;
[0130] For each pixel in the regular point cloud height image, calculate the difference between the height value of the current pixel and the average height, and update the height value of the current pixel with the difference result.
[0131] Specifically, the arithmetic mean of the global pixel height values in the height image is calculated to quantify the overall height offset of the workpiece. Then, a pixel-by-pixel subtraction of the mean height value is performed to eliminate systematic deviations introduced by clamping tilt or z-axis translation, forcibly aligning the height distribution reference plane with the zero plane. This step ensures the objectivity and consistency of surface morphology feature analysis by unifying the parameter calculation benchmark through global height correction.
[0132] Step S3: Based on the rule point cloud height image, calculate and generate a basic topographic parameter set through integration and normalized moment operations;
[0133] In a preferred embodiment, the step of calculating and generating a basic topographic parameter set based on the rule-defined point cloud height image through integration and normalized moment operations includes:
[0134] Perform global integration on the regular point cloud height image to generate an arithmetic mean height;
[0135] Perform root mean square (RMS) calculation on the regular point cloud height image to generate the root mean square (RMS) height;
[0136] Calculate the third moment of the regular point cloud height image, and perform standardization processing on the calculation result based on the root mean square height to generate skewness;
[0137] Calculate the fourth moment of the regular point cloud height image, and perform normalization processing on the calculation result based on the root mean square height to generate kurtosis;
[0138] The arithmetic mean height, the root mean square height, the skewness, and the kurtosis are used as the basic topographic parameter set.
[0139] The arithmetic mean height is generated using the following formula:
[0140]
[0141] In the formula, S a is the arithmetic mean height; A is the effective area of the regular point cloud height image; z(x, y) is the height deviation value at coordinates (x, y) in the regular point cloud height image;
[0142] The root mean square height is generated using the following formula:
[0143]
[0144] In the formula, S q The root mean square height;
[0145] The skewness is generated using the following formula:
[0146]
[0147] In the formula, S sk The degree of skewness;
[0148] Kurtosis is generated using the following formula:
[0149]
[0150] In the formula, S su For peak value.
[0151] Specifically, the arithmetic mean height of the height distribution is obtained through global integration, characterizing the overall surface roughness level; the root mean square height is calculated as a homogenization index reflecting the degree of height dispersion; the third moment and root mean square height standardization based on the height distribution quantify surface asymmetry, and the fourth moment standardization characterizes the sharpness of the height distribution. These four types of parameters are integrated into a basic morphology parameter set, comprehensively covering the surface macro-roughness, distribution symmetry, and peak-valley extreme characteristics, providing a fundamental quantitative basis for surface quality analysis.
[0152] Step S4: Based on the rule point cloud height image, generate a composite parameter set through gradient calculation and curvature extremum calculation;
[0153] In a preferred embodiment, the step of generating a composite parameter set based on the rule point cloud height image through gradient calculation and curvature extremum calculation includes:
[0154] Gradient calculation is performed on the height image of the regular point cloud to generate the root mean square tilt.
[0155] Perform surface integration on the regular point cloud height image to generate the surface unfolded area ratio;
[0156] Curvature extrema detection is performed on the regular point cloud height image to generate the arithmetic mean curvature of the peak vertices;
[0157] The root mean square inclination, the surface unfolded area ratio, and the arithmetic mean curvature of the peak are used as a composite parameter set.
[0158] The root mean square slope is generated using the following formula:
[0159]
[0160] In the formula, S dq The root mean square slope;
[0161] The surface unfolded area ratio is generated using the following formula:
[0162]
[0163] In the formula, S dr The ratio of the surface unfolded area;
[0164] The arithmetic mean curvature of the peak vertices is generated using the following formula:
[0165]
[0166] In the formula, S pc denoted as , where is the arithmetic mean curvature at the peak; n is the number of curvature maxima.
[0167] Specifically, the root mean square value of the surface slope is calculated using gradient field statistics to quantify the steepness of the microstructure and assess frictional performance. The surface unfolding rate is analyzed based on the area ratio of the three-dimensional surface to the projected surface to characterize the impact of complex structures on sealing or lubrication functions. The curvature extrema of the peak region are extracted and their arithmetic mean is calculated to reflect the potential risks of local sharpness to wear resistance and stress distribution. These three types of parameters are integrated into a composite parameter set to characterize the surface functional properties from multiple dimensions, including slope, complexity, and stress concentration. This step, through function-oriented composite parameter design, significantly improves the correlation between surface quality assessment and actual engineering needs.
[0168] Step S5: Statistically analyze the pixel distribution of each height interval in the height image of the regular point cloud, generate a height distribution histogram, and generate a load curve with the vertical axis representing the height value and the horizontal axis representing the cumulative probability percentage based on the height distribution histogram.
[0169] Specifically, the height image pixels are divided into intervals based on height values, and their frequencies are statistically analyzed to generate a histogram representing the density of the height distribution. Based on the histogram data, the probability percentage is accumulated step by step from the lowest height to the highest height, forming a load curve with the cumulative probability on the horizontal axis and height on the vertical axis. This curve visually reflects the cumulative proportion of surface height distribution from the valley to the peak. This step provides basic data support for calculating material volume parameters through probabilistic statistical modeling of the height distribution.
[0170] Step S6: Based on the load curve, calculate and generate a set of material volume parameters using a preset load area ratio threshold.
[0171] In a preferred embodiment, the load area ratio threshold includes a first load area ratio threshold and a second load area ratio threshold; the first load area ratio threshold is greater than the second load area ratio threshold.
[0172] The step of calculating and generating a set of material volume parameters based on the load curve and a preset load area ratio threshold includes:
[0173] Perform an integral operation on the region of the load curve above the height corresponding to the first load area ratio threshold to generate the peak material volume;
[0174] Perform an integral operation on the load curve in the region between the first load area ratio threshold and the second load area ratio threshold to generate the core material volume;
[0175] Perform a reverse integration operation on the load curve in the region between the first load area ratio threshold and the second load area ratio threshold to generate the core layer invalid volume;
[0176] Perform an integral operation on the load curve in the region below the height corresponding to the second load area ratio threshold to generate the valley invalid volume;
[0177] The peak material volume, the core layer material volume, the core layer ineffective volume, and the valley ineffective volume are used as a material volume parameter group;
[0178] The peak material volume is generated using the following formula:
[0179]
[0180] In the formula, V mp Z represents the volume of the material at the peak. p1 The height value corresponding to the cumulative probability percentage on the load curve equal to the first load area ratio threshold p1; z max C(z) represents the maximum height of the regular point cloud height image; C(z) represents the cumulative probability percentage of the load curve.
[0181] The core material volume is generated using the following formula:
[0182]
[0183] In the formula, V mc For the core material volume; z p2 This is the height value corresponding to the cumulative probability percentage on the load curve equal to the second load area ratio threshold p2.
[0184] The core layer invalid volume is generated using the following formula:
[0185]
[0186] In the formula, V vc This represents the ineffective volume of the core layer.
[0187] The valley ineffective volume is generated using the following formula:
[0188]
[0189] In the formula, V vv For the ineffective volume of the valley; z min The minimum height of the regular point cloud height image.
[0190] Specifically, height intervals are defined based on preset thresholds, and the volume distribution of different regions on the surface is quantified through integral calculations. The peak material volume reflects the material distribution density in high-load-bearing areas, the core layer material volume and ineffective volume characterize the effective material ratio and defect porosity of the secondary load-bearing layer, respectively, while the valley ineffective volume describes the volume distribution in low-lying areas. This parameter set analyzes surface characteristics from multiple perspectives, including load-bearing capacity, material uniformity, and potential defects, providing multi-dimensional data support for functional quality assessment.
[0191] Step S7: Based on the rule point cloud height image, generate a spatial parameter set through spatial autocorrelation calculation and frequency domain angular spectrum analysis;
[0192] In a preferred embodiment, the step of generating a spatial parameter set based on the rule point cloud height image through spatial autocorrelation calculation and frequency domain angular spectrum analysis includes:
[0193] Perform spatial autocorrelation function operation on the regular point cloud height image to generate anisotropy index and minimum autocorrelation length;
[0194] Perform frequency domain angular spectrum energy integration on the regular point cloud height image to generate the texture principal direction deviation angle;
[0195] The anisotropy index, the minimum autocorrelation length, and the texture principal direction deviation angle are used as a set of spatial parameters.
[0196] The anisotropy index is generated using the following formula:
[0197]
[0198] In the formula, S tr S is the anisotropy index; al_long S is the vertical offset distance at which the autocorrelation function decays along the principal direction of the texture to a preset autocorrelation decay threshold; al_trans The lateral offset distance when the autocorrelation function decays perpendicular to the main texture direction to a preset autocorrelation decay threshold;
[0199] The minimum autocorrelation length is generated using the following formula:
[0200] S al =min(S) al_long S al_trans )
[0201] In the formula, S al The minimum autocorrelation length;
[0202] The texture principal direction deviation angle is generated using the following formula:
[0203]
[0204] In the formula, θ is the texture principal direction deviation angle; F(r, φ) is the frequency domain amplitude of the regular point cloud height image in polar coordinates; r is the radial frequency; φ is the frequency domain direction angle; r min The radial minimum frequency of the spectral integral; r max φ is the radial maximum frequency of the spectral integral; design The theoretical design direction angle for the surface texture of the workpiece.
[0205] Specifically, the ratio of longitudinal to transverse autocorrelation lengths of surface texture is analyzed through spatial autocorrelation operations to quantify the degree of anisotropy and characterize the consistency of texture orientation. The minimum interval distance at which the autocorrelation function decays to a preset threshold is calculated, reflecting the microscopic repetition period of the surface texture. The main texture orientation is extracted based on the frequency domain angular spectrum energy distribution, and its deviation angle from the theoretical ideal orientation is calculated to evaluate the overall orientation consistency of the processed texture. The spatial parameter set describes the surface texture characteristics from multiple dimensions, including directionality, repetition period, and orientation deviation, providing a quantitative basis for evaluating the stability of the processing technology and the functional characteristics of the texture.
[0206] Step S8: Based on the basic morphology parameter group, the composite parameter group, the volume parameter group, and the spatial parameter group, a comprehensive surface quality score is generated through a preset multi-dimensional weighted fusion model.
[0207] In a preferred embodiment, the step of generating a comprehensive surface quality score based on the basic morphology parameter set, the composite parameter set, the volume parameter set, and the spatial parameter set through a preset multi-dimensional weighted fusion model includes:
[0208] The basic morphological parameter set is standardized to generate a morphological feature vector:
[0209] Perform a logarithmic transformation on the composite parameter set to generate a functional feature vector:
[0210] Perform a proportional coupling operation on the material volume parameter set to generate a material distribution vector:
[0211] Perform nonlinear gain processing on the spatial parameter set to generate texture feature vectors:
[0212] The morphological feature vector, functional feature vector, material distribution vector, and texture feature vector are input into a preset multi-dimensional weighted fusion model to generate a comprehensive surface quality score.
[0213] Specifically, the generated morphological feature vector is as follows:
[0214]
[0215] In the formula, F1 is the morphological feature vector; σ a σ is the standard deviation of the arithmetic mean height. q The root mean square height standard deviation; μ sk σ is the mean skewness. sk The standard deviation of skewness; μ ku σ is the mean kurtosis. ku The standard deviation of kurtosis;
[0216] The functional feature vector is specifically:
[0217] F2=[ln(S dq +1),ln(S dr +1),ln(|S pc |+1)]
[0218] In the formula, F2 is the functional feature vector;
[0219] The material distribution vector is specifically:
[0220]
[0221] In the formula, F3 is the material distribution vector; ∈ is the stabilization constant;
[0222] The texture feature vector is specifically:
[0223]
[0224] In the formula, F4 is the texture feature vector; K θ K is the direction deviation gain factor. θ =1+0.5sin 2 θ; α is the texture normalization coefficient; β is the orientation sensitivity coefficient.
[0225] The multi-dimensional weighted fusion model is specifically as follows:
[0226] Q=||w1·F1+w2·F2+w3·F3+w4·F4||
[0227] In the formula, Q is the overall surface quality score; w1 is the weight coefficient of the morphological feature vector; w2 is the weight coefficient of the functional feature vector; w3 is the weight coefficient of the material distribution vector; and w4 is the weight coefficient of the texture feature vector.
[0228] Specifically, mean-standard deviation standardization maps basic morphological parameters (such as arithmetic mean height and root mean square height) to a unified dimension, eliminating differences in magnitude between parameters; natural logarithmic transformation is applied to composite parameters (such as root mean square slope and surface area ratio) to compress the numerical range and weaken outlier interference; material volume parameters (peak, core, and valley volumes) are coupled according to the proportion of adjacent layers (such as peak volume / core volume, core volume / valley volume) to form a chain-like correlation; and direction sensitivity coefficients (such as 1+0.5*sin) are applied to spatial parameters (anisotropy index and texture deviation angle). 2 The influence of texture orientation deviation on the score is amplified by θ). Finally, the four types of feature vectors are input into a fusion model of a linear weighted formula (with the weights summing to 1) and a nonlinear product term to output a comprehensive score. This step unifies the feature scale and strengthens the contribution of key parameters through mathematical operations, so that the score results are directly related to the actual functional characteristics of the surface.
[0229] Step S9: Determine the quality grade of the workpiece to be inspected based on the comprehensive surface quality score.
[0230] Specifically, the overall surface quality score is converted to a 0-100 point scale using a linear normalization method. The normalization parameters are dynamically calculated based on the maximum and minimum scores of similar workpieces in historical inspection data, ensuring that all scoring results are consistent within a fixed range. Grading thresholds are set according to industry-standard criteria: superior (≥80 points), qualified (60-79 points), and unqualified (<60 points). The system also supports fine-tuning of threshold ranges based on different workpiece types (e.g., sealing surfaces, bearing tracks) (e.g., the threshold for superior sealing surfaces is set at 85 points). The judgment results are transmitted in real-time to the production line sorting system via an industrial communication interface. This drives a robotic arm to deliver superior products to the finishing line, qualified products to the packaging line, and unqualified products trigger audible and visual alarms and are sent to the rework station. The system updates the normalization parameters and thresholds monthly based on the latest inspection data to ensure the rules adapt to changes in production line processes.
[0231] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0232] like Figure 2 As shown, an embodiment of the present invention provides a workpiece surface quality detection device based on point cloud analysis, including: a three-dimensional point cloud data acquisition module, a point cloud meshing processing module, a basic morphology parameter group generation module, a composite parameter group generation module, a material volume parameter group generation module, a spatial parameter group generation module, a surface quality comprehensive score generation module, and a workpiece quality grade determination module;
[0233] The three-dimensional point cloud data acquisition module is used to acquire the three-dimensional point cloud data of the workpiece to be inspected;
[0234] The point cloud meshing processing module is used to perform meshing processing on the three-dimensional point cloud data to generate a regular point cloud height image;
[0235] The basic topography parameter set generation module is used to calculate and generate the basic topography parameter set based on the rule point cloud height image through integral operation and normalized moment operation.
[0236] The composite parameter group generation module is used to generate a composite parameter group based on the rule point cloud height image through gradient calculation and curvature extremum calculation.
[0237] The material volume parameter group generation module is used to statistically analyze the pixel distribution of each height interval in the regular point cloud height image, generate a height distribution histogram, and generate a load curve with the height value on the vertical axis and the cumulative probability percentage on the horizontal axis based on the height distribution histogram; and calculate and generate the material volume parameter group based on the load curve and a preset load area ratio threshold.
[0238] The spatial parameter set generation module is used to generate a spatial parameter set based on the rule point cloud height image through spatial autocorrelation operation and frequency domain angular spectrum analysis.
[0239] The surface quality comprehensive score generation module is used to generate a surface quality comprehensive score based on the basic morphology parameter group, the composite parameter group, the volume parameter group, and the spatial parameter group through a preset multi-dimensional weighted fusion model.
[0240] The workpiece quality grade determination module is used to determine the quality grade of the workpiece to be inspected based on the comprehensive surface quality score.
[0241] It should be noted that the embodiments of the device described above correspond to the embodiments of the present invention described above, and can realize the workpiece surface quality detection method based on point cloud analysis described in any one of the present invention. Furthermore, the embodiments of the device described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort.
[0242] Based on the above-described method embodiments of the present invention, a corresponding embodiment of an electronic device is provided.
[0243] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the workpiece surface quality detection method based on point cloud analysis according to any one of the present invention, or, when the processor executes the computer program, it implements the functions of each module in the above-described device embodiments.
[0244] For example, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the terminal device.
[0245] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0246] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0247] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0248] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments;
[0249] Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute any of the above-described point cloud analysis-based workpiece surface quality detection methods of the present invention.
[0250] The aforementioned storage medium is a computer-readable storage medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0251] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0252] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for inspecting the surface quality of a workpiece based on point cloud analysis, characterized in that, include: Acquire the 3D point cloud data of the workpiece to be inspected; The three-dimensional point cloud data is processed into a grid to generate a regular point cloud height image; Based on the rule-based point cloud height image, a basic topographic parameter set is calculated and generated through integral and normalized moment operations. Based on the rule-based point cloud height image, a composite parameter set is generated through gradient calculation and curvature extremum calculation; The pixel distribution of each height interval in the height image of the regular point cloud is statistically analyzed to generate a height distribution histogram. Based on the height distribution histogram, a load curve is generated with the height value on the vertical axis and the cumulative probability percentage on the horizontal axis. Based on the load curve, a set of material volume parameters is calculated and generated using a preset load area ratio threshold. Based on the rule-based point cloud height image, a set of spatial parameters is generated through spatial autocorrelation calculation and frequency domain angular spectrum analysis. Based on the basic morphology parameter set, the composite parameter set, the volume parameter set, and the spatial parameter set, a comprehensive surface quality score is generated through a preset multi-dimensional weighted fusion model. The quality grade of the workpiece to be inspected is determined based on the comprehensive surface quality score.
2. The workpiece surface quality inspection method based on point cloud analysis as described in claim 1, characterized in that, The step of calculating and generating a basic topographic parameter set based on the point cloud height image according to the rules, through integration and normalized moment operations, includes: Perform global integration on the regular point cloud height image to generate an arithmetic mean height; Perform root mean square (RMS) calculation on the regular point cloud height image to generate the root mean square (RMS) height; Calculate the third moment of the regular point cloud height image, and perform standardization processing on the calculation result based on the root mean square height to generate skewness; Calculate the fourth moment of the regular point cloud height image, and perform normalization processing on the calculation result based on the root mean square height to generate kurtosis; The arithmetic mean height, the root mean square height, the skewness, and the kurtosis are used as the basic topographic parameter set. The arithmetic mean height is generated using the following formula: In the formula, S a is the arithmetic mean height; A is the effective area of the regular point cloud height image; z(x, y) is the height deviation value at coordinates (x, y) in the regular point cloud height image; The root mean square height is generated using the following formula: In the formula, S q The root mean square height; The skewness is generated using the following formula: In the formula, S sk The degree of skewness; Kurtosis is generated using the following formula: In the formula, S su For kurtosis.
3. The workpiece surface quality inspection method based on point cloud analysis as described in claim 2, characterized in that, The step of generating a composite parameter set based on the rule-based point cloud height image through gradient calculation and curvature extremum calculation includes: Gradient calculation is performed on the height image of the regular point cloud to generate the root mean square tilt. Perform surface integration on the regular point cloud height image to generate the surface unfolded area ratio; Curvature extrema detection is performed on the regular point cloud height image to generate the arithmetic mean curvature of the peak vertices; The root mean square inclination, the surface unfolded area ratio, and the arithmetic mean curvature of the peak are used as a composite parameter set. The root mean square slope is generated using the following formula: In the formula, S dq The root mean square slope; The surface unfolded area ratio is generated using the following formula: In the formula, S dr The ratio of the surface unfolded area; The arithmetic mean curvature of the peak vertices is generated using the following formula: In the formula, S pc denoted as , where is the arithmetic mean curvature at the peak; n is the number of curvature maxima.
4. The workpiece surface quality inspection method based on point cloud analysis as described in claim 3, characterized in that, The load area ratio threshold includes a first load area ratio threshold and a second load area ratio threshold; The first load area ratio threshold is greater than the second load area ratio threshold; The step of calculating and generating a set of material volume parameters based on the load curve and a preset load area ratio threshold includes: Perform an integral operation on the region of the load curve above the height corresponding to the first load area ratio threshold to generate the peak material volume; Perform an integral operation on the load curve in the region between the first load area ratio threshold and the second load area ratio threshold to generate the core material volume; Perform a reverse integration operation on the load curve in the region between the first load area ratio threshold and the second load area ratio threshold to generate the core layer invalid volume; Perform an integral operation on the load curve in the region below the height corresponding to the second load area ratio threshold to generate the valley invalid volume; The peak material volume, the core layer material volume, the core layer ineffective volume, and the valley ineffective volume are used as a material volume parameter group; The peak material volume is generated using the following formula: In the formula, V mp z is the volume of the material at the peak. p1 The height value corresponding to the cumulative probability percentage on the load curve equal to the first load area ratio threshold p1; z max C(z) represents the maximum height of the regular point cloud height image; C(z) represents the cumulative probability percentage of the load curve. The core material volume is generated using the following formula: In the formula, V mc For the core material volume; z p2 This is the height value corresponding to the cumulative probability percentage on the load curve equal to the second load area ratio threshold p2. The core layer invalid volume is generated using the following formula: In the formula, V vc This represents the ineffective volume of the core layer. The valley ineffective volume is generated using the following formula: In the formula, V vv For the ineffective volume of the valley; z min The minimum height of the regular point cloud height image.
5. The workpiece surface quality inspection method based on point cloud analysis as described in claim 4, characterized in that, The step of generating a spatial parameter set based on the rule-based point cloud height image through spatial autocorrelation calculation and frequency domain angular spectrum analysis includes: Perform spatial autocorrelation function operation on the regular point cloud height image to generate anisotropy index and minimum autocorrelation length; Perform frequency domain angular spectrum energy integration on the regular point cloud height image to generate the texture principal direction deviation angle; The anisotropy index, the minimum autocorrelation length, and the texture principal direction deviation angle are used as a set of spatial parameters. The anisotropy index is generated using the following formula: In the formula, S tr S is the anisotropy index; al_long S is the vertical offset distance at which the autocorrelation function decays along the principal direction of the texture to a preset autocorrelation decay threshold; al_trans The lateral offset distance when the autocorrelation function decays perpendicular to the main texture direction to a preset autocorrelation decay threshold; The minimum autocorrelation length is generated using the following formula: S al =min(S al_long ,S al_trans ) In the formula, S al The minimum autocorrelation length; The texture principal direction deviation angle is generated using the following formula: In the formula, θ is the texture principal direction deviation angle; F(r, φ) is the frequency domain amplitude of the regular point cloud height image in polar coordinates; r is the radial frequency; φ is the frequency domain direction angle; r min The radial minimum frequency of the spectral integral; r max φ is the radial maximum frequency of the spectral integral; design The theoretical design direction angle for the surface texture of the workpiece.
6. The workpiece surface quality inspection method based on point cloud analysis as described in claim 5, characterized in that, The step of generating a comprehensive surface quality score based on the basic morphology parameter set, the composite parameter set, the volume parameter set, and the spatial parameter set through a preset multi-dimensional weighted fusion model includes: The basic topographic parameter set is standardized to generate a topographic feature vector: Perform a logarithmic transformation on the composite parameter set to generate a functional feature vector: Perform a proportional coupling operation on the material volume parameter set to generate a material distribution vector: Perform nonlinear gain processing on the spatial parameter set to generate texture feature vectors: The morphological feature vector, functional feature vector, material distribution vector, and texture feature vector are input into a preset multi-dimensional weighted fusion model to generate a comprehensive surface quality score. Specifically, the generated morphological feature vector is as follows: In the formula, F1 is the morphological feature vector; σ a σ is the standard deviation of the arithmetic mean height. q The root mean square height standard deviation; μ sk σ is the mean skewness. sk The standard deviation of skewness; μ ku σ is the mean kurtosis. ku The standard deviation of kurtosis; The functional feature vector is specifically: F2=[ln(S dq +1),ln(S dr +1),ln(|S pc |+1)] In the formula, F2 is the functional feature vector; The material distribution vector is specifically: In the formula, F3 is the material distribution vector; ∈ is the stabilization constant; The texture feature vector is specifically: In the formula, F4 is the texture feature vector; K θ K is the direction deviation gain factor. θ =1+0.5sin 2 θ; α is the texture normalization coefficient; β is the orientation sensitivity coefficient; The multi-dimensional weighted fusion model is specifically as follows: Q=||w1·F1+w2·F2+w3·F3+w4 · F4|| In the formula, Q is the overall surface quality score; w1 is the weight coefficient of the morphological feature vector; w2 is the weight coefficient of the functional feature vector; w3 is the weight coefficient of the material distribution vector; and w4 is the weight coefficient of the texture feature vector.
7. The workpiece surface quality inspection method based on point cloud analysis as described in claim 6, characterized in that, After performing meshing processing on the 3D point cloud data to generate a regular point cloud height image, the method further includes: Calculate the arithmetic mean of the heights of all pixels in the regular point cloud height image to generate the average height; For each pixel in the regular point cloud height image, calculate the difference between the height value of the current pixel and the average height, and update the height value of the current pixel with the difference result.
8. A workpiece surface quality inspection device based on point cloud analysis, characterized in that, include: The system includes a 3D point cloud data acquisition module, a point cloud meshing processing module, a basic topography parameter group generation module, a composite parameter group generation module, a material volume parameter group generation module, a spatial parameter group generation module, a surface quality comprehensive score generation module, and a workpiece quality grade determination module. The three-dimensional point cloud data acquisition module is used to acquire the three-dimensional point cloud data of the workpiece to be inspected; The point cloud meshing processing module is used to perform meshing processing on the three-dimensional point cloud data to generate a regular point cloud height image; The basic topography parameter set generation module is used to calculate and generate the basic topography parameter set based on the rule point cloud height image through integral operation and normalized moment operation. The composite parameter group generation module is used to generate a composite parameter group based on the rule point cloud height image through gradient calculation and curvature extremum calculation. The material volume parameter group generation module is used to statistically analyze the pixel distribution of each height interval in the regular point cloud height image, generate a height distribution histogram, and generate a load curve with the height value on the vertical axis and the cumulative probability percentage on the horizontal axis based on the height distribution histogram; and calculate and generate the material volume parameter group based on the load curve and a preset load area ratio threshold. The spatial parameter set generation module is used to generate a spatial parameter set based on the rule point cloud height image through spatial autocorrelation operation and frequency domain angular spectrum analysis. The surface quality comprehensive score generation module is used to generate a surface quality comprehensive score based on the basic morphology parameter group, the composite parameter group, the volume parameter group, and the spatial parameter group through a preset multi-dimensional weighted fusion model. The workpiece quality grade determination module is used to determine the quality grade of the workpiece to be inspected based on the comprehensive surface quality score.
9. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the workpiece surface quality inspection method based on point cloud analysis as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the workpiece surface quality inspection method based on point cloud analysis as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Wall flatness detection method and system based on three-dimensional scanning technology
CN119197391A
Visual inspection and quality evaluation method for small structural component of airplane
CN119354981A