Height feature information generation method and device based on point cloud, equipment and medium

By acquiring and preprocessing 3D point cloud data, fitting the reference plane and calculating the height difference, the problems of low efficiency and poor adaptability in traditional detection methods are solved, and high-precision detection of complex workpiece surfaces is achieved.

CN120765716APending Publication Date: 2025-10-10ZHUHAI RUIXIANG ELECTRONICS
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202511028284.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Traditional contact height measuring instruments are inefficient and easily affected by human operating force, optical equipment is expensive and has poor adaptability, and existing algorithms have poor compatibility, making it difficult to achieve high-precision detection of complex workpiece surfaces.

Method used

By obtaining the three-dimensional point cloud data of the surface of the object to be measured, pre-processing and fitting the reference plane, the height difference data is calculated and the height feature information is generated.

Benefits of technology

It achieves high-precision extraction of tiny height changes on complex surfaces, improves detection efficiency, reduces dependence on high-cost optical equipment, and is compatible with a variety of workpiece morphologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765716A_ABST
    Figure CN120765716A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision detection, and discloses a height feature information generation method, device and equipment based on point cloud and a medium, and the method comprises the steps: obtaining three-dimensional point cloud data of the surface of an object to be detected, carrying out the preprocessing of the data to obtain a target point cloud, and carrying out the reference plane fitting of the target point cloud, and calculating the vertical distance of each point in the target point cloud based on the reference plane obtained by fitting and generating height difference data, and finally extracting and outputting surface height feature information according to the height difference data. According to the method, the three-dimensional point cloud data is subjected to preprocessing noise removal, datum plane accurate fitting and height difference data separation, high-precision extraction of tiny height changes of a complex surface is achieved, the detection efficiency is improved, dependence on high-cost optical equipment is reduced, and the method is compatible with various workpiece shapes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision detection, and in particular to a height feature information generation method and device based on point cloud, equipment and storage medium. BACKGROUND

[0002] In the application scenario of measuring the height of an object surface, the traditional measurement method still has many technical bottlenecks. Although contact height measuring instruments (such as micrometers) are widely used in dimensional accuracy measurement, they are low in efficiency in actual operation, and the measuring head is easily affected by human operation force, surface roughness and other factors when in contact with the workpiece surface, resulting in a large error in the measurement result, especially for workpiece surfaces with small undulations or complex structures.

[0003] With the development of non-contact detection technology, optical sensors such as laser height meters have been used to improve the measurement accuracy and automation level, but such devices are high in cost and sensitive to the reflection characteristics, color changes and geometric structures of different material surfaces, making it difficult to achieve stable detection of complex curved surfaces or diversified workpieces. In addition, some height detection schemes based on photoelectric sensors or multi-coupling arrays are often customized for specific structures or shapes, and have poor compatibility, making it difficult to flexibly adapt to workpieces with different height specifications or different surface morphologies, thereby limiting the application range.

[0004] On the other hand, there is currently a lack of a high-efficiency, low-cost general detection method for multiple types of workpiece surfaces. Especially when facing objects with irregular topography or uneven surfaces, traditional methods have a large technical gap in data processing and feature extraction, making it difficult to accurately identify and quantify the small height differences on the surface, which seriously restricts the promotion and application of automated detection in actual industrial scenarios. SUMMARY

[0005] The main purpose of the present application is to provide a height feature information generation method and device based on point cloud, equipment and storage medium, which aims to solve the technical problems of contact force error of traditional contact height measurement, poor adaptability of high-cost optical devices, and low detection accuracy, poor efficiency and limited applicability caused by poor compatibility of existing algorithms.

[0006] To achieve the above purpose, the present application provides a height feature information generation method based on point cloud, comprising: obtaining three-dimensional point cloud data of a to-be-measured object surface; preprocessing the three-dimensional point cloud data to obtain target point cloud; fitting the target point cloud to generate a reference plane; based on the reference plane, obtaining height difference data of each point in the target point cloud to the reference plane; Height characteristic information of the surface of the object to be measured is generated according to the height difference data.

[0007] Furthermore, to achieve the above-mentioned purpose, the present invention provides a device for generating height feature information based on point cloud, comprising: A data acquisition module is used to obtain three-dimensional point cloud data of the surface of the object to be measured; A point cloud preprocessing module, used to preprocess the three-dimensional point cloud data to obtain a target point cloud; A plane fitting module, used for fitting the target point cloud to generate a reference plane; A height difference calculation module is used to obtain height difference data from each point in the target point cloud to the reference plane based on the reference plane; The feature extraction module is used to generate height feature information of the surface of the object to be measured based on the height difference data.

[0008] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a memory, a processor, and a point cloud-based height feature information generation program stored in the memory and runnable on the processor. When the point cloud-based height feature information generation program is executed by the processor, the steps of the point cloud-based height feature information generation method as described above are implemented.

[0009] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a point cloud-based height feature information generation program is stored. When the point cloud-based height feature information generation program is executed by a processor, the steps of the point cloud-based height feature information generation method as described above are implemented.

[0010] Beneficial effects: The present invention relates to the field of computer vision detection technology, and discloses a method, device, equipment, and medium for generating height feature information based on point clouds, including: acquiring three-dimensional point cloud data of the surface of an object to be measured and preprocessing the data to obtain a target point cloud, then fitting the target point cloud to a reference plane, calculating the vertical distance of each point in the target point cloud based on the fitted reference plane and generating height difference data, and finally extracting and outputting surface height feature information based on the height difference data. The present invention achieves high-precision extraction of tiny height changes on complex surfaces by preprocessing three-dimensional point cloud data to remove noise, accurately fitting the reference plane, and separating the height difference data, thereby improving detection efficiency, reducing dependence on high-cost optical equipment, and being compatible with a variety of workpiece morphologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1A schematic diagram of an application environment of a method for generating height feature information based on point clouds in an embodiment of the present invention; Figure 2 1. A flow chart of an embodiment of a method for generating height feature information based on point clouds according to the present invention; Figure 3 Schematic diagram of functional modules of a preferred embodiment of a device for generating height feature information based on point cloud according to the present invention; Figure 4 A schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0012] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0013] The method for generating height feature information based on point cloud provided by the embodiment of the present invention can be applied in the following fields: Figure 1 in an application environment, wherein the user terminal communicates with the server terminal through a network. The server terminal can obtain the three-dimensional point cloud data of the surface of the object to be measured through the user terminal and pre-process it to obtain the target point cloud, then perform reference plane fitting on the target point cloud, calculate the vertical distance of each point in the target point cloud based on the fitted reference plane and generate height difference data, and finally extract and output the surface height feature information based on the height difference data. The present invention achieves high-precision extraction of small height changes on complex surfaces by pre-processing the three-dimensional point cloud data to remove noise, accurately fit the reference plane and separate the height difference data, thereby improving detection efficiency, reducing dependence on high-cost optical equipment, and being compatible with a variety of workpiece morphologies. Among them, the user terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server terminal can be implemented with an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.

[0014] See also Figure 2 , Figure 2 This is a flow chart of an embodiment of a method for generating height feature information based on point clouds provided by the present invention. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0015] like Figure 2 As shown, the method for generating height feature information based on point cloud proposed in the present invention includes the following steps: S10, obtaining three-dimensional point cloud data of the surface of the object to be measured; In this embodiment, to achieve fine height difference measurement of surfaces with complex structures or concave-convex textures, it is necessary to first collect three-dimensional spatial information. This process aims to obtain three-dimensional point cloud data of the surface of the object to be measured. It combines multi-source information fusion with spatial geometry reconstruction to ensure that subsequent processing is based on high-density, high-precision raw data.

