Real-time alignment highlight curved surface metallographic 3D scanning method and system
By constructing a normal vector geodesic distance correlation map and a constraint propagation intensity matrix, the problem of cumulative error in 3D scanning of high-brightness curved metallographic workpieces was solved, achieving accurate registration of global point clouds and improved stability of automated detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-06
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies suffer from registration accuracy issues when performing 3D scanning on high-brightness curved metallographic workpieces. In particular, the spatial misalignment caused by accumulated errors after multi-view scanning makes it difficult to meet the production line cycle requirements for automated inspection.
By constructing a geodesic distance correlation graph of normal vectors, normalizing the adjacency weights, generating the constraint propagation strength matrix, calculating the closed-loop error energy field, and constructing a graph cut network at the gradient extremum, the precise registration of the global point cloud is achieved.
It effectively suppresses the burst of accumulated errors at the closed loop, improves the stability and equipment utilization of automated testing, reduces manual intervention, and enhances the cycle time adaptability of the testing production line.
Smart Images

Figure CN121661114A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D scanning technology, and in particular to a real-time aligned high-brightness curved surface metallographic 3D scanning method and system. Background Technology
[0002] In the field of industrial inspection, optical 3D scanning technology has been used for metallographic workpiece morphology measurement. This technology is primarily implemented through two methods: structured light projection and laser line scanning. By projecting coded patterns or laser lines onto the surface of the object being measured, high-density point cloud data is acquired using the principle of triangulation. To address the issue that a single viewpoint cannot cover the complete morphology, existing methods employ a multi-site scanning strategy. This involves scanning the workpiece multiple times from different orientations to obtain local point clouds. Then, using an iterative nearest-point algorithm or its improved version, registration and stitching are performed based on the geometric similarity between the point clouds, ultimately constructing a global 3D model. This process enables automated continuous scanning and data fusion for workpieces with rich surface textures.
[0003] However, when this method is applied to polished, high-gloss curved metallographic workpieces, there is a risk of accuracy loss during the registration process. After grinding and polishing, the microscopic undulations on the surface of these workpieces are removed to the sub-micrometer level, resulting in smooth macroscopic curvature changes and highly geometrically homogeneous point cloud data acquired from various perspectives. The iterative nearest-point algorithm relies on local geometric properties to establish a mapping relationship when finding corresponding points. Smooth surfaces cause points at different spatial locations to have similar normal vector distributions and curvature characteristics, making it easy for the algorithm to simultaneously find incorrectly matched point pairs that meet the distance minimization condition in multiple regions. The small deviation introduced by this incorrect matching in single-step registration accumulates and amplifies with the continuous increase in scanning stations. Especially when the scanning path forms a closed loop, the point clouds of the final and initial stations, which should correspond to the same physical region, cannot coincide due to accumulated errors, resulting in measurable spatial misalignment. For example, after scanning a ring-shaped high-brightness workpiece, the difference between the start and end points can reach the millimeter level, forcing the system to terminate the automated process. Operators must manually select the feature area for re-registration, or even replan the scanning path and add auxiliary positioning devices, resulting in a longer detection cycle, reduced equipment utilization, and difficulty in meeting the production line cycle requirements. Summary of the Invention
[0004] To overcome the aforementioned deficiencies of the prior art, the present invention provides a real-time aligned high-brightness curved surface metallographic 3D scanning method, comprising:
[0005] Step S1: Extract normal vector features from the multi-view scan point cloud, calculate the approximate geodesic distance, and construct a normal vector geodesic distance correlation map with node geometric attributes, edge geodesic distance and the angle between the normal vector;
[0006] Step S2: Based on the geodesic distance correlation graph of the normal vector, the adjacency weight is normalized, and a sparse matrix is constructed by the exponential decay function of the angle between the geodesic distance and the normal vector to obtain the constraint propagation strength matrix.
[0007] Step S3: Apply the constraint propagation intensity matrix to the multi-view point cloud registration residual, accumulate the residual vector through matrix propagation, generate a scalar field by regular sampling in three-dimensional space, and obtain the closed-loop error energy field.
[0008] Step S4: Construct graph cut network nodes at the extreme values of the gradient of the closed-loop error energy field, use the energy field integral value as the edge capacity, execute the minimum cut algorithm under geodesic constraints, and complete the fine registration of the global point cloud.
[0009] Furthermore, constructing the normal vector geodesic distance correlation graph includes:
[0010] Construct a multi-view raw point cloud set based on the raw point cloud data output by a multi-view 3D scanning device;
[0011] Based on the original point cloud set from multiple perspectives, a point cloud set with enhanced normal vectors from multiple perspectives is obtained by using the local surface fitting method.
[0012] Construct a spatial adjacency table based on a point cloud set enhanced by multi-view normal vectors;
[0013] Calculate the approximate geodesic path set and approximate geodesic distance set based on the spatial adjacency table and the multi-view normal vector enhanced point cloud set;
[0014] A normal vector geodesic distance correlation graph is constructed based on a multi-view normal vector enhanced point cloud set, a spatial adjacency table, and an approximate geodesic distance set.
[0015] Furthermore, constructing the spatial adjacency table includes:
[0016] Based on the point cloud set enhanced by multi-view normal vectors, Euclidean nearest neighbor search is performed on each point using a spatial index structure to obtain a set of candidate spatial nearest neighbor points.
[0017] Based on the spatial nearest neighbor candidate point set and the normal vector information in the multi-view normal vector augmented point cloud set, the normal vector angle is calculated for each pair of candidate points. Candidate point pairs with a normal vector angle less than the normal vector angle threshold are retained as valid adjacent point pairs, while candidate point pairs with a normal vector angle greater than or equal to the normal vector angle threshold are removed. This yields the valid adjacent point set for each point, and a spatial adjacency table is constructed accordingly.
[0018] Furthermore, the constraint propagation strength matrix is obtained as follows:
[0019] Construct a node index mapping table based on the geodesic distance correlation graph of normal vectors;
[0020] The original set of constraint weights is calculated based on the geodesic distance correlation graph of normal vectors and the node index mapping table;
[0021] The outgoing edges of each node are linearly normalized based on the original constraint weight set to obtain the normalized constraint weight set.
[0022] A sparse square matrix was initially constructed based on the normalized constraint weight set and node index mapping table, and the constraint propagation strength matrix was obtained by threshold filtering.
[0023] Furthermore, calculating the original set of constraint weights includes:
[0024] Based on the geodesic distance attribute of each directed edge in the geodesic distance correlation graph of the normal vector, an inverse proportional transformation is performed on the geodesic distance to obtain the geodesic inverse proportional weight;
[0025] Based on the angle attribute of the normal vector of each directed edge in the geodesic distance correlation graph, an exponential decay transformation is performed on the angle of the normal vector to obtain the angle weight of the normal vector.
[0026] Multiply the geodesic inverse weight of each directed edge by the normal vector angle weight to obtain the original constraint strength of the directed edge, and record the original constraint strength into the original constraint weight set using the corresponding row and column number in the node index mapping table as the index.
[0027] Furthermore, the closed-loop error energy field is obtained as follows:
[0028] A global coordinate point cloud set is generated based on the multi-view original point cloud set and the initial registration transformation parameter set;
[0029] Calculate the initial registration residual vector set based on the global coordinate point cloud set and the geodesic distance correlation map of normal vectors;
[0030] The propagation residual vector set is calculated based on the constrained propagation strength matrix and the initial registration residual vector set.
[0031] A regular sampling grid is constructed in three-dimensional space based on the propagation residual vector set and the global coordinate point cloud set, and a closed-loop error energy field is generated.
[0032] Furthermore, generating the closed-loop error energy field includes:
[0033] Based on the global coordinate point cloud set, the minimum and maximum coordinates of the point cloud are calculated in the three coordinate axes respectively. The three-dimensional coordinate range is extended by a preset boundary margin to determine the range of the enclosing cube. According to the preset grid resolution, a set of regular three-dimensional sampling grid nodes is uniformly divided within the enclosing cube.
[0034] Based on the node index mapping table, each residual vector in the propagation residual vector set is associated with the global coordinates of its corresponding node. The magnitude of the residual vector is calculated and used as the error energy value of the global coordinate position of the corresponding node. According to the global coordinates of the node, one or more nearest grid nodes are found in the regular 3D sampling grid node set, and the error energy value is distributed to these grid nodes according to the spatial distance weight. The error energy contribution from the surrounding nodes is accumulated on each grid node to obtain the initial error energy distribution of the grid.
[0035] Spatial smoothing interpolation is performed on the initial error energy distribution of the grid to fill the energy value gaps of grid nodes that are not directly covered, forming a continuous closed-loop error energy field.
[0036] Furthermore, completing the precise registration of the entire point cloud includes:
[0037] Calculate the gradient field and extract the set of gradient extrema points based on the closed-loop error energy field;
[0038] Construct a graph cut network node set and a connection edge capacity set based on the gradient extreme point set, the multi-view original point cloud set, and the closed-loop error energy field;
[0039] A geodesic constraint graph cut network is constructed based on the geodesic distance correlation graph of normal vectors, the set of connection edge capacity, and the set of gradient extremum points.
[0040] The maximum flow minimum cut algorithm is executed on the geodesic constrained graph cut network to obtain the global fine registration transformation parameter set;
[0041] The multi-view point cloud positions are updated based on the global fine registration transformation parameter set to obtain the global fine registration point cloud set.
[0042] Furthermore, performing the maximum flow minimum cut algorithm on geodesic constrained graph cut networks includes:
[0043] In a geodesic constrained graph cut network, the maximum flow minimum cut algorithm is executed to obtain a minimum cut scheme that divides all view nodes into two mutually exclusive subsets. View nodes that are connected to the source node but not through the cut edge are classified as the baseline view set, and view nodes that are connected to the sink node but not through the cut edge are classified as the correction view set.
[0044] Based on the geodesic paths and overlapping areas corresponding to the reference view set and the correction view set in the normal vector geodesic distance correlation diagram, a set of registration residual equations reflecting global closed-loop consistency is constructed. The registration transformation parameters in the reference view set are kept unchanged, and the registration transformation parameters in the correction view set are taken as unknowns. The equations are solved by least squares optimization to obtain the increment of the registration transformation parameters for each correction view. The increment is superimposed on the initial registration transformation parameter set to obtain the global fine registration transformation parameter set.
[0045] A real-time aligned high-brightness curved surface metallographic 3D scanning system is provided for implementing the aforementioned real-time aligned high-brightness curved surface metallographic 3D scanning method. The system includes:
[0046] The module for constructing a geodesic distance correlation graph of normal vectors is used to extract normal vector features from multi-view scanned point clouds, calculate approximate geodesic distances, and construct a geodesic distance correlation graph of normal vectors with geometric attributes of nodes, the geodesic distance of edges, and the angle between the normal vectors.
[0047] The constraint propagation strength matrix construction module is used to normalize the adjacency weights based on the geodesic distance correlation graph of the normal vector, and to construct a sparse square matrix by using the inverse ratio of geodesic distance and the exponential decay function of the angle between the normal vector and the geodesic distance to obtain the constraint propagation strength matrix.
[0048] Closed-loop error energy field generation module: It is used to apply the constraint propagation intensity matrix to the registration residual of multi-view point cloud, accumulate the residual vector through matrix propagation, and generate a scalar field by regular sampling in three-dimensional space to obtain the closed-loop error energy field;
[0049] The global fine registration execution module is used to construct graph cut network nodes at the extreme values of the gradient of the closed-loop error energy field, and execute the minimum cut algorithm under geodesic constraints with the energy field integral value as the edge capacity to complete the global point cloud fine registration.
[0050] Compared to existing technologies, the advantages of this invention are as follows: This invention addresses the core challenges of high-brightness curved metallographic surfaces lacking texture features and where highly homogeneous local geometric statistics lead to traditional registration algorithms easily getting trapped in local minima and accumulating errors exploding at closed loops. It transforms discrete point clouds into a network with a topological structure by using a normal vector geodesic distance correlation graph. This embeds each point into a connectivity pattern reflecting the overall surface orientation, forming a global encoding similar to a structural fingerprint. This overcomes the limitations of relying solely on local geometric similarity for registration. By constraining the propagation intensity matrix, it encodes local geometric relationships on the graph structure into algebraic linear operators, achieving efficient deduction from local errors to global error distribution. This avoids the time complexity explosion caused by point-by-point brute-force search. Furthermore, by constructing a closed loop... The loop error energy field makes the accumulated error continuously manifest in the form of energy concentration and gradient mutation, transforming the originally discrete residual statistics into a differentiable scalar field distribution. This facilitates the analysis of closed-loop inconsistencies using field theory methods. By constructing a geodesic constraint graph cut network at the gradient extrema of the energy field, the multi-view registration is transformed from a local iterative process into a global combinatorial optimization problem. This ensures that the cut path can only be expanded along the geodesic direction of the surface, guaranteeing that the final registration adjustment conforms to both the closed-loop error distribution and the actual geometry of the workpiece. This effectively suppresses the risk of accumulated error bursting at the closed loop, enabling the automatic scanning and stitching process to be completed stably without manual intervention. This significantly reduces the dependence on external auxiliary positioning devices and improves the cycle time adaptability and equipment utilization of the automated inspection production line. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a flowchart of a real-time aligned high-brightness curved surface metallographic 3D scanning method according to the present invention;
[0053] Figure 2 This is a schematic diagram of an approximate geodesic path search according to an embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of a geodesic constraint graph cut network according to an embodiment of the present invention;
[0055] Figure 4 This is a functional block diagram of a real-time aligned high-brightness curved surface metallographic 3D scanning system according to the present invention. Detailed Implementation
[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] Example 1:
[0058] Please see Figure 1 As shown, this embodiment provides a real-time aligned high-brightness curved surface metallographic 3D scanning method, including:
[0059] S1: Extract normal vector features from multi-view scan point cloud, calculate approximate geodesic distance, and construct a normal vector geodesic distance correlation graph with node geometric attributes, edge geodesic distance and the angle between the normal vector and the normal vector.
[0060] Furthermore, S1 includes:
[0061] S11: Construct a multi-view original point cloud set based on the original point cloud data output by the multi-view 3D scanning device.
[0062] Specifically, the high-brightness curved metallographic workpiece is scanned from at least two perspectives using a structured light projection device or a laser line scanning device to obtain a sequence of original point clouds from several perspectives. The original point cloud sequence corresponding to each perspective is then organized according to the perspective number and sampling time order to generate a multi-view original point cloud set with the perspective number as the key and the three-dimensional coordinate point sequence as the value.
[0063] For example, taking a high-brightness curved metallographic turbine blade workpiece as an example, the overall dimensions of the workpiece are 32mm × 18mm × 12mm. A structured light projection device is used to scan from six viewing angles, with a sampling density set to 0.1mm. Viewpoint 1 collects 48,562 point clouds, viewpoint 2 collects 51,203 point clouds, viewpoint 3 collects 49,875 point clouds, viewpoint 4 collects 50,126 point clouds, viewpoint 5 collects 47,893 point clouds, and viewpoint 6 collects 52,341 point clouds. The total original point cloud set from multiple views contains 300,000 three-dimensional coordinate points. Taking a sampling point in viewpoint 1 as an example, its original three-dimensional coordinates are... =(12.342,8.156,5.723)mm, corresponding to the viewpoint number 1, and the local serial number 2847.
[0064] Specifically, the multi-view raw point cloud ensemble groups and manages the raw point cloud data according to viewpoint. This prevents mismixing between different viewpoints during subsequent normal vector estimation and neighborhood search within the same viewpoint, ensuring that the local geometric relationships of each point are established under the same sensor pose. This improves the stability of normal vector estimation and the physical consistency of spatial adjacency relationships. Without S11, the multi-view point clouds are mixed together in the data structure, making it difficult to distinguish the scanning direction and occlusion areas corresponding to each viewpoint. Subsequent geodesic paths may easily cross invisible areas, affecting the geometric accuracy of geodesic distances.
[0065] S12: Based on the original point cloud set from multiple perspectives, a point cloud set with enhanced normal vectors from multiple perspectives is obtained through local surface fitting.
[0066] Specifically, for each viewpoint in the multi-view original point cloud set, for each point under that viewpoint, local principal direction analysis is performed using a fixed number of nearest neighbor points. The local tangent plane of that point is calculated using the least squares plane fitting method, and the normal vector of that point is obtained based on the normal direction of the tangent plane. The 3D coordinates and corresponding normal vectors of each point are combined according to the viewpoint number to form the normal vector enhanced point cloud for that viewpoint. The normal vector enhanced point clouds corresponding to all views are then recombined according to the viewpoint number to obtain the multi-view normal vector enhanced point cloud set.
[0067] Specifically, the nearest neighbor set is determined as follows: within the same viewpoint, a fixed number of nearest neighbor searches are performed on each point based on Euclidean distance, and candidate nearest neighbors with excessively large distances are removed. The spatial radius of the nearest neighbor set is constrained to a range determined based on the workpiece size and sampling density. The fixed number is determined by balancing the workpiece size (5-50 mm) and the sampling density (0.1 mm), which allows for stable fitting of the local quadratic surface with controllable computational overhead. The preferred fixed number is 50.
[0068] For example, point numbered 2847 in viewpoint 1 For example, searching for its k=50 nearest neighbors within the same viewpoint yields the set of nearest neighbors. Among them, the nearest neighbor point The distance is 0.0134mm, the farthest nearest neighbor point. The distance is 0.0672 mm. The covariance matrix C of this nearest neighbor set is calculated, where the elements of C are calculated as follows: First, the centroid of the nearest neighbor set is calculated. Then calculate Eigenvalue decomposition of the covariance matrix C yields three eigenvalues. =0.00423、 =0.00287、 =0.00018, and the corresponding eigenvectors are respectively =(0.892,0.341,0.297), =(-0.356, 0.934, 0.012) =(0.278, -0.095, 0.956). Minimum eigenvalue. corresponding feature vector =(0.278,-0.095,0.956) is the estimated normal vector value at this point. After normalization, we get... =(0.278,-0.095,0.956), with a module length of 1.0.
[0069] Specifically, through S12, the original multi-view point cloud set is transformed into a multi-view normal vector-enhanced point cloud set, adding local surface orientation information to each point. For bright metallographic surfaces, relying solely on spatial coordinates is insufficient to distinguish different regions, while the normal vector-enhanced point cloud set provides clues about local curvature changes, which is beneficial for subsequently constructing reliable neighborhood relationships based on normal vector consistency. However, if only relying on the normal vector of a single point is considered without considering its propagation relationship on the surface, the problem of highly similar normal vectors in large areas may still occur. Therefore, further topological encoding using geodesic distance is required in subsequent steps.
[0070] S13: Construct a spatial adjacency table based on point cloud sets enhanced by multi-view normal vectors.
[0071] Specifically, taking a multi-view normal vector augmented point cloud set as input, a globally unique point index is first assigned to each point in the set. The view number is then combined with the local index of the point within the view to generate a global point index sequence. Then, for each global point index, a joint neighborhood search based on Euclidean distance and the angle between the normal vectors is performed within the same view.
[0072] Specifically, S13 includes:
[0073] S131, based on the multi-view normal vector enhancement point cloud set, Euclidean nearest neighbor search is performed on each point using a spatial index structure to obtain a set of spatial nearest neighbor candidate points. The spatial index structure can be a hierarchical cubic mesh index with three-dimensional coordinates as the key or a spatial search structure based on tree partitioning. The size and search radius of the spatial nearest neighbor candidate point set are determined by the average point spacing of the point cloud and the typical radius of curvature of the workpiece.
[0074] S132, based on the set of spatial nearest neighbor candidate points and the normal vector information in the multi-view normal vector enhanced point cloud set, the angle between the normal vectors is calculated for each pair of candidate points. Candidate point pairs with an angle less than the normal vector angle threshold are retained as valid adjacent point pairs, while candidate point pairs with an angle greater than or equal to the normal vector angle threshold are removed, resulting in a set of valid adjacent points for each point. A spatial adjacency table is then constructed based on this set. This spatial adjacency table uses the global point index as the key and an ordered list of valid adjacent point indices as the value. The normal vector angle threshold is set according to the actual application scenario and the required geometric consistency requirements. It is typically selected based on the workpiece surface characteristics and the desired neighborhood smoothness. For example, in high-brightness curved metallographic applications, a smaller angle value, such as 15 degrees, is chosen to ensure the consistency of neighboring points on the curved surface and reduce the impact of random disturbances in the point cloud data. This selection helps ensure that the edges in the constructed spatial adjacency table are mainly distributed along the extended direction of the curved surface, rather than crossing discontinuous or occluded boundaries.
[0075] For example, with points For example, its global point index is 10000×1+2847=12847 (viewpoint number 1 multiplied by the base 10000 plus the local index 2847). A set of 32 spatial nearest neighbor candidate points is obtained within a radius r=0.5mm. The angle between the normal vectors of each candidate point is calculated, taking the candidate point as an example. For example, its normal vector =(0.285,-0.088,0.954), and normal vector The angle between (0.278, -0.095, 0.956) is calculated using the dot product formula: , ,therefore It is retained as a valid adjacent point. For another candidate point... Its normal vector The angle calculation result is , ,therefore They were eliminated. After filtering by the angle between the normal vectors... The set of valid adjacent points contains 24 points, which constitute the value corresponding to key 12847 in the spatial adjacency table.
[0076] Specifically, S13 adds a normal vector consistency check to the Euclidean distance, effectively eliminating false adjacency relationships caused by surface folds, occlusion boundaries, or random disturbances in point cloud data. For bright surface metallography, simple Euclidean adjacency can easily confuse points from different viewpoints at the same spatial location. However, by introducing the normal vector angle constraint, it can be ensured that spatial adjacency relationships are mainly distributed along the surface extension direction, providing a reliable local connection structure for the subsequent construction of approximate geodesic paths. If the normal vector consistency screening is ignored, the spatial adjacency table will contain a large number of short edges that do not conform to the surface orientation, and the geodesic distance will be severely distorted, failing to provide a stable foundation for subsequent topological coding.
[0077] S14: Calculate the approximate geodesic path set and approximate geodesic distance set based on the spatial adjacency table and the multi-view normal vector enhanced point cloud set.
[0078] Specifically, taking a spatial adjacency table and a multi-view normal vector-enhanced point cloud set as input, each point is considered a node in the graph structure, and each pair of adjacent points in the spatial adjacency table is considered a candidate edge in the graph structure. Initially, each candidate edge is assigned Euclidean distance as its length. Subsequently, on this Euclidean distance-based local candidate graph, a local shortest path search is performed on each node to obtain several approximate geodesic paths that closely adhere to the workpiece surface.
[0079] Specifically, S14 includes:
[0080] S141. Based on the spatial adjacency table, a local adjacency subgraph set is constructed by limiting the local search range for each node. Each local adjacency subgraph starts from an internal point and includes one or more rings of adjacent points centered on that point and expanded according to a geodesic radius threshold. The geodesic radius threshold is constrained by the maximum size of the workpiece and the expected coverage range between scanning stations.
[0081] S142, based on the set of local adjacency subgraphs, calculates the set of local approximate geodesic paths and the corresponding set of path lengths using a graph shortest path search algorithm, thus obtaining the set of approximate geodesic paths and the set of approximate geodesic distances. Specifically, the path length is defined by accumulating Euclidean distances for the edge lengths in the local adjacency subgraphs. In each local adjacency subgraph, a shortest path search is performed once for each endpoint, resulting in a sequence of shortest paths from the starting point to each endpoint. This sequence of shortest paths represents the local approximate geodesic paths, and the cumulative length of the shortest path sequence is the approximate geodesic distance. See also... Figure 2 This is a schematic diagram of an approximate geodesic path search provided in an embodiment of this application. For example... Figure 2 As shown, on the point cloud of a high-brightness curved metallographic workpiece, there are two distance measurement methods from the starting node to the ending node: one is the Euclidean straight-line distance represented by the red dashed line in the figure, which traverses the internal space of the workpiece rather than extending along the curved surface; the other is the approximate geodesic path represented by the thick orange solid line in the figure, which is formed by connecting multiple adjacent nodes segment by segment along the workpiece surface. The blue nodes in the figure represent valid adjacent points established through a spatial adjacency table, and the thin gray lines represent adjacent edges between nodes. These adjacent edges all satisfy Euclidean distance constraints and normal vector angle constraints, ensuring that the edges extend only along the surface direction. The approximate geodesic path is obtained by performing a shortest path search on the local adjacency subgraph, and its cumulative length is the approximate geodesic distance. For high-brightness curved metallographic workpieces, due to the highly smooth surface and gentle local curvature changes, relying solely on Euclidean distance cannot distinguish points at different positions on the surface. However, the approximate geodesic distance, accumulated along the internal path of the surface, can reflect the true surface orientation and topological relationship between two points. This distance metric, which extends along the surface, gives geometric realism to the edge attributes in the subsequent geodesic distance correlation graph of normal vectors. It provides a reliable long-range distance scale for the construction of the constraint propagation strength matrix, thus enabling the extraction of differentiated topological coding features even in flat regions with highly similar normal vectors.
[0082] For example, with points Starting from [a certain point], with a geodesic radius threshold set to 5mm, a local adjacency subgraph containing 1247 nodes and 4862 edges is constructed. To a certain destination For example, calculate the approximate geodesic path, i.e. and Euclidean distance between ;
[0083] ;
[0084] By searching the local adjacency subgraph using Dijkstra's shortest path algorithm, an approximate geodesic path is obtained that passes through 7 intermediate nodes: The Euclidean distances for each segment are 0.612 mm, 0.587 mm, 0.634 mm, 0.598 mm, 0.621 mm, 0.645 mm, 0.603 mm, and 0.589 mm, respectively, which approximate the geodesic distance. It can be seen that the approximate geodesic distance is... Greater than Euclidean distance The ratio is This indicates that the path travels an additional distance of approximately 21.6% along the curved surface, a difference that reflects the curvature characteristics of the workpiece surface.
[0085] Specifically, S14 transforms Euclidean adjacency relationships into geodesic paths and geodesic distances along the workpiece surface by performing shortest path search on the local adjacency subgraph. For high-gloss curved metallographic workpieces, traditional methods cannot identify the internal geometric orientation of the surface using only Euclidean distance. However, the approximate geodesic path set, through the continuity of paths within the curved surface, unfolds the relatively flat polished surface into several path lines with unique orientations on a topological scale. This allows these paths to be used to encode large-scale morphological differences, thereby extracting long-range distinguishing features in geometrically homogeneous regions. Without the approximate geodesic distance set, normal vector features would be highly similar over large areas, failing to support the construction of a globally unique structural fingerprint.
[0086] S15: Construct a normal vector geodesic distance association graph based on a multi-view normal vector enhanced point cloud set, a spatial adjacency table, and an approximate geodesic distance set.
[0087] Specifically, each point in the multi-view normal vector augmented point cloud set is treated as a node in the normal vector geodesic distance correlation graph. Geometric attributes such as 3D coordinates, normal vector, viewpoint number, and local curvature are assigned to each node. Then, based on the spatial adjacency table, a directed edge is established for each pair of adjacent points. The geodesic path length in the approximate geodesic distance set is used as the geodesic distance attribute of this directed edge, and the angle between the normal vectors of corresponding two points in the multi-view normal vector augmented point cloud set is used as the angle between the normal vectors of this directed edge. Simultaneously, the local approximate geodesic path number to which this edge belongs is recorded. By assigning the above attributes to all nodes and all edges, a normal vector geodesic distance correlation graph containing node geometric attributes and edge geodesic distance and normal vector angle attributes is constructed.
[0088] For example, with Its effective adjacent points For example, a directed edge between them: The node attributes include global point index 12847, 3D coordinates (12.342, 8.156, 5.723) mm, normal vector (0.278, -0.095, 0.956), viewpoint number 1, and local curvature. ; The node attributes include global point index 12851, 3D coordinates (12.351, 8.162, 5.718) mm, normal vector (0.285, -0.088, 0.954), viewpoint number 1, and local curvature. The geodesic distance attribute of this directed edge is 0.0134mm (the geodesic distance between two directly adjacent points is equal to the Euclidean distance), and the angle attribute of the normal vector is 1.62°. The entire geodesic distance normal vector graph contains 300,000 nodes and approximately 7.2 million directed edges, with an average of 24 outgoing edges per node.
[0089] Specifically, S15 transforms the originally discrete and independent point cloud samples into a geodesic distance correlation graph with a topological structure. On one hand, nodes record local geometric information; on the other hand, edges record the intrinsic connectivity along the surface and their length scale and directional consistency, so that each point no longer exists in isolation but is embedded in a network reflecting the overall surface orientation. For high-brightness metallographic workpieces, traditional feature descriptions show a large number of similar curvature and normal vector statistical patterns in different regions. The geodesic distance correlation graph introduces geodesic distance and path topology, making the connectivity pattern of each point in the graph different, thus forming a global encoding similar to a structural fingerprint. Without the geodesic distance correlation graph, it is difficult to introduce long-range consistency constraints at the algebraic level, and the registration algorithm is still limited to local greedy search, easily getting trapped in local minima of incorrect matching on smooth surfaces.
[0090] S2: Adjacency weight normalization is performed based on the geodesic distance correlation graph of the normal vector. A sparse matrix is constructed by using the inverse geodesic distance ratio and the exponential decay function of the angle between the normal vector and the geodesic distance to obtain the constraint propagation strength matrix.
[0091] Furthermore, S2 includes:
[0092] S21: Construct a node index mapping table based on the geodesic distance correlation graph of normal vector.
[0093] Specifically, using the geodesic distance correlation graph as input, the total number of nodes in the graph is counted, and a matrix index is assigned to each node. A one-to-one mapping is established between the global point index of the node in the point cloud and the matrix row and column numbers, forming a node index mapping table. This table uses the global point index as the key and the matrix row and column numbers as the value, and is used to map the node positions in the graph structure to the row and column positions of the matrix when constructing the constraint propagation strength matrix later.
[0094] For example, the geodesic distance correlation graph contains 300,000 nodes, with matrix row and column numbers assigned sequentially starting from 0. Example of node index mapping: global point index 12847 maps to matrix row and column number 2846, global point index 12851 maps to matrix row and column number 2850, and global point index 50126 maps to matrix column number 48564. The resulting constraint propagation strength matrix has a dimension of 300,000 × 300,000.
[0095] Specifically, S21 uses a node index mapping table to establish a mapping relationship between the point cloud topology and the matrix algebra structure, enabling subsequent global propagation of constraints on the graph using matrix operations. Without the node index mapping table, it would be impossible to accurately convert the node relationships in the normal vector geodesic distance correlation graph into matrix coordinates, and the constraint propagation strength matrix could not be established, thus undermining the foundation for subsequent matrix propagation steps.
[0096] S22: Calculate the original constraint weight set based on the geodesic distance correlation graph of the normal vector and the node index mapping table.
[0097] Specifically, taking each directed edge in the normal vector geodesic distance correlation graph as an object, the original constraint strength is calculated through its geodesic distance attribute and the angle attribute between the normal vectors, and the original constraint strengths corresponding to all edges are combined into an original constraint weight set.
[0098] Specifically, S22 includes:
[0099] S221, based on the geodesic distance attribute of each directed edge in the geodesic distance correlation graph, an inverse proportional transformation is performed on the geodesic distance to obtain the inverse proportional weight. The inverse proportional transformation adopts a linear normalization method, which linearly scales the geodesic distance within the global geodesic distance range, and then takes the reciprocal of the scaling result to avoid numerical instability caused by the minimum value of the geodesic distance.
[0100] S222, based on the angle attribute of the normal vector of each directed edge in the geodesic distance correlation graph, an exponential decay transformation is performed on the angle of the normal vector to obtain the weight of the normal vector angle. The exponential decay transformation uses a fixed decay coefficient. By scaling the angle of the normal vector to a range using linear normalization, and then applying an exponential function to the scaling result, smaller angles are mapped to weights close to 1, and larger angles are mapped to weights close to 0. A fixed decay coefficient of 5 is preferred, so that the weight of the 30° normal vector angle decays to 0.6 and the weight of the 45° angle decays to 0.3, which conforms to the geometric consistency decay law of polished surfaces.
[0101] S223, multiply the geodesic inverse weight of each directed edge by the normal vector angle weight to obtain the original constraint strength of the directed edge, and record the original constraint strength into the original constraint weight set using the corresponding row and column number in the node index mapping table as the index.
[0102] For example, with arrive Calculate the original constraint strength using a directed edge as an example. The geodesic distance of this edge... =0.0134mm, global geodetic distance range is [0.0089mm, 5.234mm]. The linearly normalized geodetic distance. Add stability constant After setting the value to 0.01, the geodesic inverse weighting value is... The angle between the normal vectors of this side. Normalized to the [0,1] interval: (The threshold for the included angle of the normal vector is 15°), the weight of the normal vector angle. , It is an exponential function with the natural constant as its base. Original constraint strength. In contrast, for geodetic distances that are relatively large ( =2.156mm) and the included angle of the normal vector is relatively large ( The other side of (12.3°), normalized geodesic distance Geodesic inverse weighting Angle between normalized normal vectors normal vector angle weight Original constraint strength The distance is significantly lower than the previous edge, which shows that edges with close geodesic distances and consistent normal vectors have stronger constraint propagation capabilities.
[0103] Specifically, S22 encodes the in-surface distance and local geometric consistency into the original constraint strength by combining the inverse ratio of geodesic distance and the exponential decay of the normal vector angle. The shorter the geodesic distance and the smaller the normal vector angle, the greater the original constraint strength, indicating that the two points connected by the edge have a strong coupling relationship on the surface and should bear a higher constraint weight in subsequent error propagation. For bright metallographic surfaces, Euclidean distance alone is insufficient to distinguish long-range geometric differences in flat areas. However, the geodesic distance introduces the in-surface distance scale, and the normal vector angle introduces local directional consistency, allowing the set of original constraint weights to highlight reliable geometric connections on the topology map and weaken connections that may cross mismatched regions, thus suppressing the propagation of errors along erroneous paths from the source.
[0104] S23: Based on the original constraint weight set, linearly normalize the outgoing edges of each node to obtain the normalized constraint weight set.
[0105] Specifically, taking the original constraint weight set as input, the original constraint strengths of all outgoing edges of each node are first accumulated according to the node index mapping table to obtain the total original constraint strength for each node. Then, the original constraint strengths are linearly scaled according to the preset target total output of node constraints to obtain the normalized constraint weight set. The target total output of node constraints is set to a uniform constant (usually normalized to 1), so that each row of constraints constitutes a probabilistic propagation operator, ensuring energy conservation during matrix iteration and avoiding amplification of local density deviations.
[0106] Specifically, S23 includes:
[0107] S231, For each node, calculate the total amount of original constraints for that node based on all elements in the original constraint weight set that are indexed by that node as the row.
[0108] S232, based on the total original constraints of each node and the preset target total of node constraint outputs, calculate the linear normalization coefficient. The linear normalization coefficient is obtained by dividing the preset target total of node constraint outputs by the total original constraints. When the total original constraints are too small, causing the normalization coefficient to be too large, a maximum amplification factor is set to truncate the normalization coefficient to ensure numerical stability. The maximum amplification factor is selected based on the order-of-magnitude difference between the total constraints in the sparse region and the dense region, ensuring that the normalization coefficient does not over-expand and that the residual propagation still maintains a linear response.
[0109] S233, multiply the edge weight of each node in the original constraint weight set by the corresponding linear normalization coefficient to obtain the normalized constraint weight set, so that the sum of all outgoing edge weights of each node is equal to the total number of node constraint output targets.
[0110] For example, with nodes For example, the original constraint strengths of its 24 outgoing edges are 53.68, 48.92, 51.23, 47.56, ... (a total of 24 values), which are summed to obtain the total original constraint strength. If the preset node constraint output target total is 1.0, then the linear normalization coefficient... Multiply the original constraint strength of each outgoing edge by a normalization coefficient. arrive edge normalized weights For another node Because it is located in a sparse region of the point cloud, with only 8 outgoing edges, the total original constraints are... Normalization coefficient Since this coefficient is less than the maximum magnification factor of 10, no truncation is required. After normalization, the sum of the outgoing edge weights of all nodes is 1.0, forming the row characteristics of the probabilistic propagation matrix.
[0111] Specifically, S23 ensures that the total amount of constraints propagated outward from each node in the normal vector geodesic distance correlation graph is of the same order of magnitude by linearly normalizing the outward edges of each node. This avoids local high-density regions from having excessively high weights in subsequent error propagation due to the large number of adjacent points. For multi-view scanning scenarios, the point cloud density in different regions may vary significantly. Without outward edge normalization, high-density regions will have a disproportionate impact on error propagation, leading to bias in the closed-loop consistency evaluation. Normalizing the constraint weight set achieves overall energy balance while maintaining relative weight differences, laying the foundation for constructing a stable constraint propagation strength matrix.
[0112] S24: Construct a sparse square matrix based on the normalized constraint weight set and node index mapping table, and obtain the constraint propagation strength matrix through threshold filtering.
[0113] Specifically, using the normalized constraint weight set as input, the dimension of the matrix is determined according to the node index mapping table. Each non-zero normalized constraint weight is recorded as a non-zero element in the sparse matrix draft. Subsequently, based on a preset weight threshold, the non-zero elements in the sparse matrix draft are filtered, retaining only elements greater than or equal to the weight threshold as effective constraint propagation strengths, thus obtaining the final constraint propagation strength matrix. The weight threshold is determined by analyzing the cumulative distribution function of the normalized constraint weights, retaining the top 20 percentiles covering the main energy transfer paths, and eliminating long-tail weak connections to reduce matrix complexity.
[0114] Specifically, S24 includes:
[0115] S241. Based on the number of nodes in the node index mapping table, create a sparse square matrix draft with the dimension being the number of nodes multiplied by the number of nodes, and use a compressed storage structure with rows as the primary index to record non-zero elements.
[0116] S242, write each edge weight in the normalized constraint weight set into the corresponding row and column positions of the sparse matrix draft according to the node index mapping table to form a complete sparse matrix draft.
[0117] S243, for each non-zero element in the initial draft of the sparse matrix, compare it with a preset weight threshold. Set the elements smaller than the weight threshold to zero and delete them from the sparse storage structure, retaining only the elements greater than or equal to the weight threshold, thus obtaining the constraint propagation strength matrix. The weight threshold is determined by analyzing the cumulative distribution function of the normalized constraint weights and selecting the values corresponding to the top 20 percentiles covering the main energy transfer paths.
[0118] For example, the initial draft of the sparse matrix has a dimension of 300,000 × 300,000, theoretically having... The system contains approximately 7.2 million non-zero elements, resulting in a sparsity of 99.992%. Statistical analysis of the normalized constraint weights revealed that the weight values are distributed in the range [0.0001, 0.15], with a mean of 0.0417 and a standard deviation of 0.0312. The cumulative distribution function was calculated, and the weight threshold corresponding to the top 20 percentiles was set at 0.018. Using this threshold, elements with a normalized weight of 0.0612 (>0.018) on one side were retained, while those with a normalized weight of 0.0089 (<0.018) were discarded. After filtering, the constraint propagation strength matrix retained approximately 1.45 million non-zero elements, representing 20.1% of the original non-zero elements, and the storage space decreased from 86.4 MB to 17.4 MB. In the corresponding row 2846, there were originally 24 non-zero elements. After threshold filtering, 8 main constraint channels were retained.
[0119] Specifically, S24 uses threshold filtering to suppress long-distance weak connections and unreliable edges with large differences in normal vectors in the graph, keeping the constraint propagation strength matrix structurally sparse. This helps reduce computational complexity and storage overhead during subsequent matrix multiplication. Simultaneously, the retained non-zero elements correspond to reliable geodesic adjacency relationships and normal vector consistency, playing a dominant role in error propagation and ensuring that constraint information is transmitted along the true path of the surface. The constraint propagation strength matrix transforms the original local constraint relationships on the graph structure into algebraic linear operators, enabling subsequent multi-step propagation of the residual vector through the matrix, achieving the deduction from local errors to the global error distribution.
[0120] S3: Apply the constraint propagation intensity matrix to the multi-view point cloud registration residuals, accumulate the residual vectors through matrix propagation, generate a scalar field by regular sampling in three-dimensional space, and obtain the closed-loop error energy field.
[0121] Furthermore, S3 includes:
[0122] S31: Generate a global coordinate point cloud set based on the multi-view original point cloud set and the initial registration transformation parameter set.
[0123] Specifically, using a multi-view original point cloud set as input, and combining it with an externally pre-calculated initial registration transformation parameter set, the point cloud of each viewpoint is transformed from its respective local coordinate system to a unified global coordinate system, generating a global coordinate point cloud set. The initial registration transformation parameter set can be obtained through existing iterative nearest-point algorithms or calibration methods based on calibration fixtures, and includes rotation and displacement parameters of each viewpoint relative to the global coordinate system.
[0124] Specifically, for each viewpoint in the multi-view original point cloud set, according to the corresponding transformation in the initial registration transformation parameter set, coordinate transformation is performed on all points under that viewpoint, and the transformed coordinates are recorded together with the original viewpoint number and point index to form a global coordinate point cloud set.
[0125] For example, taking a 6-view scan as an example, the initial registration transformation parameter set contains 6 sets of transformation parameters. Viewpoint 1 serves as the reference viewpoint, and its transformation is a unit transformation (rotation matrix). Translation vector The transformation parameters for viewpoint 2 are rotation matrices. Translation vector From a certain point in perspective 2 For example, transforming to the global coordinate system Calculating matrix multiplication: First component Second component Third component Add the translation vector: .
[0126] Specifically, S31 unifies point clouds scattered across different viewpoint coordinate systems into a single global coordinate framework, facilitating subsequent evaluation of overlapping areas and registration residuals between different viewpoints in global space. For high-brightness curved metallographic workpieces, although the initial registration transformation parameter set contains accumulated errors, it can still serve as a coarse alignment reference, making the overall positional relationship of the multi-viewpoint point clouds close to the true state, providing a starting point for subsequent error refinement based on the constraint propagation intensity matrix. Without this global coordinate point cloud set, it would be difficult to construct a closed-loop error energy field from a global spatial perspective.
[0127] S32: Calculate the initial registration residual vector set based on the global coordinate point cloud set and the geodesic distance correlation diagram of the normal vector.
[0128] Specifically, taking the global coordinate point cloud set and the geodesic distance correlation map of the normal vector as input, each node in the geodesic distance correlation map is mapped to a specific three-dimensional coordinate position in the global coordinate point cloud set. Then, for each node, the corresponding point is found in other perspectives, the spatial position difference is calculated, and an initial registration residual vector set is formed.
[0129] Specifically, S32 includes:
[0130] S321. Based on the node attributes in the normal vector geodesic distance correlation graph, extract the global point index and view number of each node, obtain the global coordinates of the node in the global coordinate point cloud set, and form a node global coordinate sequence.
[0131] S322: Based on the global coordinate sequence of nodes, a local nearest neighbor search is performed on each node in other viewpoints that have overlapping scan relationships with it. Taking into account both Euclidean distance and the angle between normal vectors, the corresponding point is determined. The 3D coordinate difference between the node and the corresponding point is calculated, and this coordinate difference is used as the initial registration residual vector of the node and recorded in the initial registration residual vector set. For nodes that do not find a corresponding point that satisfies the normal vector angle constraint within the limited search radius, their residual vector is set to zero, and the node is recorded as being in a missing correspondence state.
[0132] For example, a point in viewpoint 1 For example, it searches for the corresponding point in the overlapping region of viewpoint 2. The search radius is set to 1.0 mm, and the normal vector angle constraint is 10°. In the global coordinate point cloud of viewpoint 2, the distance... The nearest point that satisfies the normal vector constraint is The angle between the normal vectors is Initial registration residual vector residual vector magnitude For a point located at the edge of viewpoint 1 If no corresponding point satisfying the normal vector constraint is found within the limited search radius, its residual vector is set to the zero vector (0,0,0)mm, and it is marked as a missing correspondence state. Of the total 300,000 nodes, 234,567 nodes successfully established correspondences, and 65,433 nodes were in a missing correspondence state, resulting in a correspondence establishment rate of 78.2%.
[0133] Specifically, S32 transforms the initial registration error into a node-level residual vector by finding corresponding points across viewpoints in the global coordinate system. Furthermore, it establishes correspondences only in geodetically adjacent regions with consistent normal vectors, reducing random disturbances introduced into the point cloud data. For bright curved metallographic surfaces, the point cloud after coarse registration approximates the true position overall, but local translational or rotational errors accumulated along the scanning path may still exist. The initial registration residual vector set explicitly represents these local inconsistencies in vector form, providing the original error signal source for subsequent constraint propagation.
[0134] S33: Calculate the propagation residual vector set based on the constraint propagation strength matrix and the initial registration residual vector set.
[0135] Specifically, using the constraint propagation intensity matrix as a linear operator, the initial registration residual vector set is used as the input residual vector. The weighted cumulative residual result of each node is calculated by matrix multiplication to obtain the propagation residual vector set.
[0136] Specifically, S33 includes:
[0137] S331, arrange the initial registration residual vector set according to the node order in the node index mapping table, construct the residual vector sequence, so that each element of the residual vector sequence corresponds one-to-one with the corresponding row and column index of the constraint propagation strength matrix.
[0138] S332, for each node, based on the non-zero elements in the constraint propagation strength matrix with that node as the row index, calculate the residual contribution propagated from each neighboring node to that node. Multiply the initial registration residual vectors of each neighboring node by the corresponding constraint propagation strength and then sum the vectors to obtain the propagation residual vector of that node. Record the propagation residual vectors of all nodes as a propagation residual vector set.
[0139] For example, with nodes Taking row 2846 of the matrix as an example, the propagation residual vector is calculated. The non-zero elements in row 2846 of the constraint propagation strength matrix are located in columns 2850, 2853, 2861, 2872, 2889, 2901, 2923, and 2945, with corresponding weights of 0.1823, 0.1567, 0.1342, 0.1256, 0.1178, 0.1045, 0.0956, and 0.0833, respectively, summing to 1.0. The initial registration residual vectors for the corresponding nodes are as follows: =(0.042,-0.018,-0.031)mm、 =(0.038,-0.012,-0.028)mm、 =(0.045,-0.021,-0.033)mm、 =(0.039,-0.015,-0.026)mm、 =(0.041,-0.019,-0.029)mm、 =(0.037,-0.011,-0.024)mm、 =(0.044,-0.020,-0.032)mm、 =(0.040,-0.016,-0.027)mm. Propagation residual vector. ; Calculate each component: x component The y-component is calculated similarly, yielding -0.0162 mm; the z-component yields -0.0289 mm. Propagation residual vector. =(0.0408,-0.0162,-0.0289)mm, mold length is 0.0523mm. (And...) Compared to the initial registration residual vector (0.036, -0.014, -0.025) mm, the magnitude of the propagated residual vector increased by 13.7%, reflecting the cumulative effect of neighborhood error.
[0140] Specifically, S33 utilizes the constraint propagation strength matrix to spread local residuals along the geodesic path and in the same direction as the normal vector in the graph. This ensures that the propagation residual vector of each node not only includes its own matching error but also incorporates error information from reliable nodes in the topological neighborhood. This propagation mechanism allows errors that are not directly observable at a single point to gradually emerge through the accumulation of neighborhood constraints, thereby revealing systematic registration deviations that accumulate gradually along the closed-loop path. For high-brightness curved metallographic workpieces, this error propagation along the geodesic path can effectively distinguish between random disturbance errors and closed-loop cumulative errors in point cloud data, providing a globally consistent error signal for subsequent energy field construction.
[0141] S34: Based on the propagation residual vector set and the global coordinate point cloud set, a regular sampling grid is constructed in three-dimensional space, and a closed-loop error energy field is generated.
[0142] Specifically, taking the propagation residual vector set and the global coordinate point cloud set as input, the enclosing cube containing all point clouds is first determined in the global 3D space, and a set of regular 3D sampling grid nodes is constructed within this range according to a preset grid spacing. Then, the residual vector of each node in the propagation residual vector set is mapped to the set of regular 3D sampling grid nodes, and the error energy value of each grid node is calculated to obtain the closed-loop error energy field. The grid spacing is taken as 2-4 times the average spacing of the point clouds to satisfy the sampling theorem.
[0143] Specifically, S34 includes:
[0144] S341, based on the global coordinate point cloud set, calculates the minimum and maximum coordinates of the point cloud in each of the three coordinate axes, expands the 3D coordinate range by a preset boundary margin, determines the range of the enclosing cube, and uniformly divides the enclosing cube range into a set of regular 3D sampling grid nodes according to a preset grid resolution. The boundary margin is taken as the 3σ range of the registration error vector to ensure field continuity and cover all possible deviations. The grid resolution is determined by the size of the enclosing cube and the grid spacing, resulting in an integer-dimensional number of grid nodes. The 3σ range refers to the interval centered on the mean of the error vector, covering approximately 99.73% of the error vector.
[0145] S342, based on the node index mapping table, establishes an association between each residual vector in the propagation residual vector set and the global coordinates of its corresponding node, calculates the magnitude of the residual vector, and uses this as the error energy value of the global coordinate position of the corresponding node. Based on the node's global coordinates, finds one or more nearest grid nodes in the regular 3D sampling grid node set, and distributes the error energy values to these grid nodes according to spatial distance weights. The error energy contribution from surrounding nodes is accumulated on each grid node to obtain the initial error energy distribution of the grid.
[0146] S343, spatial smoothing interpolation is performed on the initial error energy distribution of the grid to fill the energy value gaps of grid nodes that are not directly covered, forming a continuous closed-loop error energy field. The spatial smoothing interpolation can employ multiple three-dimensional convolution smoothing or interpolation methods based on local polynomial fitting to ensure the continuity of the energy field between adjacent grid nodes and preserve the gradient change characteristics of error concentration regions.
[0147] For example, the coordinate range of the global coordinate point cloud set is: x∈[2.156,34.523]mm, y∈[-1.234,19.876]mm, z∈[0.567,13.245]mm. The statistical characteristics of the magnitude of the propagation residual vector are: mean μ=0.0456mm, standard deviation σ=0.0187mm, and 3σ range is 0.0561mm. The boundary margin is set to 0.1mm, and the range of the expanded bounding cube is x∈[2.056,34.623]mm, y∈[-1.334,19.976]mm, z∈[0.467,13.345]mm. The average spacing of the point cloud is 0.1mm, and the grid spacing is set to 0.3mm (3 times the average spacing). Mesh dimension calculation: Nx=ceil[(34.623-2.056) / 0.3]+1=110, Ny=ceil[(19.976+1.334) / 0.3]+1=72, Nz=ceil[(13.345-0.467) / 0.3]+1=44, the total number of mesh nodes is 110×72×44=348480. Taking mesh node G(35,28,18) as an example, its spatial coordinates are (2.056+35×0.3,-1.334+28×0.3,0.467+18×0.3)=(12.556,7.066,5.867)mm. Within a 1.0 mm radius of this grid node, there are 23 point cloud nodes with propagation residual vector magnitudes of 0.0523 mm, 0.0487 mm, and 0.0512 mm, respectively. The error energy value of this grid node, E(35,28,18) = 0.0498 mm², is obtained by accumulating these nodes with inverse distance weights. After 3D Gaussian convolution smoothing (convolution kernel σ = 0.5 grid units), a continuous closed-loop error energy field is formed, with an energy value range of [0.0012, 0.1823] mm².
[0148] Specifically, S34 transforms the discrete set of propagation residual vectors into a continuous closed-loop error energy field through a regular 3D sampling grid. This allows the registration residuals, originally scattered across various points, to form a spatially differentiable scalar field distribution. For high-brightness curved metallographic workpieces, closed-loop errors often accumulate along the scanning path and exhibit abrupt changes at the closure points. The closed-loop error energy field reveals the concentrated regions of these accumulated effects through spatial gradient changes, enabling subsequent location of the error concentration zone via the field's gradient extrema, without relying on isolated discrete residual statistics. The construction of the scalar field provides the foundation for transforming the registration problem into a continuous optimization problem.
[0149] S4: Construct graph cut network nodes at the extreme values of the gradient of the closed-loop error energy field, use the energy field integral value as the edge capacity, execute the minimum cut algorithm under geodesic constraints, and complete the fine registration of the global point cloud.
[0150] Furthermore, S4 includes:
[0151] S41: Calculate the gradient field based on the closed-loop error energy field and extract the set of gradient extrema.
[0152] Specifically, using the closed-loop error energy field as input, for each grid node in the set of regular 3D sampled grid nodes, the energy difference between adjacent grid nodes is calculated along the three coordinate axes to obtain the approximate value of the gradient vector and the gradient magnitude of that node, thereby constructing a gradient field. In the gradient field, each grid node is compared with its neighboring grid nodes. If the gradient magnitude of a node reaches a local maximum in its local neighborhood, and its corresponding closed-loop error energy value exceeds a preset error significance threshold, then the node is added to the set of gradient extreme points. The error significance threshold is based on the gradient magnitude histogram of the error energy field, selecting statistical segmentation points that distinguish high-gradient abrupt changes from smooth backgrounds, such as bi-distribution intersections or inflection points.
[0153] Specifically, in regions with strong closed-loop errors, the closed-loop error energy field exhibits significant energy transitions near these regions, and the corresponding gradient magnitude reaches a large value at the boundary of these regions. The set of gradient extrema points obtained through S41 is concentrated near the error abrupt change zone. These points reflect the spatial location of closed-loop inconsistencies in multi-view registration, providing candidate key nodes for subsequent construction of graph cut networks.
[0154] For example, let's calculate the gradient vector using grid node G(35,28,18). Energy difference along the x-direction: Along the y-direction: Along the z-direction: Gradient vector gradient magnitude The gradient magnitudes were statistically analyzed, with a mean of 0.00234 mm² / mm and a standard deviation of 0.00156 mm² / mm. The significance threshold for the error, determined by the bidistribution intersection method, was 0.00567 mm² / mm. The gradient magnitude of node G(35,28,18) is 0.00873 > 0.00567, and it is a local maximum within a 3×3×3 neighborhood; therefore, it was added to the gradient extremum point set. A total of 1247 gradient extremum points were extracted from all 348480 grid nodes, distributed along the overlapping boundary of viewpoints 2 and 5 (423 points), the overlapping boundary of viewpoints 4 and 6 (356 points), and other overlapping boundary regions (468 points).
[0155] Specifically, S41 uses gradient field analysis to transform the error accumulation information reflected in the closed-loop error energy field into a set of spatially significant structural points. These gradient extrema reveal the spatial skeleton of the scan path's closed loop or large error transition regions. If this gradient analysis is skipped and optimization is performed directly on the energy field, it will be difficult to automatically determine which regions should be the focus of global registration adjustment. The set of gradient extrema provides a clear basis for constructing targeted graph cut networks.
[0156] S42: Construct a graph cut network node set and a connection edge capacity set based on the gradient extreme point set, the multi-view original point cloud set, and the closed-loop error energy field.
[0157] Specifically, using the set of gradient extrema points as a reference, the projection of the multi-view scanning path onto the workpiece surface is divided into several error-sensitive regions and relatively stable regions. Each viewpoint point cloud as a whole is treated as a graph cut network node, forming a graph cut network node set. Then, for viewpoint pairs with overlapping scanning relationships, energy integration is performed based on the closed-loop error energy field within their overlapping regions to obtain the edge capacity connecting the two viewpoint nodes. The edge capacities corresponding to all viewpoint pairs are recorded as a set of connection edge capacities.
[0158] Specifically, S42 includes:
[0159] S421, based on a global coordinate point cloud set and a gradient extremum point set, identifies scanning trajectory segments passing through the gradient extremum point set on the workpiece surface, and designates these trajectory segments as error-sensitive regions, while the remaining trajectory segments are designated as relatively stable regions. According to the positional relationship between the scanning path and the error-sensitive regions, the coverage ratio of each viewpoint point cloud within the error-sensitive regions is labeled, which is used to differentiate the edge capacity in the subsequent graph cut network.
[0160] S422, for each pair of point clouds with geometric overlap, extract a subset of point clouds in the overlapping region of the two viewpoints from the global coordinate point cloud set. Based on the closed-loop error energy field, perform numerical integration on the spatial location covered by the point cloud subset to obtain the total error energy of the overlapping region. Based on the error energy and the coverage ratio of the two viewpoints in the error-sensitive region, calculate the edge capacity connecting the network nodes corresponding to the two viewpoints. Record the edge capacity of all viewpoint pairs as a set of connection edge capacities.
[0161] For example, a 6-view scan forms 6 graph cut network nodes. to There is an overlap between adjacent viewpoints: , , , , , There are a total of 6 pairs of adjacent viewpoints and several cross-viewpoint overlapping pairs. Taking the overlapping region of viewpoint 2 and viewpoint 5 as an example (this region contains 423 gradient extremum points), a subset of the point cloud of the overlapping region of the two viewpoints, totaling 12456 points, is extracted, and energy integration is performed within the corresponding grid node coverage area: ,in This represents the volume of a grid cell. The integration region contains 1823 grid nodes. The integration result... Unit energy. Viewpoint 2 covers 32.4% of the error-sensitive region, while viewpoint 5 covers 28.7%. (Combined weighting coefficient) Edge capacity = = Unit capacity. A similar calculation yields the complete set of connected edge capacities: =0.0234、 =0.0312、 =0.0456、 =0.0523、 =0.0678、 =0.0389、 =0.1075、 =0.0892 unit capacity.
[0162] Specifically, S42 combines the closed-loop error energy field with the multi-view overlap relationship, allowing the edge capacity of the graph cut network to directly reflect the degree of registration consistency between different views in the overlapping region. The larger the error energy and the more gradient extrema covered the overlapping region, the larger the corresponding edge capacity, indicating significant closed-loop inconsistency in the relative registration of that view pair. Subsequent minimum cuts tend to focus on these high-capacity edges to introduce new degrees of freedom for registration adjustment. Unlike traditional approaches that only set similarity weights based on point-to-point distance, the connection edge capacity set comprehensively considers both the global closed-loop error distribution and the importance of local overlapping regions, which is beneficial for accurately reflecting the spatial priority of registration adjustment in network flow optimization.
[0163] S43: Construct a geodesic constraint graph cut network based on the geodesic distance correlation graph of normal vector, the set of connection edge capacity and the set of gradient extremum points.
[0164] Specifically, using the geodesic distance correlation graph of the normal vector as the intrinsic geometric constraint of the surface, the set of connection edge capacities as the edge weight constraint, and the set of gradient extremum points as the key segmentation reference points, each viewpoint point cloud is regarded as a viewpoint node in the graph cut network. A source node representing the global reference coordinate system and a sink node representing the closed-loop correction set are added to construct a geodesic constraint graph cut network. In this network, the edge capacity between viewpoint nodes is provided by the set of connection edge capacities. The edge capacity between the source node and each viewpoint node, and between each viewpoint node and the sink node, is set according to their coverage in the error-sensitive region and the length of the corresponding geodesic path in the geodesic distance correlation graph of the normal vector. Simultaneously, by restricting the direction of the geodesic path corresponding to the cut edge, geodesic constraint embedding is completed.
[0165] Specifically, S43 includes:
[0166] S431, based on the geodesic distance correlation graph of normal vector, for each pair of view nodes with connection edge capacity, find the shortest geodesic path connecting the representative points of their overlapping area, and use the geodesic distance of the shortest geodesic path and the number of gradient extremum points passed through the path as the geodesic attributes of the edge, and record them in the geodesic constraint graph cut network.
[0167] S432, based on geodesic properties and the set of connected edge capacities, modifies the edge capacity between viewpoint nodes. Edges whose geodesic paths significantly deviate from the main surface of the workpiece or do not pass through any gradient extrema are subject to reduced effective capacity, or even marked as disallowed for cutting. This results in a geodesic constraint graph cut network that only allows cutting along the geodesic path of the true surface. See also Figure 3 This is a schematic diagram of a geodesic constraint graph cut network provided in an embodiment of this application. Figure 3As shown, in the multi-view point cloud registration scenario of a high-brightness curved metallographic workpiece, the geodesic constraint graph cut network consists of source nodes, sink nodes, and multiple view nodes, forming a complete network flow structure. The source nodes represent the global reference coordinate system and are connected to viewpoints 1, 2, and 3 in the reference viewpoint set via green connecting edges. These connecting edges have large capacities, indicating that the reference views tend to maintain their current registration state. The sink nodes represent the closed-loop correction set and are connected to viewpoints 4, 5, and 6 in the correction viewpoint set via red connecting edges. These connecting edges also have large capacities, indicating that the correction views need registration parameter adjustments. The orange dashed lines in the figure represent connecting edges that cross the reference viewpoint set and the correction viewpoint set. Their edge capacity is determined by the integral value of the closed-loop error energy field in the corresponding overlapping region of the viewpoints; the thicker the edge, the greater the error energy in the overlapping region. The blue solid lines represent connecting edges between viewpoints within the same set. The geodesic path constraints marked by the purple curve in the figure ensure that the cut edges in the network are distributed only along the true geodesic direction of the workpiece surface, avoiding registration adjustments crossing discontinuous regions of the curved surface. The central red dashed line indicates the minimum cut position, dividing the network into two mutually exclusive subsets: a set of reference views connected to the source node and a set of corrected views connected to the sink node. Solving this network using the maximum flow minimum cut algorithm allows for the simultaneous determination of which views require registration parameter adjustments. This transforms the multi-view registration problem from a traditional sequential iterative process into a global combinatorial optimization problem, effectively avoiding the problem of traditional iterative nearest-point algorithms getting trapped in incorrect local minima on bright metallographic surfaces due to local geometric similarity.
[0168] S433, based on the coverage of each view node in the error-sensitive region, sets a larger capacity between view nodes with smaller coverage and lower overlap error energy and source nodes to encourage them to maintain the current registration state; sets a larger capacity between view nodes with larger coverage and higher overlap error energy and sink nodes to encourage them to enter the closed-loop correction set in the minimum cut result.
[0169] For example, the geodesic attribute is calculated using the edge between viewpoints 2 and 5. In the geodesic distance correlation diagram, the shortest geodesic path length from the representative point P_rep2=(14.523,10.234,6.123)mm in the overlapping area of viewpoint 2 to the representative point P_rep5=(18.234,12.567,5.456)mm in the overlapping area of viewpoint 5 is 8.234mm, and this path passes through 87 gradient extrema points. The geodesic attribute is recorded as ( =8.234mm, =87). Edge capacity correction coefficient γ = 1 + 0.1 × =1+0.1× =1 + 0.1 × 1.94 = 1.194. Adjust the capacity after correction. =0.1075 × 1.194 = 0.1284 unit capacity. For the cross-viewpoint edge between viewpoint 1 and viewpoint 4, the geodesic path passes through only 12 gradient extrema points, and the correction coefficient γ = 1 + 0.1 × =1.108, this edge is marked as an allowed cut edge but with a low weight. Connection capacity settings between source node S and each viewpoint node: Viewpoint 1 error-sensitive area coverage ratio is 8.2%. =1 / (0.082+0.1)=5.49 units of capacity; the coverage ratio of viewing angle 5 is 28.7%. =1 / (0.287+0.1)=2.58 unit capacity. Connection capacity settings between sink node T and each viewpoint node: =0.287 × 10 = 2.87 unit capacity; =0.082×10=0.82 unit capacity.
[0170] Specifically, S43 introduces the inherent geometry of the workpiece surface into the graph cut network through the geodesic distance correlation graph of the normal vector. This ensures that potential cut paths can only unfold along the geodesic direction of the surface, preventing the registration adjustment corresponding to the cut from crossing the solid region or propagating along non-physical directions. The capacity of the connecting edges is reweighted under the geodesic property constraints, thus prioritizing cut edges that are distributed along the error concentration region and conform to the geodesic direction in the maximum flow minimum cut solution. This guarantees that the final segmentation result conforms to both the closed-loop error distribution and the actual geometry of the workpiece.
[0171] S44: Execute the maximum flow minimum cut algorithm on the geodesic constraint graph cut network to obtain the global fine registration transformation parameter set.
[0172] Specifically, using a geodesic constrained graph cut network as input, source and sink nodes are selected in the graph. The maximum flow minimum cut algorithm is used to calculate the maximum flow value from the source node to the sink node and the corresponding minimum cut set on the network. The view nodes on both sides of the edges in the minimum cut set are divided into a reference view set that maintains the current registration state and a correction view set that requires closed-loop correction. Subsequently, based on the connection relationship between the initial registration transformation parameter set in the reference view set and the correction view set in the geodesic distance correlation graph of the normal vector, a global consistency constraint equation system is constructed to jointly optimize the registration transformation parameters of the correction view set, resulting in a global fine registration transformation parameter set.
[0173] Specifically, S44 includes:
[0174] S441, in a geodesic constrained graph cut network, execute the maximum flow minimum cut algorithm to obtain a minimum cut scheme that divides all view nodes into two mutually exclusive subsets. View nodes connected to the source node but not through the cut edge are classified as the baseline view set, and view nodes connected to the sink node but not through the cut edge are classified as the correction view set.
[0175] S442, based on the geodesic paths and overlapping area corresponding to the reference view set and the correction view set in the normal vector geodesic distance correlation diagram, constructs a set of registration residual equations that reflect the global closed-loop consistency. The registration transformation parameters in the reference view set are kept unchanged, and the registration transformation parameters in the correction view set are taken as unknowns. The equations are solved by least squares optimization to obtain the increment of the registration transformation parameters of each correction view. The increment is superimposed on the initial registration transformation parameter set to obtain the global fine registration transformation parameter set.
[0176] For example, the maximum flow minimum cut algorithm is performed on a geodesic constrained graph cut network, with augmenting path search using a BFS strategy. The initial flow value is 0, and augmenting paths are discovered sequentially: (Bottleneck capacity 2.58) (Bottleneck capacity 1.89) (Bottleneck capacity 2.12), etc., after 7 augmentations, the maximum flow value F_max = 8.73 units is reached. The minimum cut set contains edges. The sum of the cut capacities is 0.0456 + 0.1284 + 0.0389 = 0.2129 units. Based on the minimum cut partition: the baseline view set. Connect to the source node and correct the view set. Connect to the sink node. (From a corrected perspective) For example, a system of registration residual equations is constructed, which is compared with the baseline perspective. The overlapping region contains 12456 pairs of corresponding points, forming a 12456×6 overdetermined system of equations (each pair of points provides 3 coordinate constraints, and 6 rigid body transformation parameters need to be solved: 3 rotation angles and 3 translations). The Levenberg-Marquardt algorithm is used to solve the problem. The initial damping coefficient λ=0.01. After 5 iterations, the problem converges, and the sum of squared residuals decreases from 0.1823 to 0.0034. The registration transformation parameter increment for viewpoint 5 is: rotation increment... =0.0023 rad =-0.0018rad =0.0012 rad, translation increment =-0.0234mm、 =0.0156mm =0.0089mm. The increment is superimposed on the initial parameters to obtain the fine registration transformation parameters. Similar to solving for viewpoints 4 and 6, the final set of global fine registration transformation parameters is obtained.
[0177] Specifically, S44 transforms the multi-view registration problem into a network flow optimization problem with geodesic constraints and closed-loop error energy weights. Guided by the minimum cut result, registration parameters are adjusted only for the set of views located in the region of concentrated closed-loop error. This allows the overall optimization to eliminate closed-loop errors caused by accumulated registration deviations while preserving the stable region. By introducing geodesic path constraints from the geodesic distance correlation graph of the normal vector into the equation system, the correction transformation parameters can be ensured to change continuously along the surface, avoiding unreasonable stretching or folding on the highlighted surface caused by rigid registration adjustments.
[0178] S45: Update the multi-view point cloud positions based on the global fine registration transformation parameter set to obtain the global fine registration point cloud set.
[0179] Specifically, using the original point cloud set from multiple views and the global fine registration transformation parameter set as input, the point cloud of each view is subjected to coordinate transformation according to the corresponding fine registration transformation parameters. The transformed point clouds are then recombined to obtain the global fine registration point cloud set. Comparing the global fine registration point cloud set with the global coordinate point cloud set, it can be seen that the spatial misalignment between the start and end points of the closed-loop path is significantly reduced, and the residuals between the point clouds of each view in the overlapping area tend to be evenly distributed in the closed-loop error energy field and no longer form obvious error concentration bands.
[0180] Specifically, S45 applies the set of global fine registration transformation parameters obtained from network flow optimization to the point cloud entity data, enabling multi-view point clouds to achieve globally consistent alignment in a unified coordinate system and completing the closed-loop correction of the entire registration process. For high-brightness curved metallographic workpieces, this one-time global fine registration avoids the problem of errors gradually propagating and bursting at the closed loop in traditional sequential registration, allowing the automatic scanning and stitching process to be completed stably without manual intervention.
[0181] Specifically, S1 to S4 form an integrated registration framework encompassing local geometric feature extraction, surface topology encoding, constraint algebraic propagation, and global optimization of network flow. S1 elevates the original discrete point cloud into a geometric network with global topological relationships through a geodesic distance correlation graph. This network can characterize differentiated path structures within the surface, even in scenarios with highly homogeneous local geometric statistics, such as bright metallographic surfaces, providing a scale-controllable pathway for subsequent constraint propagation. S2 encodes the local geometric relationships on the graph into a constraint propagation strength matrix, enabling efficient error propagation at the algebraic level through sparse matrix operations, avoiding the time complexity explosion caused by point-by-point brute-force search. S3 utilizes the constraint propagation strength matrix to perform long-range propagation and accumulation of the initial registration residuals, constructing a closed-loop error energy field in three-dimensional space. This transforms the originally discrete residual statistics into a continuous scalar field, with error accumulation manifesting as energy concentration and gradient abrupt changes, facilitating subsequent analysis of closed-loop inconsistencies using field theory methods. S4 further constructs a geodesic constraint graph cut network at the gradient extrema of the closed-loop error energy field. It then uses a maximum flow minimum cut algorithm to solve the global fine registration transformation parameter set in one go, transforming multi-view registration from a local iterative process into a global combinatorial optimization problem. This avoids the problem of iterative nearest-point algorithms easily getting trapped in local minima and ensures that the optimization process conforms to the actual surface geometry of the workpiece under geodesic constraints. Compared to existing methods that rely solely on local geometric similarity for sequential alignment, this scheme tightly integrates local geometry with global topology and closed-loop consistency through a geodesic distance correlation graph of normal vectors and the closed-loop error energy field. This results in stronger stability and controllability of the registration results in high-brightness curved metallographic surface scenarios, effectively suppressing the risk of accumulated errors erupting at the closed loop, reducing reliance on manual intervention and external auxiliary positioning devices, and improving the cycle time adaptability and equipment utilization of automated inspection lines.
[0182] For example, the overall workflow of this method can be summarized as follows: First, original point cloud data of multi-view high-brightness curved metallographic workpieces are collected to construct a multi-view original point cloud set; then, normal vectors are estimated and spatial adjacency relationships are established in each view, and approximate geodesic paths and approximate geodesic distances are obtained through local shortest path search, finally constructing a normal vector geodesic distance correlation graph; next, the original constraint weights are calculated based on the inverse ratio of geodesic distance and the exponential decay of the angle between normal vectors, and a constraint propagation intensity matrix is constructed after linear normalization and threshold screening; based on the coarse registration transformation, the initial registration residuals of each node are calculated, and after diffusion by the constraint propagation intensity matrix, they are mapped to a regular three-dimensional sampling grid to obtain a continuous closed-loop error energy field; finally, error-sensitive regions are extracted at the gradient extrema of the energy field, and a geodesic constraint graph cut network is constructed by combining the overlap relationship between viewpoints and geodesic path attributes. The global fine registration transformation parameter set is solved using the maximum flow minimum cut and global consistency equations, and the multi-view point cloud positions are updated accordingly to obtain a global fine registration point cloud set, providing a reliable three-dimensional data foundation for the subsequent size analysis and morphology evaluation of high-brightness curved metallographic workpieces.
[0183] Example 2:
[0184] This embodiment, based on Embodiment 1, provides a real-time aligned high-brightness curved surface metallographic 3D scanning system, such as... Figure 4 As shown, it includes:
[0185] The module for constructing a geodesic distance correlation graph of normal vectors is used to extract normal vector features from multi-view scanned point clouds, calculate approximate geodesic distances, and construct a geodesic distance correlation graph of normal vectors with geometric attributes of nodes, the geodesic distance of edges, and the angle between the normal vectors.
[0186] The constraint propagation strength matrix construction module is used to normalize the adjacency weights based on the geodesic distance correlation graph of the normal vector, and to construct a sparse square matrix by using the inverse ratio of geodesic distance and the exponential decay function of the angle between the normal vector and the geodesic distance to obtain the constraint propagation strength matrix.
[0187] Closed-loop error energy field generation module: It is used to apply the constraint propagation intensity matrix to the registration residual of multi-view point cloud, accumulate the residual vector through matrix propagation, and generate a scalar field by regular sampling in three-dimensional space to obtain the closed-loop error energy field;
[0188] The global fine registration execution module is used to construct graph cut network nodes at the extreme values of the gradient of the closed-loop error energy field, and execute the minimum cut algorithm under geodesic constraints with the energy field integral value as the edge capacity to complete the global point cloud fine registration.
Claims
1. A real-time aligned high-brightness curved surface metallographic 3D scanning method, characterized in that, The method includes: S1: Extract normal vector features from multi-view scan point cloud, calculate approximate geodesic distance, and construct a normal vector geodesic distance correlation map with node geometric attributes, edge geodesic distance and the angle between the normal vector; S2: Adjacency weight normalization is performed based on the geodesic distance correlation graph of the normal vector. A sparse matrix is constructed by the exponential decay function of the inverse geodesic distance ratio and the angle between the normal vectors to obtain the constraint propagation strength matrix. S3: Apply the constraint propagation intensity matrix to the multi-view point cloud registration residual, accumulate the residual vector through matrix propagation, generate a scalar field by regular sampling in three-dimensional space, and obtain the closed-loop error energy field; S4: Construct graph cut network nodes at the extreme values of the gradient of the closed-loop error energy field, use the energy field integral value as the edge capacity, execute the minimum cut algorithm under geodesic constraints, and complete the fine registration of the global point cloud.
2. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 1, characterized in that, The steps for constructing a normal vector geodesic distance correlation graph include: Construct a multi-view raw point cloud set based on the raw point cloud data output by a multi-view 3D scanning device; Based on the original point cloud set from multiple perspectives, a point cloud set with enhanced normal vectors from multiple perspectives is obtained by using the local surface fitting method. Construct a spatial adjacency table based on a point cloud set enhanced by multi-view normal vectors; Calculate the approximate geodesic path set and approximate geodesic distance set based on the spatial adjacency table and the multi-view normal vector enhanced point cloud set; A normal vector geodesic distance correlation graph is constructed based on a multi-view normal vector enhanced point cloud set, a spatial adjacency table, and an approximate geodesic distance set.
3. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 2, characterized in that, Constructing a spatial adjacency table includes: Based on the point cloud set enhanced by multi-view normal vectors, Euclidean nearest neighbor search is performed on each point using a spatial index structure to obtain a set of candidate spatial nearest neighbor points. Based on the spatial nearest neighbor candidate point set and the normal vector information in the multi-view normal vector augmented point cloud set, the normal vector angle is calculated for each pair of candidate points. Candidate point pairs with a normal vector angle less than the normal vector angle threshold are retained as valid adjacent point pairs, while candidate point pairs with a normal vector angle greater than or equal to the normal vector angle threshold are removed. This yields the valid adjacent point set for each point, and a spatial adjacency table is constructed accordingly.
4. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 1, characterized in that, The steps to obtain the constraint propagation strength matrix include: Construct a node index mapping table based on the geodesic distance correlation graph of normal vectors; The original set of constraint weights is calculated based on the geodesic distance correlation graph of normal vectors and the node index mapping table; The outgoing edges of each node are linearly normalized based on the original constraint weight set to obtain the normalized constraint weight set. A sparse square matrix was initially constructed based on the normalized constraint weight set and node index mapping table, and the constraint propagation strength matrix was obtained by threshold filtering.
5. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 4, characterized in that, The calculation of the original constraint weight set includes: Based on the geodesic distance attribute of each directed edge in the geodesic distance correlation graph of the normal vector, an inverse proportional transformation is performed on the geodesic distance to obtain the geodesic inverse proportional weight; Based on the angle attribute of the normal vector of each directed edge in the geodesic distance correlation graph, an exponential decay transformation is performed on the angle of the normal vector to obtain the angle weight of the normal vector. Multiply the geodesic inverse weight of each directed edge by the normal vector angle weight to obtain the original constraint strength of the directed edge, and record the original constraint strength into the original constraint weight set using the corresponding row and column number in the node index mapping table as the index.
6. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 1, characterized in that, The steps to obtain the closed-loop error energy field include: A global coordinate point cloud set is generated based on the multi-view original point cloud set and the initial registration transformation parameter set; Calculate the initial registration residual vector set based on the global coordinate point cloud set and the geodesic distance correlation map of normal vectors; The propagation residual vector set is calculated based on the constrained propagation strength matrix and the initial registration residual vector set. A regular sampling grid is constructed in three-dimensional space based on the propagation residual vector set and the global coordinate point cloud set, and a closed-loop error energy field is generated.
7. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 6, characterized in that, The generation of the closed-loop error energy field includes: Based on the global coordinate point cloud set, the minimum and maximum coordinates of the point cloud are calculated in the three coordinate axes respectively. The three-dimensional coordinate range is extended by a preset boundary margin to determine the range of the enclosing cube. According to the preset grid resolution, a set of regular three-dimensional sampling grid nodes is uniformly divided within the enclosing cube. Based on the node index mapping table, each residual vector in the propagation residual vector set is associated with the global coordinates of its corresponding node. The magnitude of the residual vector is calculated and used as the error energy value of the global coordinate position of the corresponding node. Based on the global coordinates of the node, one or more nearest grid nodes are found in the regular 3D sampling grid node set, and the error energy value is distributed to these grid nodes according to the spatial distance weight. The error energy contribution from the surrounding nodes is accumulated on each grid node to obtain the initial error energy distribution of the grid. Spatial smoothing interpolation is performed on the initial error energy distribution of the grid to fill the energy value gaps of grid nodes that are not directly covered, forming a continuous closed-loop error energy field.
8. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 1, characterized in that, The steps to complete precise registration of the entire point cloud include: Calculate the gradient field and extract the set of gradient extrema points based on the closed-loop error energy field; Construct a graph cut network node set and a connection edge capacity set based on the gradient extreme point set, the multi-view original point cloud set, and the closed-loop error energy field; A geodesic constraint graph cut network is constructed based on the geodesic distance correlation graph of normal vectors, the set of connection edge capacity, and the set of gradient extremum points. The maximum flow minimum cut algorithm is executed on the geodesic constrained graph cut network to obtain the global fine registration transformation parameter set; The multi-view point cloud positions are updated based on the global fine registration transformation parameter set to obtain the global fine registration point cloud set.
9. The real-time aligned high-brightness curved surface metallographic 3D scanning method according to claim 8, characterized in that, Performing maximum flow minimum cut algorithms on geodesic constrained graph cut networks includes: In a geodesic constrained graph cut network, the maximum flow minimum cut algorithm is executed to obtain a minimum cut scheme that divides all view nodes into two mutually exclusive subsets. View nodes that are connected to the source node but not through the cut edge are classified as the baseline view set, and view nodes that are connected to the sink node but not through the cut edge are classified as the correction view set. Based on the geodesic paths and overlapping areas corresponding to the reference view set and the correction view set in the normal vector geodesic distance correlation diagram, a set of registration residual equations reflecting global closed-loop consistency is constructed. The registration transformation parameters in the reference view set are kept unchanged, and the registration transformation parameters in the correction view set are taken as unknowns. The equations are solved by least squares optimization to obtain the increment of the registration transformation parameters for each correction view. The increment is superimposed on the initial registration transformation parameter set to obtain the global fine registration transformation parameter set.
10. A real-time aligned high-brightness curved surface metallographic 3D scanning system, used to implement the real-time aligned high-brightness curved surface metallographic 3D scanning method according to any one of claims 1-9, characterized in that, The system includes: The module for constructing a geodesic distance correlation graph of normal vectors is used to extract normal vector features from multi-view scanned point clouds, calculate approximate geodesic distances, and construct a geodesic distance correlation graph of normal vectors with geometric attributes of nodes, the geodesic distance of edges, and the angle between the normal vectors. The constraint propagation strength matrix construction module is used to normalize the adjacency weights based on the geodesic distance correlation graph of the normal vector, and to construct a sparse square matrix by using the inverse ratio of geodesic distance and the exponential decay function of the angle between the normal vector and the geodesic distance to obtain the constraint propagation strength matrix. Closed-loop error energy field generation module: It is used to apply the constraint propagation intensity matrix to the registration residual of multi-view point cloud, accumulate the residual vector through matrix propagation, and generate a scalar field by regular sampling in three-dimensional space to obtain the closed-loop error energy field; The global fine registration execution module is used to construct graph cut network nodes at the extreme values of the gradient of the closed-loop error energy field, and execute the minimum cut algorithm under geodesic constraints with the energy field integral value as the edge capacity to complete the global point cloud fine registration.
Citation Information
Cited By
Double-layer optimization measurement planning method for complex model measurement task
CN121920637A