[0016] The process of acquiring three-dimensional point cloud data generally includes two stages: spatial information collection and data format conversion. First, a non-destructive scanning operation is required on the surface area of ​​the target object to ensure that data collection does not rely on physical contact and avoid interference from contact errors. The collection of spatial information can be carried out by a line laser scanning device based on an optical reflection mechanism. During the scanning process, this type of device emits a laser beam to illuminate the surface of the object, and at the same time records the position, intensity and change trajectory of the reflected light spot, thereby determining the surface contour of the object in space. The reflected light spot information not only contains geometric position information, but also carries reflectivity changes, which is used to assist in judging the surface material characteristics. In order to improve the spatial coverage and three-dimensional geometric restoration of the data, a binocular visual imaging device is configured to simultaneously collect images of the target object from multiple perspectives. The multi-perspective images are used to construct the texture features and depth estimation data of the object surface, and participate in the construction of a dense point cloud.

[0017] After completing the acquisition of the original image and laser reflection data, the system needs to establish a unified three-dimensional coordinate system as the basic spatial framework for point cloud fusion and data normalization. This coordinate system usually uses the reference plane of the scanning device as the reference origin, and sets the coordinate axis direction along the direction of the equipment's robotic arm or the optical baseline, so that each spatial point in the point cloud is uniquely identified. The reflection points and image feature points need to be jointly solved through image matching, spatial geometric reconstruction, or depth regression to obtain spatial three-dimensional coordinates to form a spatial position vector in the point cloud. The coordinate sets generated by multiple sources need to be aligned and integrated according to the global coordinate system to complete the preliminary construction of the three-dimensional point cloud structure.

[0018] To facilitate subsequent processing and analysis, the generated 3D point cloud needs to be stored and transmitted in a specific data format. Commonly used formats include PLY, PCD, OBJ, etc. After the data is transmitted to the graphics processing unit or dedicated data processing module, it will serve as the basic input for subsequent reconstruction and analysis.

[0019] In industrial processes, to improve the efficiency and accuracy of 3D point cloud data acquisition, a pulsed line laser projection system can be selected to work in conjunction with a CMOS high-speed image sensor. Through a synchronous trigger control module, the time coordination of laser emission and image acquisition can be achieved, ensuring that the laser reflection point is clearly imaged within the image frame and has spatial positioning capabilities.

[0020] Alternatively, structured light projection can be used to project a coded pattern or fringe pattern onto the surface of the object being measured. This distortion can be used to recover spatial depth information, making it suitable for scenes with complex textures or smooth reflective surfaces. To accommodate targets of varying sizes and materials, the sensor's focal length, exposure time, and sampling accuracy can be dynamically adjusted. In conjunction with a 3D vision calibration model, the acquisition system can be rapidly calibrated to improve the consistency of point cloud coordinates.

[0021] When organizing point cloud data, spatial index structures such as octrees or KD trees can be used for hierarchical storage and rapid retrieval of data points, accommodating the local geometric operations required for neighborhood points during subsequent processing. To meet the real-time requirements of high-frequency production lines, edge computing modules can be deployed to pre-process the collected images and reflection information, transmitting only sparse point clouds composed of key feature points or compressed data blocks, thereby reducing transmission latency and conserving storage bandwidth.

[0022] Example: A precision metal component is tested, and its surface exhibits multiple stepped structures and localized recessed areas. Using an acquisition platform comprised of a high-precision laser scanner and a binocular vision system, the component is scanned synchronously from multiple perspectives. During the scanning process, the laser moves at a constant speed along the scanning track, recording reflection intensity and angle information. The image acquisition system simultaneously captures image frames from different perspectives. The system automatically establishes a three-dimensional coordinate system and converts all collected reflection points and image points into three-dimensional spatial point coordinates. After coordinate fusion, a point cloud dataset with uniform density and complete structure is generated, serving as the initial data foundation for component height feature modeling.

[0023] This embodiment, through the construction of a non-contact multi-source perception system, accurately captures 3D surface topography without relying on physical contact, avoiding deformation and positioning errors caused by contact measurement. Furthermore, by fusing multi-view images with laser scanning data, it comprehensively captures the complex contours and height variations of target objects, improving point cloud density and measurement accuracy, and providing a complete, high-quality data foundation for subsequent surface feature extraction.

[0024] S20, preprocessing the three-dimensional point cloud data to obtain a target point cloud; In this embodiment, to improve the structural integrity and analytical accuracy of 3D point cloud data, preprocessing is required after point cloud acquisition to obtain a target point cloud that meets the analysis criteria. This process primarily involves data noise reduction, coordinate transformation, density balancing, region extraction, and normalization, aiming to eliminate invalid information, unify data formats, and enhance structural stability.

[0025] Data denoising is mainly aimed at the discrete isolated points in the point cloud due to sensor errors, light interference or background reflections. Such points are usually significantly distant from the surrounding points and lack neighborhood consistency. By calculating the neighborhood density of each point or constructing a local plane residual model, abnormal isolated points can be identified and removed. Implementations can include Euclidean clustering, radius filtering or mean distance-based rejection algorithms, with the goal of retaining a high-quality point set that constitutes the surface structure of the object.

[0026] Coordinate conversion is used to unify the point cloud data to a specified reference coordinate system. Due to the differences in relative positions of multiple-view acquisition and sensors, the original point cloud may be distributed in multiple local coordinate systems. Through the extrinsic parameter matrix and the intrinsic parameter model, all points can be converted into a unified three-dimensional coordinate system. This process needs to ensure that the spatial structure of the points remains unchanged, while ensuring that all points have spatial consistency and comparability.

[0027] Density equalization is to solve the problem of uneven point cloud density in different areas, especially in high reflection areas or edge structures, where point cloud distribution often appears sparse or accumulates. Voxel grid method or resampling algorithm can be used for spatial redistribution, projecting the original point cloud into a fixed-size spatial grid, calculating the representative point of each grid, so that the point cloud density tends to be consistent in the overall range, improving the stability of subsequent fitting and analysis.

[0028] After the point cloud is processed as described above, the effective area corresponding to the target surface needs to be extracted from the overall data. This extraction process can filter out the subset area with continuity and flatness based on spatial distribution threshold, normal angle analysis or boundary recognition method. For the extracted point set, coordinate normalization operation is also needed to unify its spatial scale to a standard interval (such as [-1, 1]) to eliminate numerical bias caused by size difference and improve the model's adaptability to different objects.

[0029] Finally, after the above multi-stage processing, a target point cloud with continuous structure, balanced density, consistent scale and good alignment is generated, providing reliable data input for subsequent surface analysis, geometric fitting and other operations.

[0030] In the point cloud denoising process, a fixed neighborhood search algorithm can be used to set a radius range and calculate the number of neighboring points for each point. When the number of neighbors of a point is below a certain threshold, it is determined to be a noise point and is removed. The normal vector deviation of a point can also be calculated based on the local curvature variation to exclude points that deviate significantly from the local trend.

[0031] In the coordinate conversion stage, an extrinsic parameter calibration matrix between sensors can be established to map local point cloud coordinates to a global system through homogeneous coordinate transformation. If the acquisition platform supports laser and vision fusion calibration, a chessboard calibration board or a three-dimensional calibration block can also be used for precise registration.

[0032] In density equalization, voxel filtering constructs a 3D grid structure, performing centroid calculations on the points within each grid cell, retaining only the representative centroid points to reduce the number of points and improve spatial uniformity. Local resampling algorithms can also be used to downsample dense areas and interpolate sparse areas.

[0033] When extracting valid surface areas, we can use the region growing method, starting from an initial flat seed point, to expand the region based on normal consistency and distance continuity, removing data from edges, holes, or shadow areas. During the normalization phase, we can use the maximum and minimum normalization algorithm to scale the values ​​on each coordinate axis to a preset range, ensuring that the overall size of the point cloud matches the subsequent analysis framework.

[0034] Example: When performing point cloud analysis on an injection mold component with multiple holes and grooves, the original data contains a large amount of noise along the edges, and point cloud accumulation occurs in reflective areas. Low-density point clusters are eliminated by setting a 5mm radius neighborhood, and the data from different acquisition directions is converted to a unified coordinate system using laser-camera calibration parameters. Balanced sampling is then performed using a 2mm voxel grid, and a regional normal consistency strategy is used to extract continuous planar regions. Finally, normalization is performed to obtain a structurally complete target point cloud, ensuring the robustness and stability of the subsequent plane fitting and feature analysis processes.

[0035] This embodiment uses a multi-stage point cloud preprocessing process to not only effectively eliminate abnormal noise and discrete data that affect fitting quality, but also unify the spatial coordinate system and point cloud density distribution, so that subsequent plane fitting and height feature extraction are based on highly consistent and robust data, thereby improving overall measurement accuracy and structural restoration capabilities.

[0036] S30, fitting the target point cloud to generate a reference plane; In this embodiment, the target point cloud refers to a collection of discrete points in three-dimensional space that has undergone noise reduction, coordinate unification, density equalization, and region filtering. This collection reflects the true geometric structure of the surface of the object being measured. To further analyze this geometry, a reference plane is constructed from the target point cloud. This plane is defined as the reference plane and is used for subsequent height difference quantification and surface relief modeling.

[0037] The key to generating a reference plane lies in fitting the primary geometric trends in the target point cloud using a mathematical model, typically employing the least-squares plane fitting method. This method minimizes the sum of the squared perpendicular distances from all points to the plane to determine the optimal plane parameters, ensuring that the fitted plane closely matches the overall shape of the target point cloud. The mathematical model for fitting is generally ax + by + cz + d = 0, where (a, b, c) are the normal vector coefficients and d is the distance offset from the plane to the origin. Since point cloud data has three-dimensional spatial coordinates, algorithms such as singular value decomposition (SVD) and principal component analysis (PCA) can be used to extract the primary directions for efficient fitting.

[0038] To enhance the robustness and physical significance of the fitting results, a point cloud normal consistency analysis can be performed before fitting to eliminate areas of abnormal deviation and use only the main surface points for the fitting calculation. Furthermore, the orientation of the fitting plane can be controlled based on regional weighting, spatial distribution assessment, or height distribution trends to ensure a closer fit to the main surface features of the workpiece. For example, for point cloud regions with subtle inclinations but slight curvature, a fitting weight matrix can be defined to introduce a local smoothing penalty term to control the fitting direction and prevent abnormal local structures from deviating from the plane's orientation.

[0039] The final result of the fitting process is a plane equation with a normal vector direction and spatial position. This plane serves as a geometric reference in the target point cloud space. All subsequent height difference extraction, relief modeling, and surface anomaly detection rely on this reference plane as a vertical reference.

[0040] During the generation of the reference plane, principal component analysis can be used to calculate the covariance matrix of the target point cloud. Eigenvalue decomposition is then used to extract the minimum principal axis direction as the plane normal vector, thereby determining the orientation of the fitted plane. Furthermore, the complete plane equation can be solved based on the coordinates of the target point cloud's centroid combined with the normal vector direction.

[0041] If the target point cloud has multiple regions or surface discontinuities, regional clustering can be performed first to divide the point cloud into multiple structurally consistent subsets. Local planes can be fitted to each subset, and then a weighted average strategy can be used to synthesize the overall reference plane. The RANSAC algorithm can also be used to improve outlier resistance. It iteratively identifies the point set that best matches the plane trend within a large number of point clouds, eliminating interfering data and improving fitting accuracy.

[0042] In industrial application scenarios, spatial constraints can also be superimposed during the fitting process. For example, only points whose Z-axis coordinate changes are within a set range are included in the fitting, or the normal direction must be set to the sensor acquisition direction, thereby enhancing the spatial consistency between the fitting results and the actual measurement system.

[0043] Example: When performing height analysis on the surface of a metal plate with a slight tilt error, the target point cloud collected is distributed on an inclined spatial plane with several edge discontinuities. Principal component analysis is used to extract the principal directions of the point cloud, constructing a covariance matrix containing the maximum directional differences. By extracting the eigenvector corresponding to the minimum eigenvalue as the normal vector, a reference plane approximately perpendicular to the point cloud surface is calculated. The reference plane equation is embedded in the subsequent height difference calculation for each point, achieving standardized height measurement and providing an accurate benchmark for defect area identification and machining error estimation.

[0044] This embodiment generates a reference plane based on target point cloud fitting, extracting a geometric reference with engineering reference value from a large number of unstructured spatial points. This not only provides a unified spatial reference for height difference calculations but also enhances the structural stability of the data. This operation effectively improves the robustness and accuracy of subsequent relief analysis and local anomaly detection, and resolves the problem of calculation offset caused by uneven point cloud distribution and complex surface topography.

[0045] S40, based on the reference plane, obtaining height difference data from each point in the target point cloud to the reference plane; In this embodiment, based on the constructed reference plane, it is necessary to further extract the vertical distance of each point in the target point cloud relative to the plane to form height difference data reflecting the degree of surface undulation. Each three-dimensional point has a clear coordinate representation in space, usually recorded as (x, y, z), while the reference plane has a standardized plane equation consisting of the normal vector (a, b, c) and the intercept d: ax + by + cz + d = 0. Substituting the coordinates of the point into the plane equation and combining it with the normal vector modulus normalization process, the formula for calculating the vertical distance from the point to the plane can be obtained. Its physical meaning is the degree of deviation of the point from the reference plane in the normal direction.

[0046] This calculation must be implemented to ensure that the plane equation is normalized to eliminate distance errors caused by different normal vector scales, thereby improving overall data consistency. To improve the tolerance of height difference calculations to local offsets, measurement errors, and system installation skew, a dynamic compensation mechanism can be introduced to the original distance value. For example, the plane intercept term can be adjusted based on the local statistical characteristics of the target point cloud (such as centroid offset, distribution density gradient, and regional mean), making the plane have a certain degree of adaptive adjustment ability to non-ideal conditions.

[0047] The calculated vertical distance values ​​form a set of spatial scalar data sets, which can not only be used directly to reflect the height fluctuation state of the object surface, but can also be further statistically classified, such as generating statistics such as maximum height difference, standard deviation, and mean shift, for quantitative analysis of the flatness or local abnormal characteristics of the object surface.

[0048] For structured management of height difference data, it can be organized using a key-value structure of point coordinates and corresponding height differences, a gridded depth matrix, or a spatial heat map, thus supporting subsequent processing by various analysis modules and visualization tools. This process transforms the original spatial point set into a data set with an explicit geometric difference representation, serving as a key intermediary for steps such as height modeling, texture mapping, and defect identification.

[0049] In practice, the 3D coordinates of all target point clouds are first substituted into the normalized reference plane equation to calculate the normal distance from each point to the plane. These raw distance values ​​are then normalized and corrected according to predefined rules, such as by subtracting the average offset or performing linear translation compensation based on a set of reference points.

[0050] In order to improve the spatial continuity of height difference data, the height difference of each point can be mapped to a two-dimensional coordinate plane based on the point cloud projection method to form a contour map or surface difference map, and then bilateral filtering or Gaussian smoothing can be performed to reduce the error interference caused by local mutations.

[0051] A block distance statistics strategy based on regional clustering can also be introduced to partition the point cloud according to its projection position, and calculate the mean and standard deviation in each area to reflect the surface height fluctuation characteristics of different areas. This is suitable for detecting uneven distribution or local deformation of workpieces.

[0052] Example: When performing surface analysis on an engineering plastic sheet with a micro-corrugated structure, a reference plane was determined using the PCA method. The collected point cloud data was then substituted into the normalized plane equation to obtain the height difference of each point relative to the reference plane. The analysis results showed that the height difference in the central area was concentrated within a range of ±0.05mm, while the maximum at the edge reached 0.12mm. Combined with local distribution statistics, it was speculated that mold stress deformation may have occurred at the edge. Mapping this height difference data into a two-dimensional grayscale image visually presented fluctuating and uniform areas, serving as an important basis for determining surface consistency and making rework decisions.

[0053] This embodiment extracts the height difference of each point in the target point cloud relative to a reference plane, not only accurately measuring the geometric undulations of the object's surface, but also providing quantifiable geometric input for subsequent quality assessment, defect analysis, and topography modeling. This process builds a bridge from discrete points to continuous spatial structures, effectively avoiding the mechanical perturbations inherent in contact measurement and circumventing the adaptability limitations of high-cost optical equipment to complex surface morphologies.

[0054] S50: Generate height feature information of the surface of the object to be measured according to the height difference data.

[0055] In this embodiment, after obtaining the height difference data of each point in the point cloud relative to the reference plane, it is necessary to further convert this raw geometric deviation information into height feature information reflecting the surface topography to support downstream tasks such as surface structure identification, quality analysis, or process judgment. Height difference data is composed of a set of distances between discrete spatial points and a reference plane. It is inherently primitive, localized, and unstructured. Direct use cannot accurately depict the overall surface characteristics. Therefore, it requires structural representation through modeling, feature extraction, and visualization conversion.

[0056] First, the height difference data is parsed into a standardized set of values ​​to eliminate the effects of errors such as coordinate scale and angle offset, and a height distribution model is constructed in a unified reference frame. This model can be represented by a voxelized grid, a discretized distribution matrix, or a sparse function to reflect the microscopic fluctuation trends of the target surface at both local and global scales.

[0057] Next, geometric features are extracted based on the height distribution model. For example, by calculating the maximum height difference, range, standard deviation, skewness coefficient, and surface roughness indicators, information such as surface uniformity, fluctuation, tilt, and periodicity of the target area can be characterized. These parameters not only reflect the distribution characteristics of the geometric structure but also have discriminative properties that can be used to determine defects, mold offset, or wear.

[0058] At the same time, visualization maps, such as heat maps, pseudo-color maps, or 3D height field models, can be constructed based on height data to enhance the intuitive expression of height differences and assist in the judgment of manual inspection or machine recognition systems. This map can preserve the local characteristics of height gradients, regional boundaries, and abnormal areas, thereby supporting rapid comparison and trend analysis of surface conditions.

[0059] Finally, by structured integration of the above parameters and atlas information, highly characteristic information with spatial consistency, scale adaptability and interpretability is generated, which can serve as the input basis for multiple modules such as structural modeling, parameter detection, and process control.

[0060] One implementation approach is to map all compensated distance values ​​onto a two-dimensional plane, constructing a two-dimensional height map using the (x, y) projection of the target point as the horizontal and vertical coordinates and the height difference as the grayscale or color value. This height map is then processed using a convolution filter or bilateral filter to eliminate isolated regions of sudden change, improving image smoothness and boundary definition. For feature extraction, the image histogram can be used to analyze fluctuations and extract multi-order statistics to represent the overall surface profile characteristics.

[0061] Three-dimensional modeling can also be used to reconstruct the point cloud and its height values ​​into a highly textured triangular mesh model. Through geometric processing methods such as surface fitting, curvature analysis, and gradient direction extraction, parameters such as convex point position, groove distribution, and tilt angle direction can be extracted to characterize the surface microstructure.

[0062] It is also possible to construct machine learning input feature vectors based on height difference statistics, compare different known height patterns in the standard sample library, and implement intelligent classification and regression prediction of height categories or anomaly types, which is suitable for batch screening tasks of complex workpieces.

[0063] Example description: When inspecting the surface of a group of die-cast aluminum shells, the height difference data between them and the reference plane was obtained. This data was input into the three-dimensional height field modeling module to generate a surface morphology model with a microscopic undulating structure. The maximum height difference, surface roughness value and regional tilt direction parameters were extracted through the model, and it was found that the height distribution of a certain port area had obvious asymmetry, which was judged to be a local protrusion problem caused by incomplete mold closure. The area was presented in the form of a heat map at the quality control terminal, realizing intuitive and discernible quality visualization output. This height feature information was then used to generate rework suggestions and process adjustment parameters, reflecting its key role in the manufacturing feedback link.

[0064] This embodiment, through the analysis and modeling of height difference data, accurately extracts geometric indicators and visualization results that reflect surface structural features, significantly improving the ability to quantitatively describe surface conditions and the efficiency of judgment. This process converts discrete measurement values ​​into structured, high-information-density surface height feature information, providing a highly adaptable and expressive processing method for the measurement and analysis of complex topography, reducing reliance on costly equipment and manual experience.

[0065] The present invention relates to the field of computer vision detection technology, and discloses a method, apparatus, device, and medium for generating height feature information based on a point cloud. The method comprises: obtaining three-dimensional point cloud data of the surface of an object to be measured and preprocessing the data to obtain a target point cloud; then fitting the target point cloud to a reference plane; calculating the vertical distance between each point in the target point cloud based on the fitted reference plane and generating height difference data; and finally extracting and outputting surface height feature information based on the height difference data. By preprocessing the three-dimensional point cloud data to remove noise, accurately fitting the reference plane, and separating the height difference data, the present invention achieves high-precision extraction of tiny height variations on complex surfaces, thereby improving detection efficiency, reducing dependence on high-cost optical equipment, and being compatible with a variety of workpiece morphologies.

[0066] In one embodiment, the above step S10 includes: S101, using a line laser sensor to scan the surface of the object to be measured to obtain reflected light spot information; S102, capturing multi-view images of the surface of the object to be measured by a binocular vision sensor; S103, establishing a global three-dimensional coordinate system, and defining the coordinate origin and axial reference of the global three-dimensional coordinate system; S104, generating a three-dimensional coordinate set of surface points in the global three-dimensional coordinate system based on the reflected light spot information and / or the multi-view image; S105, combining the three-dimensional coordinate sets into an original point cloud set in the global three-dimensional coordinate system; S106: Transmit the original point cloud set to a data processing module as the three-dimensional point cloud data.

[0067] In this embodiment, before three-dimensional reconstruction of the spatial structure of the surface of the object to be measured is performed, it is necessary to obtain three-dimensional point cloud data expressing the geometric morphology of the object's surface. The quality and density of this data have a decisive influence on subsequent processing. First, the target surface is scanned using a line laser sensor. After the laser line is projected onto the surface, it forms a continuous reflection spot. The degree of deformation of this spot is mapped to the surface's undulations. The spot reflection information is synchronously captured by a high-frequency image acquisition device, forming a series of linear cross-sectional data with high-precision, high-resolution depth information expression capabilities. This partial scan is suitable for capturing local contour details, and is particularly suitable for metal or engineering plastic surfaces with stable reflectivity.

[0068] Using binocular vision sensors to acquire multi-view images of the target surface, the parallax between the left and right cameras allows for an estimation of the spatial depth of each pixel. Multi-view images not only improve data redundancy and robustness, but also effectively address edge or occluded areas difficult for laser sensors to cover, enhancing the density and coverage of the overall point cloud. Disparity calculations are based on calibrated camera intrinsics and extrinsic parameters, combined with beam triangulation principles to perform spatial position backpropagation, providing surface structure information from multiple angles.

[0069] To unify the spatial scale and reference of data, a unified global 3D coordinate system must be established. This coordinate system must clearly define the coordinate origin and the orientation of the X / Y / Z axes, serving as the reference framework for all subsequent coordinate projections and data fusion. In practice, the coordinate system can be based on the platform origin, the reference point of the workpiece fixture, or the location of a specific calibration block to ensure repeatability and comparability across different batches, devices, or scenarios.

[0070] By processing the reflected light spot information and / or multi-view images using a spatial reconstruction algorithm, each surface sampling point is mapped into a unified three-dimensional space, resulting in a point set consisting of discrete spatial coordinates. This set forms the three-dimensional coordinate set of the surface of the object being measured, which has no topological relationship but fully expresses the surface structure.

[0071] After uniformly mapping the 3D coordinate sets to the global 3D coordinate system, they are combined to form a raw point cloud. This point cloud data includes information such as spatial position, local density, and inter-point spacing, preserving the target surface's microscopic geometry and providing a format suitable for direct input into subsequent processing modules. Ultimately, the raw point cloud is transmitted to the data processing module via a communication interface or cache channel, where it is used as 3D point cloud data for further filtering, fitting, and analysis.

[0072] This embodiment uses a combined acquisition method of line laser sensors and binocular vision sensors to acquire complete and high-precision 3D point cloud data while establishing a unified global coordinate system. This significantly improves data coverage and spatial reconstruction stability. This structured acquisition process not only enhances the accuracy of surface contour restoration but also improves the geometric consistency and cross-platform adaptability of the point cloud data, thus ensuring data quality for subsequent operations such as surface analysis, plane fitting, and feature extraction. It effectively overcomes the failure or insufficient accuracy of traditional single acquisition methods in complex surface areas.

[0073] In one embodiment, the above step S20 includes: S201, performing noise reduction processing on the three-dimensional point cloud data to remove discrete noise points and generate noise-reduced point cloud data; S202, converting the noise-reduced point cloud data into a unified reference coordinate system to generate converted point cloud data; S203, performing density homogenization processing on the converted point cloud data to generate homogenized point cloud data; S204, extracting effective surface area point cloud from the homogenized point cloud data; S205, performing coordinate normalization processing on the effective surface area point cloud to generate normalized point cloud data; S206: Using the normalized point cloud data as the target point cloud.

[0074] In this embodiment, before analyzing and processing the three-dimensional point cloud data, a series of standardization and optimization operations need to be performed on it to improve its structural stability and the accuracy of subsequent processing. First, during the acquisition process of the three-dimensional point cloud data, a large number of discrete noise points may be introduced due to factors such as ambient light interference, sensor vibration, and boundary reflection. These noise points usually appear as abnormal points that are far away from the main surface structure, have abrupt spatial positions, and have a local density significantly lower than that of the surrounding points. By setting spatial neighborhood density thresholds, screening for the minimum number of points, and detecting anomalies based on statistical residuals or distance, these discrete noise points can be identified and removed, retaining the main data areas with structural continuity, and generating denoised point cloud data. Noise reduction processing not only improves the smoothness of the data, but also reduces the interference of noise points on subsequent fitting or feature extraction results.

[0075] Point cloud data acquired by different devices may be in different coordinate systems, such as a local scanning reference system, a camera coordinate system, or a mechanical platform coordinate system. To unify the spatial reference standard, the denoised point cloud data needs to be converted to a unified reference coordinate system, which is usually the global coordinate system preset by the acquisition system or the workpiece coordinate system defined by the inspection task. The conversion process includes the calculation and application of rotation matrices and translation vectors. Coordinate mapping can be achieved by calibrating markers, locating holes, or fixture reference points to generate the converted point cloud data and ensure that all data has a consistent spatial positioning reference.

[0076] Due to the non-uniform sampling of point cloud data, the spacing between points can vary significantly, especially in areas with complex surfaces, obstructed viewports, or contrasting textures. To prevent subsequent processing from favoring high-density areas or losing information in low-density areas, density homogenization is performed on the converted point cloud data. This can be achieved through voxel grid filtering, adaptive resampling, or random downsampling techniques to ensure a globally balanced distribution of point clouds and generate density-homogenized point cloud data, thereby improving spatial distribution consistency and algorithm robustness.

[0077] The processed point cloud still contains irrelevant background areas, supporting structures, or obstructing surfaces. Therefore, it is necessary to extract the valid surface area point cloud relevant to the surface being measured. This process can be performed based on prior knowledge of the target object's shape, spatial location range, or clustering and segmentation algorithms to identify and crop the area. This selection of point clouds retains only the area relevant to the object being measured, further focusing the analysis.

[0078] Finally, to enhance the consistency of the point cloud's numerical range and processing flexibility, coordinate normalization is required for the valid surface area point cloud. This process typically involves translating the point cloud's center of gravity to the origin and normalizing the maximum bounding area to a unit cube or a specified scale, thereby generating the normalized point cloud data. This normalization operation not only facilitates subsequent fitting, comparison, and visualization, but also helps improve the algorithm's generalization capabilities across artifacts of varying scales.

[0079] The normalized point cloud data after the above processing is used as the target point cloud to provide input data with regular structure, unified scale and background elimination for subsequent fitting, analysis and detection steps.

[0080] This embodiment effectively improves the structural integrity, coordinate consistency, and spatial distribution rationality of 3D point cloud data by executing a preprocessing process including noise reduction, coordinate transformation, density homogenization, effective region extraction, and normalization. This process not only significantly reduces the error propagation caused by noise, non-uniform coordinates, and density anomalies, but also enhances the representation capability of the target point cloud, providing a stable and reliable data foundation for subsequent reference plane fitting and height difference extraction, significantly improving overall detection accuracy and algorithm compatibility.

[0081] In one embodiment, the above step S30 includes: S301, solving the geometric centroid coordinates of the target point cloud; S302, constructing a centralized point cloud matrix based on the geometric centroid coordinates; S303, performing a singular value decomposition operation on the centralized point cloud matrix to obtain a singular value decomposition result; S304, extracting the eigenvector corresponding to the minimum singular value from the singular value decomposition result; S305, determining the characteristic vector as a reference plane normal vector; S306, determining a constant term of a reference plane equation based on the geometric centroid coordinates and the reference plane normal vector; S307, combining the reference plane normal vector and the constant term to generate a reference plane equation; S308: Perform normalization processing on the reference plane equation to generate the reference plane.

[0082] In this embodiment, after obtaining a target point cloud with spatial consistency and scale uniformity, a reference plane that reflects the overall surface morphology needs to be constructed. To achieve this, the overall structure of the target point cloud is statistically modeled and the geometric centroid coordinates of the point cloud are calculated. The geometric centroid coordinates are the mean position of all points along each coordinate axis and represent the spatial center of gravity of the point cloud. They are typically calculated by calculating the arithmetic mean of the x, y, and z coordinates of each point, and serve as the translation reference for subsequent centering operations.

[0083] Based on the geometric centroid coordinates, the original point cloud is centered to construct a centered point cloud matrix. The centering process subtracts the geometric centroid coordinates from each point's coordinate value, aligning the point cloud symmetrically around the origin. This eliminates the effects of overall offset and ensures that subsequent directional analysis focuses on internal structural differences rather than positional offsets.

[0084] The centered point cloud matrix is ​​used as input and a singular value decomposition (SVD) operation is performed on it. SVD is a key mathematical tool for matrix dimensionality reduction and directionality extraction. By decomposing a matrix into a set of orthogonal basis vectors and their corresponding singular values, it can reveal the degree of variation in the point cloud across different directions. SVD yields a set of eigenvectors and their corresponding singular values, which characterize the principal axis orientations of the point cloud across different directions.

[0085] The eigenvector corresponding to the minimum singular value from the singular value decomposition result is selected as the direction with the least change in the point cloud. Since the target point cloud is mainly distributed in a certain approximate plane area, the normal vector should be perpendicular to the direction of point cloud expansion. Therefore, the eigenvector with the minimum singular value corresponds to the normal vector of the plane.

[0086] Using the obtained reference plane normal vector and the previously calculated geometric centroid coordinates, we can determine the constant term of the spatial plane equation satisfied by the plane. The general form of the plane equation is Ax + By + Cz + D = 0, where A, B, and C are the normal vector components and D is the constant term. Substituting the geometric centroid coordinates into this equation and solving it simultaneously yields the plane constant term.

[0087] Combining the normal vector with the constant term fully defines the analytical expression for the reference plane. This expression is used in subsequent point-to-plane distance calculations to obtain the height characteristic distribution of the point cloud.

[0088] To further enhance the standardization and numerical stability of the expression, the plane equations are normalized to ensure that the normal vectors are unit vectors and that the constant terms are proportional to the direction quantities. This normalized reference plane exhibits excellent versatility and numerical controllability, serving as a unified reference for various height evaluation algorithms.

[0089] This embodiment effectively achieves stable modeling of the overall structure of the point cloud by centering the target point cloud using its geometric centroid as a reference and extracting normal vector directions using singular value decomposition techniques. This process not only improves the accuracy of overall fitting of complex surfaces but also avoids interference from local outliers on normal vector estimation, thereby generating a globally representative reference plane. Based on this reference plane, height differences at any point can be assessed, enhancing the system's consistency and adaptability in modeling surfaces of various workpiece shapes.

[0090] In one embodiment, the above step S40 includes: S401, obtaining normalized plane equation coefficients of the reference plane; S402, substituting the three-dimensional coordinates of each point in the target point cloud into the normalized plane equation coefficients to obtain the vertical distance value of each point; S403, performing dynamic compensation processing on the vertical distance value to generate a compensated distance value; S404, performing statistical analysis on the compensated distance value to generate height difference statistical features; S405: Integrate the compensated distance value and the height difference statistical feature into height difference data.

[0091] In this embodiment, after generating a reference plane for the target point cloud, the height difference of each point in the point cloud relative to the reference plane is calculated to analyze the subtle undulations of the surface topography. First, the coefficients of the normalized plane equation must be obtained. Normalization ensures that the normal vector of the plane equation has unit length, typically in the form Ax+By+Cz+D=0, where A²+B²+C²=1. This enhances the stability and comparability of subsequent distance calculations.

[0092] Then, the 3D coordinates of each point in the target point cloud are substituted into the normalized plane equation. Based on the point-to-plane distance formula (D = Ax + By + Cz + D′), the vertical distance of each point relative to the reference plane is obtained. This distance reflects the vertical deviation of the point and serves as the fundamental data for measuring surface height changes.

[0093] To account for potential systematic deviations in practical applications or errors caused by factors such as occlusion and reflection at the edge of the point cloud, dynamic compensation processing is required after obtaining the initial vertical distance value. This processing can adaptively adjust the distance value based on the sensor viewing angle, platform tilt, or point cloud density changes in the measurement scene. For example, weighted correction factors, edge fitting benchmarks, or background area statistical characteristics can be introduced for normalization, making the distance value closer to the actual height difference.

[0094] After obtaining the compensated distance values, statistical analysis is performed on the overall compensation results. This statistical analysis involves extracting distribution characteristics of the height differences, such as mean, variance, range, and skewness. This is used to further quantify the overall surface height variations, distribution trends, and local anomalies, improving the interpretability and discriminative power of the representation.

[0095] Finally, the compensated distance values ​​are integrated with the height difference statistical features obtained through statistical analysis to generate structured height difference data. This dataset not only records the local height difference information of each point, but also contains summary information on overall topographic changes, providing multi-level data support for subsequent tasks such as defect detection and flatness analysis.

[0096] This embodiment significantly improves the accuracy and robustness of height difference calculations by obtaining the vertical distance of each point in the point cloud based on the normalized reference plane equation and combining it with a dynamic compensation mechanism and statistical analysis. This method not only suppresses interference caused by measurement system errors, but also effectively extracts global and local variation characteristics of surface topography, enhancing the adaptability and stability of subsequent surface quality assessment and defect identification.

[0097] In one embodiment, the step S50 comprises: S501, parsing the compensated distance values in the height difference data; S502, generating a three-dimensional height distribution model based on the compensated distance values; S503, performing a feature extraction operation on the three-dimensional height distribution model to obtain surface feature parameters; S504, generating a height feature visualization atlas based on the three-dimensional height distribution model; S505, integrating the surface feature parameters and the height feature visualization atlas to generate the height feature information.

[0098] In this embodiment, after obtaining the integrated height difference data, the compensated distance values therein need to be parsed first. These compensated distance values constitute the vertical offset of each sampling point on the surface of the object to be measured in the reference plane direction, and are a direct measurement basis reflecting the surface height fluctuation state. This parsing process can be performed by traversing the corresponding field in the height difference data structure, extracting and organizing it into a continuous spatial mapping point set for subsequent model reconstruction.

[0099] Based on the extracted compensated distance values, a three-dimensional height distribution model is constructed. This model is based on a global three-dimensional coordinate system, and by binding the X and Y coordinates of each point in the point cloud space with its corresponding compensated height value Z, a height field with complete geometric expression is generated. The model construction process can combine spatial interpolation methods (such as spline interpolation, nearest neighbor interpolation, or Gaussian process regression) to reconstruct and complete the hollow areas or low-density areas, ensuring the continuity and smoothness of the model.

[0100] On the basis of the three-dimensional height distribution model, a feature extraction operation is performed to obtain surface feature parameters. Feature parameters can include but are not limited to surface maximum height, minimum height, root mean square height, surface roughness indicators (such as Ra, Rz), height gradient direction distribution, and mutation region contour features. In the extraction process, sliding window, multi-scale convolution analysis, and directional projection can be used to improve the regional feature perception ability. Parameter extraction not only faces the overall statistics, but also can focus on local feature structures such as edges, depressions, and protrusions.

[0101] Subsequently, a height feature visualization atlas is generated based on the three-dimensional height distribution model. This atlas maps the height values to color coding and converts them into a two-dimensional image form, making the surface concave-convex changes visually displayed through color depth. The mapping method can choose linear mapping, bidirectional color gradient, and segmented threshold mapping strategies to enhance the sensitivity of the human eye to specific change areas. In addition, edge enhancement information or abnormal area markers can be superimposed in the visualization atlas to assist in interpretation.

[0102] Finally, the surface feature parameters and height feature visualization maps are integrated to form structured height feature information. This information, represented by both digital parameters and graphical views, can be used for subsequent automatic determination modules as well as for manual analysis and quality assessment, enhancing its versatility and practicality across multiple inspection processes.

[0103] This embodiment analyzes the compensated distance values, constructs a three-dimensional height distribution model, and performs feature extraction and visualization map generation operations, enabling multi-level, multi-angle characterization of the surface height state of the object to be measured. This process combines precise numerical modeling with intuitive graphical presentation, effectively extracting subtle morphological differences while also improving the automation and interpretability of subsequent analysis. The structured output of height feature information can be widely applied to various application scenarios, including industrial surface inspection, defect analysis, and structural uniformity assessment, with excellent flexibility and scalability.

[0104] In one embodiment, after the above step S50, the method further includes: S601, parsing the surface feature parameters in the height feature information, and converting the surface feature parameters into a structured data table to generate a parameter data table; S602, obtaining a height feature visualization map in the height feature information, and rendering the height feature visualization map into a scalable vector graphic; S603, creating a test report framework template including standard information fields; S604, embedding the parameter data table and the scalable vector graphics into the test report framework template to generate a test report; S605: Export the test report into a machine-readable test report file.

[0105] In this embodiment, after generating the height feature information, the surface feature parameters in the information are further parsed and converted into a structured data table. Surface feature parameters usually exist in unstructured or semi-structured forms, such as lists, nested fields, or hierarchical arrays. In order to achieve standardized storage and cross-module calls, these parameters need to be converted into a two-dimensional data table format of standard fields. Structured operations can be based on preset field templates, and indicators such as maximum height, minimum height, average roughness, mean square error, slope distribution, etc. can be classified into a unified field, and the corresponding numerical units, precision, and field labels can be defined to generate a parameter data table with readability and computational controllability.

[0106] After obtaining a highly feature-rich visualization map, vectorized graphics rendering is performed to improve resolution adaptability and scaling stability. This map may initially be a raster image based on a pixel array, which needs to be converted into a scalable vector graphic through processing methods such as boundary extraction, contour reconstruction, and gradient color band mapping. Vectorized graphics maintain consistent morphological features across different resolutions and display terminals, and facilitate the addition of interactive elements, boundary annotations, and anomaly highlights.

[0107] When creating a test report framework template, define a set of standard information fields, including metadata such as the test number, test time, test object, equipment identifier, tester ID, and a summary of environmental parameters, as well as an embedding area for structured embedded graphic and text data. Templates can be implemented using XML, HTML, LaTeX, or PDF controllable template structures to ensure a consistent output format and ease system integration.

[0108] The generated parameter data table and vector graphics are then embedded into the aforementioned report framework template. This embedding process ensures field alignment and logical consistency between the graphic and text information. For example, this can be accomplished by marking the mapping relationship between graphics and parameter locations in the report, or by adding auxiliary content such as graphic description fields and exception label locations to ensure that the structural data complements the graphical view.

[0109] Finally, the embedded inspection report is exported as a machine-readable inspection report file. Common formats include PDF / A, HTML5, JSON-based reports, and embeddable SVG documents. The export process should maintain distortion-free image compression and unambiguous field encoding, and ensure that the report structure complies with system parsing protocols or industry docking specifications. It should support scenarios such as automatic archiving, remote upload, and system distribution.

[0110] For example, plane fitting based on a plane equation is a method that approximates a set of three-dimensional data points by finding the best-fitting plane using the least squares method. The plane equation is usually expressed as: Where (A, B, C) is the normal vector of the plane and D is a constant term.

[0111] Data preprocessing: Represent the data points in matrix form: Each point ( ).

[0112] Calculate the centroid (center point) of all points: = , = , = , Centralized data: Building a centralized matrix: M= Singular Value Decomposition (SVD): SVD decomposition of matrix M: M = U∑ Compute D: Compute constant term using centroid: D = -A - B - C Normalize normal vector: Normalize (A, B, C) to unit normal vector: (A, B, C) ,D Example Description: In a certain precision manufacturing factory, the surface topography of a batch of micro-structure metal components needs to be detected with high precision to evaluate the consistency of processing and the stability of micro-profile. The surface of such components is fine and undulating, and traditional contact height measurement method is not only low in efficiency, but also easily affected by contact pressure, resulting in measurement error. Therefore, a set of height feature extraction and detection report automatic generation system based on three-dimensional point cloud processing is introduced, which is deployed between the edge server and the industrial measurement and control terminal.

[0113] Firstly, the surface of the component is scanned by an industrial-grade line laser sensor, and at the same time, the surface image of the component is obtained from multiple angles with the cooperation of a binocular vision device. The system projects the reflection characteristics of each laser scanning point and the pixel space coordinates in each image to the three-dimensional space based on the global three-dimensional coordinate system set by the measurement path, forming a multi-source fused three-dimensional coordinate set. The three-dimensional coordinate set is combined into the initial raw point cloud in the global three-dimensional coordinate system and transmitted to the data processing module in the edge server.

[0114] Then, the system pre-processes the received raw point cloud data. First, the noise reduction operation based on statistical filtering is performed to remove isolated outliers and error points introduced by sensor drift. Then, the point cloud is uniformly converted to a standard reference coordinate system to ensure consistent positioning of all workpiece point clouds. In order to eliminate the uneven point density caused by sensor distance difference, the system performs voxel grid resampling on the converted point cloud data to make the point density tend to be uniform. Next, the system extracts point cloud segments containing effective structure regions from the converted point cloud data through judgment logic based on contour closure and normal vector consistency, and normalizes them to make the scale, position and orientation consistent, thereby obtaining the target point cloud.

[0115] After completing point cloud preprocessing, the system performs a datum plane fitting operation based on the target point cloud. First, the system obtains the point cloud centroid through geometric center calculation and constructs a centralized point cloud matrix centered around the centroid. Singular value decomposition (SVD) is then used to analyze the principal direction vectors of this matrix. The eigenvector corresponding to the minimum singular value is extracted and used as the normal vector, thereby defining the orientation of the component's reference plane. Combining the centroid coordinates and the normal vector parameters, the system solves the plane equation and performs normalization to generate a unified standard datum plane.

[0116] Using this reference plane as a reference, the system calculates the vertical height difference from each point in the target point cloud to the reference plane. Substituting each point's 3D coordinates into the plane equation, the system obtains the original height difference. Dynamic compensation is then performed to eliminate systematic deviations caused by fine-tuning the overall component's posture, generating stable and reliable compensated distance values. Based on this, the system calculates the height fluctuation parameters of all points, extracting statistical features such as maximum height difference, mean squared deviation, and range distribution. The distance values ​​and statistics are then integrated to form height difference data.

[0117] Once the height difference data is available, the system analyzes the spatial offset information contained in the data to construct a 3D height distribution model. Based on this model, it extracts typical parameters characterizing the microscopic profile, such as periodic structural pitch, pit density distribution, and asymmetric characteristic index. It then simultaneously renders a height information map, using color band mapping and gradient encoding to intuitively convey the surface undulations. The map information and parameter indicators are packaged together to form the final height feature information.

[0118] The system then parses the numerical parameters in the height feature information and converts them into structured data tables according to field specifications for storage and further analysis. The generated height feature map is then vectorized and converted into a scalable SVG graphic to support preview and zoomed-in viewing on various devices. Based on this, the system creates a standard inspection report template framework, automatically populating inspection metadata, numerical tables, and graphical views. The final inspection report is exported in PDF / A and JSON formats to support archiving and multi-system integration.

[0119] By implementing this complete process, the manufacturing plant achieves non-contact, high-precision, automated inspection of the surfaces of microstructured metal components, effectively improving measurement efficiency and the standardization of data delivery. The entire process is completed on edge devices, offering high adaptability and real-time responsiveness, making it suitable for surface consistency inspection and quality tracking of various part types.

[0120] This embodiment can automatically generate machine-readable test report files by structuring and visually reorganizing highly characteristic information, thus achieving a closed loop from surface morphology data processing to test conclusion output. This process not only improves the standardization and versatility of test results, but also enhances cross-system compatibility and delivery efficiency. The combined expression of vector graphics and structured parameters ensures that test results remain consistent and readable across multi-resolution terminals and different processing systems, while facilitating subsequent archiving, retrieval, comparison, and data-driven quality control analysis, significantly improving the overall level of test automation and digitization.

[0121] In one embodiment, a device for generating height feature information based on a point cloud is provided, and the device for generating height feature information based on a point cloud corresponds one-to-one to the method for generating height feature information based on a point cloud in the above embodiment. Figure 3 , Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the device for generating height feature information based on point clouds. These include a data acquisition module 10, a point cloud preprocessing module 20, a plane fitting module 30, a height difference calculation module 40, and a feature extraction module 50. Each functional module is described in detail below: The data acquisition module 10 is used to obtain three-dimensional point cloud data of the surface of the object to be measured; A point cloud preprocessing module 20 is used to preprocess the three-dimensional point cloud data to obtain a target point cloud; A plane fitting module 30 is used to fit the target point cloud to generate a reference plane; A height difference calculation module 40 is used to obtain height difference data from each point in the target point cloud to the reference plane based on the reference plane; The feature extraction module 50 is configured to generate height feature information of the surface of the object to be measured based on the height difference data.

[0122] In one embodiment, the data acquisition module 10 is specifically configured to: Use a line laser sensor to scan the surface of the object to be measured to obtain the reflected light spot information; Capture multi-view images of the surface of the object to be measured through a binocular vision sensor; Establishing a global three-dimensional coordinate system and defining the coordinate origin and axial reference of the global three-dimensional coordinate system; In the global three-dimensional coordinate system, generating a three-dimensional coordinate set of surface points based on the reflected light spot information and / or the multi-view images; In the global three-dimensional coordinate system, combining the three-dimensional coordinate sets into an original point cloud set; The original point cloud set is transmitted to a data processing module as the three-dimensional point cloud data.

[0123] In one embodiment, the point cloud pre-processing module 20 is specifically configured to: performing noise reduction processing on the three-dimensional point cloud data to remove discrete noise points and generate noise-reduced point cloud data; Converting the denoised point cloud data to a unified reference coordinate system to generate converted point cloud data; performing density homogenization processing on the converted point cloud data to generate homogenized point cloud data; Extracting effective surface area point cloud from the homogenized point cloud data; performing coordinate normalization processing on the effective surface area point cloud to generate normalized point cloud data; The normalized point cloud data is used as the target point cloud.

[0124] In one embodiment, the plane fitting module 30 is specifically configured to: Solving the geometric centroid coordinates of the target point cloud; Constructing a centralized point cloud matrix based on the geometric centroid coordinates; Performing a singular value decomposition operation on the centralized point cloud matrix to obtain a singular value decomposition result; Extracting the eigenvector corresponding to the minimum singular value from the singular value decomposition result; Determining the eigenvector as a reference plane normal vector; Determining a constant term of a reference plane equation based on the geometric centroid coordinates and the reference plane normal vector; Combining the reference plane normal vector and the constant term to generate a reference plane equation; Normalization is performed on the reference plane equation to generate the reference plane.

[0125] In one embodiment, the height difference calculation module 40 is specifically configured to: Obtaining normalized plane equation coefficients of the reference plane; Substituting the three-dimensional coordinates of each point in the target point cloud into the normalized plane equation coefficients to obtain the vertical distance value of each point; performing dynamic compensation processing on the vertical distance value to generate a compensated distance value; performing statistical analysis on the compensated distance values ​​to generate height difference statistical features; The compensated distance value and the height difference statistical feature are integrated into height difference data.

[0126] In one embodiment, the feature extraction module 50 is specifically configured to: parsing the compensated distance value in the height difference data; generating a three-dimensional height distribution model based on the compensated distance value; performing a feature extraction operation on the three-dimensional height distribution model to obtain surface feature parameters; Based on the three-dimensional height distribution model, generating a height feature visualization map; The surface feature parameters and the height feature visualization map are integrated to generate the height feature information.

[0127] In one embodiment, the feature extraction module 50 is specifically configured to: parsing the surface feature parameters in the height feature information, and converting the surface feature parameters into a structured data table to generate a parameter data table; Obtaining a height feature visualization map from the height feature information, and rendering the height feature visualization map into a scalable vector graphic; Create a test report framework template containing standard information fields; Embedding the parameter data table and the scalable vector graphics into the test report framework template to generate a test report; Export the test report as a machine-readable test report file.

[0128] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external user terminal via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a method for generating height feature information based on a point cloud.

[0129] In one embodiment, a computer device is provided. The computer device may be a user terminal, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the user side of a method for generating height feature information based on point cloud. In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed: Obtain three-dimensional point cloud data of the surface of the object to be measured; Preprocessing the three-dimensional point cloud data to obtain a target point cloud; Fitting the target point cloud to generate a reference plane; Based on the reference plane, obtaining height difference data from each point in the target point cloud to the reference plane; Height characteristic information of the surface of the object to be measured is generated according to the height difference data.

[0130] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: Obtain three-dimensional point cloud data of the surface of the object to be measured; Preprocessing the three-dimensional point cloud data to obtain a target point cloud; Fitting the target point cloud to generate a reference plane; Based on the reference plane, obtaining height difference data from each point in the target point cloud to the reference plane; Height characteristic information of the surface of the object to be measured is generated according to the height difference data.

[0131] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the user side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0132] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).

[0133] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0134] It should be noted that if any software tools or components other than those of the Company appear in the embodiments of this application, they are merely for illustration and do not represent actual use. The above embodiments are intended only to illustrate the technical solutions of the present invention, not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some of the technical features therein with equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A method for generating height feature information based on point cloud, characterized in that: The following steps are involved: Obtain three-dimensional point cloud data of the surface of the object to be measured; Preprocessing the three-dimensional point cloud data to obtain a target point cloud; Fitting the target point cloud to generate a reference plane; Based on the reference plane, obtaining height difference data from each point in the target point cloud to the reference plane; Generating height characteristic information of the surface of the object to be measured according to the height difference data; Generating height feature information of the surface of the object to be measured according to the height difference data, including: parsing the compensated distance value in the height difference data; generating a three-dimensional height distribution model based on the compensated distance value; performing a feature extraction operation on the three-dimensional height distribution model to obtain surface feature parameters; Based on the three-dimensional height distribution model, generating a height feature visualization map; The surface feature parameters and the height feature visualization map are integrated to generate the height feature information.

2. The method for generating height feature information based on point cloud according to claim 1, wherein: Obtain 3D point cloud data of the surface of the object to be measured, including: Use a line laser sensor to scan the surface of the object to be measured to obtain the reflected light spot information; Capture multi-view images of the surface of the object to be measured through a binocular vision sensor; Establishing a global three-dimensional coordinate system and defining the coordinate origin and axial reference of the global three-dimensional coordinate system; In the global three-dimensional coordinate system, generating a three-dimensional coordinate set of surface points based on the reflected light spot information and / or the multi-view images; In the global three-dimensional coordinate system, combining the three-dimensional coordinate sets into an original point cloud set; The original point cloud set is transmitted to a data processing module as the three-dimensional point cloud data.

3. The method for generating height feature information based on point cloud according to claim 1, wherein: Preprocessing the three-dimensional point cloud data to obtain a target point cloud includes: performing noise reduction processing on the three-dimensional point cloud data to remove discrete noise points and generate noise-reduced point cloud data; Converting the denoised point cloud data to a unified reference coordinate system to generate converted point cloud data; performing density homogenization processing on the converted point cloud data to generate homogenized point cloud data; Extracting effective surface area point cloud from the homogenized point cloud data; performing coordinate normalization processing on the effective surface area point cloud to generate normalized point cloud data; The normalized point cloud data is used as the target point cloud.

4. The method for generating height feature information based on point cloud according to claim 1, wherein: Fitting the target point cloud to generate a reference plane includes: Solving the geometric centroid coordinates of the target point cloud; Constructing a centralized point cloud matrix based on the geometric centroid coordinates; Performing a singular value decomposition operation on the centralized point cloud matrix to obtain a singular value decomposition result; Extracting the eigenvector corresponding to the minimum singular value from the singular value decomposition result; Determining the eigenvector as a reference plane normal vector; Determining a constant term of a reference plane equation based on the geometric centroid coordinates and the reference plane normal vector; Combining the reference plane normal vector and the constant term to generate a reference plane equation; Normalization is performed on the reference plane equation to generate the reference plane.

5. The method for generating height feature information based on point cloud according to claim 1, wherein: Generating height feature information of the surface of the object to be measured according to the height difference data, including: parsing the compensated distance value in the height difference data; generating a three-dimensional height distribution model based on the compensated distance value; performing a feature extraction operation on the three-dimensional height distribution model to obtain surface feature parameters; Based on the three-dimensional height distribution model, generating a height feature visualization map; The surface feature parameters and the height feature visualization map are integrated to generate the height feature information.

6. The method for generating height feature information based on point cloud according to claim 1, wherein: After generating the height feature information of the surface of the object to be measured according to the height difference data, the method further includes: parsing the surface feature parameters in the height feature information, and converting the surface feature parameters into a structured data table to generate a parameter data table; Obtaining a height feature visualization map from the height feature information, and rendering the height feature visualization map into a scalable vector graphic; Create a test report framework template containing standard information fields; Embedding the parameter data table and the scalable vector graphics into the test report framework template to generate a test report; Export the test report as a machine-readable test report file.

7. A device for generating height feature information based on point cloud, characterized in that: The point cloud-based height feature information generating device comprises: A data acquisition module is used to obtain three-dimensional point cloud data of the surface of the object to be measured; A point cloud preprocessing module, used to preprocess the three-dimensional point cloud data to obtain a target point cloud; A plane fitting module, used for fitting the target point cloud to generate a reference plane; A height difference calculation module is used to obtain height difference data from each point in the target point cloud to the reference plane based on the reference plane; The feature extraction module is used to generate height feature information of the surface of the object to be measured based on the height difference data.

8. A computer device, characterized in that: The computer device includes a memory, a processor, and a point cloud-based height feature information generation program stored in the memory and capable of running on the processor. When the point cloud-based height feature information generation program is executed by the processor, the steps of the point cloud-based height feature information generation method as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that The storage medium stores a point cloud-based height feature information generation program, which, when executed by a processor, implements the steps of the point cloud-based height feature information generation method according to any one of claims 1 to 6.

Citation Information

Cited By

  • High-fidelity terrain surface interpolation method and system for large-scale point cloud data

    CN121280658A

  • 3D printing platform leveling method and system based on point map analysis

    CN121403716A

  • Outer wall hollowing detection method and device based on thermal infrared and facade point cloud fusion and storage medium

    CN121783919A

  • Method and device for detecting hollowing of external wall based on fusion of thermal infrared and facade point cloud, and storage medium

    CN121783919B

  • Thickness detection method for detecting qualification rate of woven valve bag

    CN121953842A