Image matching fusion method based on point-line feature slam

By constructing a two-dimensional discrete scalar field and a discrete Morse complex, and combining it with the Gromov-Wasserstein model, the problems of unstable feature matching and discontinuous map construction in visual SLAM technology under complex environments are solved, and stable image matching and hybrid map construction are achieved.

CN123181755APending Publication Date: 2026-11-27BEIJING HUALIAN POWER ENG SUPERVISION CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611300976.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing visual SLAM technologies suffer from unstable feature matching and discontinuous map building in complex textures, lighting variations, partial occlusion, and dynamic environments, making it difficult to achieve reliable image matching and stable map building in complex environments.

Method used

By constructing a two-dimensional discrete scalar field, extracting point and line topological features, and combining discrete Morse complexes and part of the Gromov-Wasserstein model, a matching and fusion method for point and line features is established. This optimizes camera pose and constructs a hybrid map, utilizing topological relationships and attribute differences to build stable matching relationships.

Benefits of technology

It improves the reliability and environmental adaptability of image matching, enhances the stability of map construction, and solves the problems of matching errors and map discontinuity in complex environments caused by traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181755A_ABST
    Figure CN123181755A_ABST
Patent Text Reader

Abstract

The application discloses an image matching fusion method based on point-line feature SLAM, acquires continuous image frames and carries out gray processing, and constructs a two-dimensional discrete scalar field; a discrete Morse complex is established based on the two-dimensional discrete scalar field, separation lines between extreme points, saddle points and critical points are extracted, point-line features and topological relations are formed; a removal condition is determined according to a critical point stability parameter, low-stability features are removed, and point-line topological structures are updated, a simplified point-line feature set is obtained; partial transmission quality is calculated according to the stability and connection relation of the point-line features, attribute cost and structure cost are constructed, matching relations are obtained by fusing partial transmission models; feature screening conditions are adjusted according to the matching results, and iterative correction is carried out, corrected matching relations are obtained; point projection residual errors and line projection distance residual errors are constructed based on the corrected matching relations, camera poses are optimized, and point-line features meeting the conditions are written into a point-line hybrid map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and robot localization technology, and in particular to an image matching and fusion method based on point and line feature SLAM. Background Technology

[0002] With the development of intelligent robots, autonomous driving, augmented reality and 3D space reconstruction technologies, visual simultaneous localization and mapping (SLAM) technology has become an important technical means for intelligent devices to realize environmental perception and autonomous localization. Currently, visual SLAM systems typically acquire continuous image frames through camera equipment and use point features, line features or surface features in the images for feature extraction, image matching, camera pose estimation and environmental map construction.

[0003] Existing visual SLAM techniques still have significant limitations under conditions of complex textures, varying lighting, local occlusion, and dynamic environments. On the one hand, traditional point feature-based matching methods mainly rely on local gray-level gradient information, which is easily affected by image blurring, viewpoint changes, and repetitive textures, leading to unstable feature descriptions, increased false matches, and difficulty in maintaining reliable associations between consecutive frames. On the other hand, existing point-line fusion methods typically employ independent point feature matching and line feature matching strategies, failing to fully utilize the topological connectivity between point and line features. In cases of missing features in local areas or noise interference, incomplete matching relationships and discontinuous map structures are prone to occur.

[0004] Furthermore, existing feature matching methods based on geometric constraints or transmission models typically establish matching costs based on feature distance or spatial location, making it difficult to simultaneously describe differences in feature attributes and topological structures. In scenarios with partial occlusion, variations in the number of features, or changes in local structure, erroneous transmission relationships can easily arise, reducing the stability of matching results. Simultaneously, existing map building processes lack dynamic filtering and feedback adjustment mechanisms for low-stability features, easily incorporating unreliable features into the map, leading to increased cumulative errors and impacting subsequent positioning accuracy. Therefore, existing visual SLAM technologies suffer from insufficient point-line feature association capabilities, low image matching reliability in complex environments, and insufficient map building stability.

[0005] Therefore, how to provide an image matching and fusion method based on point and line feature SLAM is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] One objective of this invention is to propose an image matching and fusion method based on point-line feature SLAM. This invention fully utilizes computer vision, topological feature analysis, and partial transmission matching technology. By constructing a two-dimensional discrete scalar field to extract point-line topological features, and combining discrete Morse complexes, a fusion of partial Gromov-Wasserstein models, and a dynamic feature correction mechanism, it achieves stable matching between consecutive image frames, camera pose optimization, and point-line hybrid map construction. It has the advantages of high matching reliability, strong adaptability to complex environments, and good map construction stability.

[0007] An image matching and fusion method based on point-line feature SLAM according to an embodiment of the present invention includes the following steps: S1. Acquire continuous image frames, and construct a two-dimensional discrete scalar field by normalizing grayscale and unifying resolution. S2. Based on the two-dimensional discrete scalar field, construct a discrete Morse complex, persistently pair extreme points and saddle points, extract the separating lines between critical points, and form point features, line features, and point-line topological relationships. S3. Determine the region elimination threshold based on the persistence of critical point pairs, local gray-level fluctuations, separation line length, and cross-frame repetition, eliminate low-stability critical point pairs, and synchronously update the discrete gradient path and point-line topology to obtain a simplified point-line feature set. S4. The persistence, cross-frame stability and connection reliability of the simplified point and line feature set are converted into partial transmission quality. The attribute cost and structural cost are constructed based on the differences in point and line attributes and topology. The partial transmission matrix and initial matching relationship are obtained by fusing a partial Gromov-Wasserstein model. S5. Calculate the matching confidence based on the partial transmission matrix and adjust the region elimination threshold. Re-execute critical point pair elimination, topology update, transmission quality calculation and model solution to obtain the corrected matching relationship. S6. Based on the correction matching relationship, construct the point reprojection residual and the line projection distance residual. Determine the residual weight with persistence, partial transmission quality and matching confidence. Jointly optimize the camera pose. Write the point and line features and connection relationships that have reached the lower limit of persistence and matching confidence and the pose residual is lower than the upper limit into the point and line hybrid map.

[0008] Optionally, S1 includes: S11. Arrange the consecutive image frames in ascending order according to the acquisition time, configure the frame order identifier for each image frame, read the red channel value, green channel value and blue channel value pixel by pixel, and use fixed channel weights to weight and sum the three channel values ​​to obtain the initial grayscale matrix corresponding to each image frame. S12. Calculate the maximum and minimum gray values ​​in the initial gray matrix, subtract the minimum gray value from the gray value of each pixel, and then divide by the difference between the maximum and minimum gray values ​​to obtain the normalized gray matrix. S13. Set the target width and target height, determine the horizontal mapping ratio based on the initial width and target width, determine the vertical mapping ratio based on the initial height and target height, reverse map the target pixel position to the normalized grayscale matrix, read the four adjacent pixels around the mapped position, and assign interpolation weights based on the horizontal and vertical distances to calculate the grayscale value of the target pixel and obtain the standard grayscale matrix. S14. Arrange the pixels in ascending order of gray values ​​according to the standard gray matrix. When the gray values ​​are the same, determine the arrangement order by ascending row coordinates and ascending column coordinates, and establish a unique scalar order among the pixels. S15. Set each pixel position in the standard grayscale matrix as a vertex, connect horizontally adjacent vertices and vertically adjacent vertices as edges, set the closed area enclosed by four adjacent vertices as a two-dimensional cell cavity, record the relationship between each vertex and edge, and between each edge and two-dimensional cell cavity, to form a two-dimensional regular cell cavity complex. S16. Assign the pixel gray values ​​in the standard gray matrix to the corresponding vertices, set the scalar value of each edge to the larger of the two endpoint scalar values, set the scalar value of each two-dimensional cell to the larger of the boundary vertex scalar values, and store the frame sequence identifier, two-dimensional regular cell complex, association relationship and scalar value accordingly to obtain the two-dimensional discrete scalar field of each image frame.

[0009] Optionally, S2 includes: S21. Read the two-dimensional regular cell cavity complex, cell cavity correlation, cell cavity scalar value and scalar order in the two-dimensional discrete scalar field, and classify each side and two-dimensional cell cavity into the lower star set corresponding to the vertex with the highest scalar order in its associated vertex. S22. In each lower star set, establish candidate pairing relationships between vertices and edges, and between edges and two-dimensional cavities. Select candidate pairings in order of increasing scalar span of cavities and increasing order of scalars of low-dimensional cavities. For each gradient cavity pair generated, visit the high-dimensional cavity and its boundary cavity alternately along the generated gradient cavity pair. Delete candidate pairings that cause the visiting path to return to the starting cavity until there are no more candidate pairings available. This will result in the initial acyclic discrete gradient field. S23. Starting from each cell in the initial acyclic discrete gradient field, trace along the gradient cell pair towards the direction of decreasing scalar to the unpaired vertex, and trace along the inverse relationship of the gradient cell pair towards the direction of increasing scalar to the unpaired two-dimensional cell. Combine the identifiers of the reached unpaired vertex and the unpaired two-dimensional cell to form the endpoint signature of the corresponding cell: ,in For cell cavity endpoint signature, This identifies the unpaired vertex reached in the scalar decreasing direction. For unpaired two-dimensional cavities reached in the direction of scalar increase; when there are multiple branches at the same tracking position, the unique tracking direction is determined according to the scalar order of the next cavity in the branch; S24. Remove the gradient pairing between two cells with different endpoint signatures in the initial acyclic discrete gradient field, re-establish candidate pairing relationships in the corresponding lower star set, and only form gradient cell pairs by adjacent dimension cells with the same endpoint signature, boundary correlation and no closed gradient path after addition, to obtain the endpoint-constrained discrete gradient field. S25. Determine the unpaired vertices in the endpoint-constrained discrete gradient field as minimum critical cavities, and determine the minimum point with the corresponding vertex coordinates; determine the unpaired edges as saddle-shaped critical cavities, and determine the saddle point with the midpoint of the corresponding edge; determine the unpaired two-dimensional cavities as maximum critical cavities, and determine the maximum point with the center of the corresponding two-dimensional cavities. S26. Add cavities to the lower-level set in ascending order of scalar quantity, and establish a lower-level connected component for each minimum critical cavity. When a saddle-shaped critical cavity connects two lower-level connected components, persistently pair the saddle point with the minimum point corresponding to the subsequently established lower-level connected component. Add cavities to the upper-level set in descending order of scalar quantity, and establish an upper-level connected component for each maximum critical cavity. When an unpaired saddle-shaped critical cavity connects two upper-level connected components, persistently pair the saddle point with the maximum point corresponding to the subsequently established upper-level connected component. Calculate the persistence of the paired critical points: ; in, Critical point With critical point Durability, and These are the scalar values ​​corresponding to the critical cell cavities; S27. Starting from each saddle-shaped critical cell, trace from the low scalar boundary branches on both sides of the saddle-shaped critical cell along the endpoint constrained discrete gradient field to the corresponding minimum critical cell. Then trace from the high scalar upper neighbor branches on both sides of the saddle-shaped critical cell along the reverse relationship of the endpoint constrained discrete gradient field to the corresponding maximum critical cell. Connect the vertex, edge midpoint and two-dimensional cell center according to the tracing order to obtain the candidate separation line. S28. Starting from the extreme point reached by the candidate separation line, trace backward along the corresponding gradient cavity pair to the saddle point. Compare the reverse-traced cavity sequence with the forward-traced cavity sequence of the candidate separation line in reverse order. When there is a separation position between the two cavity sequences, the cavity between the first separation position and the first re-merging position is determined as the conflict cavity zone. Remove the gradient cavity pairs inside the conflict cavity zone, keep the boundary, critical cavity, and endpoint signature of the conflict cavity zone unchanged, and re-pair only between adjacent dimension cavities with the same endpoint signature. Perform closed gradient path detection and critical cavity number detection on the re-pairing results. Re-trace the forward cavity sequence and the reverse cavity sequence. When the two cavity sequences are in reverse order, determine the corresponding candidate separation line as the separation line between critical points. When there is no pairing result that meets the above conditions in the conflict cavity zone, delete the corresponding candidate separation line. S29. Record the minimum points, maximum points, and saddle points as point features, and record the separation lines between critical points as line features. Establish point-line adjacency relationships based on the endpoints of the separation lines between each critical point, and establish branch connection relationships based on the separation lines between critical points connected by the same saddle point. Combine the endpoint-constrained discrete gradient field, critical point persistence pairing, point features, line features, point-line adjacency relationships, and branch connection relationships to form a discrete Morse complex.

[0010] Optionally, S3 includes: S31. Using saddle points as regional anchor points, the associated extreme points, separation lines, and cell cavities through which the separation lines pass are classified into the same point-line topological region. Regional topological identifiers are generated according to the saddle point type, the branching order of the separation lines, and the signatures of the endpoints of each branch. In consecutive image frames, point-line topological regions with the same regional topological identifiers and corresponding anchor point positions are formed into a sequence of homologous regions. S32. For each critical point pair in the same region sequence, read the persistence of the critical point pair, calculate the average deviation of the gray value in the adjacent cell cavity of the separation line relative to the average gray value of the region as the local gray value fluctuation, accumulate the distance between adjacent trajectory points of the separation line to obtain the length of the separation line, and determine the cross-frame repetition as the ratio of the number of frames in the same region sequence to the number of frames in the sequence. S33. Establish a stable dominance relationship for critical point pairs within each point-line topology region: when the persistence of the first critical point pair is not lower than that of the second critical point pair, the local grayscale fluctuation is not higher than that of the second critical point pair, the separation line length is not shorter than that of the second critical point pair, and the cross-frame repetition is not lower than that of the second critical point pair, and at least one of these conditions is not equal, mark the second critical point pair as a dominated critical point pair; form a retention boundary with the undominated critical point pairs, take the minimum persistence within the retention boundary as the region elimination threshold, and determine the dominated critical point pairs with persistence lower than the region elimination threshold as critical point pairs to be eliminated; S34. For each pair of critical points to be eliminated, determine the unique discrete gradient path connecting the corresponding critical cavities, record the entry cavity, exit cavity and endpoint signatures of each separation line intersecting with the gradient path on the boundary of the path neighborhood, and establish an alternative connection mapping between the entry cavity and the exit cavity according to the principle that the endpoint signatures are consistent and the branch loop order remains unchanged. S35. Reset the gradient cell pairs in reverse along the unique discrete gradient path, delete the critical point pairs to be eliminated and their connecting separation lines, and trace from the entry cell to the corresponding exit cell according to the alternative connection mapping to reconstruct the separation lines, point-line adjacency relationships and branch connection relationships; when the reconstruction result forms a closed gradient path, changes the signature of the boundary endpoint of the region, or changes the branch wrapping order of the retained saddle point, cancel this elimination; otherwise, write the updated discrete gradient path and point-line topology relationship to obtain a simplified point-line feature set.

[0011] Optionally, S4 includes: S41. Read the simplified dot and line feature set of two adjacent frames, combine each critical point persistent pair, the separating line connecting the critical point persistent pair and the corresponding dot and line adjacency relationship into a topology transmission unit, and configure the unit identifier for each topology transmission unit according to the connection order of saddle point, extreme point and separating line. S42. Normalize the persistence, cross-frame stability and connection reliability of each topology transmission unit respectively, and take the minimum value of the three normalization results as the transmittable proportion of the corresponding topology transmission unit. Multiply the transmittable proportion by the number of point features and line features contained in the corresponding topology transmission unit to obtain the partial transmission quality. S43. Based on the critical point type, critical point gray-scale response, separation line length, separation line direction, and separation line endpoint type, the source topology transmission unit and the target topology transmission unit are compared pairwise to form an attribute cost matrix; based on the adjacent levels, shared saddle point relationships, branching and wrapping order, and shortest topology path between units, the source structure matrix and the target structure matrix are formed respectively. S44. Input the partial transmission quality vector of the source topology transmission unit, the partial transmission quality vector of the target topology transmission unit, the attribute cost matrix, the source structure matrix, the target structure matrix, the unit type correspondence, and the limited total transmission amount into the fusion part of the Gromov-Wasserstein model to obtain the partial transmission matrix representing the transmission amount between the source topology transmission unit and the target topology transmission unit. S45. Select topology transmission unit pairs from the partial transmission matrix that are each other's row maximum and column maximum and whose transmission volume reaches the matching threshold. Establish point matching relationships according to the critical point roles within the unit and establish line matching relationships according to the branching order. Only retain the corresponding line matching relationship when the critical points at both ends of the separation line are matched and the point-line adjacency relationship is consistent. The remaining point features, line features, and topology transmission units remain unmatched to obtain the initial matching relationship.

[0012] Optionally, the fusion portion of the Gromov-Wasserstein model includes: Read the source topology transmission unit, target topology transmission unit, source partial transmission quality vector, target partial transmission quality vector, attribute cost matrix, source structure matrix, target structure matrix, unit type correspondence, and limited total transmission volume; according to the saddle point identifier contained in each topology transmission unit, group the topology transmission units that share the same saddle point into the same saddle point anchoring group; According to the order in which the separation line wraps around the saddle point, the topology transmission units in each saddle point anchoring group are arranged in a loop. For source saddle point anchoring groups and target saddle point anchoring groups with the same saddle point type, the loop start position of the target saddle point anchoring group is changed in turn. The source topology transmission units and target topology transmission units in the same arrangement position are formed into candidate unit pairs. The attribute costs of the candidate unit pairs are accumulated respectively. The loop start position with the smallest accumulated attribute cost is selected as the branch alignment position of the corresponding two saddle point anchoring groups. Establish a locked transmission channel based on the branch alignment position, and only allow transmission quality between source topology transmission units and target topology transmission units that are in the corresponding arrangement position and have the same critical point role; set units with different saddle point types, different extreme point types, different roles of the split line endpoints, and those that do not conform to the branch alignment position as prohibited transmission positions to form a transmission allowed domain; Within the transmission allowable domain, a non-negative partial transmission matrix is ​​established, limiting the transmission amount in each row to no more than a portion of the transmission quality of the corresponding source topology transmission unit, and the transmission amount in each column to no more than a portion of the transmission quality of the corresponding target topology transmission unit, while ensuring that the sum of all transmission amounts equals the limited total transmission amount; the fusion part Gromov-Wasserstein objective function is constructed according to the following formula: in, For part of the transmission matrix, The set of matrices jointly defined by the transmission allowable field and the quality constraint. For the first The source topology transmission unit and the first The attribute cost between target topology transmission units For the first The and the first Structural relationships between source topology transmission units For the first The and the first The structural relationship between the target topology transmission units This is the fusion coefficient between attribute cost and structural cost; Arrange the unit combinations within the transmission allowable domain in order of attribute cost from low to high, and allocate the smaller value between the source remaining mass and the target remaining mass to each unit combination in turn. Stop the allocation when the cumulative allocation reaches the limited total transmission amount, and write the allocation results of each unit combination into the initial partial transmission matrix. Based on the current partial transmission matrix, the weighted difference between the source structure relationship and the target structure relationship corresponding to each allowed transmission position is calculated. The weighted difference and the corresponding attribute cost are combined into the current linear cost. A minimum cost flow network is established with the source topology transmission unit as the supply node, the target topology transmission unit as the receiving node, and the allowed transmission position as the directed connection edge. The source partial transmission quality is set as the supply limit, the target partial transmission quality is set as the receiving limit, the current linear cost is set as the connection edge cost, and the limited total transmission volume is used as the network flow to solve for the candidate partial transmission matrix. Connect the current partial transmission matrix with the candidate partial transmission matrix to form a matrix update segment. Calculate the objective function values ​​corresponding to the two endpoints of the update segment and the stationary point of the objective function. Determine the position with the minimum objective function value as the update position and update the partial transmission matrix accordingly. Repeat the calculation of the structural relationship weighted difference, the solution of the minimum cost flow, and the matrix update until the difference between the objective function values ​​after two adjacent updates is not higher than the convergence threshold. Perform topology transmission unit integrity correction on the converged partial transmission matrix, and calculate the unit occupancy rate of each allowed transmission position according to the following formula: ; in, For the first The source topology transmission unit and the first Unit occupancy rate among target topology transmission units To correspond to the transmission quality of the source portion, For the transmission quality of the corresponding target part; Select topology transmission unit pairs according to their unit occupancy rates from high to low. Only retain unit pairs where the source and target topology transmission units have the highest unit occupancy rates, are located in the same locked transmission channel, and have the same branch alignment position in their corresponding saddle point anchoring groups. Set the transmission amount of the selected unit pairs to the smaller value between the corresponding source part transmission quality and the target part transmission quality. Set the transmission amount of the same source topology transmission unit to other target topology transmission units and the transmission amount of other source topology transmission units to the same target topology transmission unit to zero. When the cumulative transmission amount of the selected unit pair is lower than the limit transmission amount, continue to select unoccupied source topology transmission units and target topology transmission units according to the unit occupancy rate order; when the cumulative transmission amount exceeds the limit transmission amount after adding the next unit pair, set the transmission amount of the unit pair to the difference between the limit transmission amount and the existing cumulative transmission amount, and keep the remaining quality in an untransmitted state to obtain a partial transmission matrix that satisfies the quality constraint, branch-around order constraint and topology transmission unit integrity constraint.

[0013] Optionally, S5 includes: S51. Read part of the transmission matrix, initial matching relationship, source part transmission quality, target part transmission quality and point-line adjacency relationship of topology transmission units; S52. For each initial matching unit pair, calculate the proportion of the transmission volume to the smaller value of the transmission quality of the two units, and the proportion of the number of consistent point-line adjacency relationships to the total number of point-line adjacency relationships. Take the smaller value of the two as the matching confidence. S53. Critical point pairs with matching confidence reaching the lower confidence limit are included in the retention set, and critical point pairs with no matching or below the lower confidence limit are included in the verification set, and mapped to the corresponding topological regions according to the cell cavities through which the separation line passes. S54. Adjust the elimination threshold of the area covered by the retained set to the adjacent persistence level that is lower than the minimum persistence of the set, and adjust the elimination threshold of the area covered only by the review set to the persistence of the corresponding critical point pair; when two sets overlap, use the threshold corresponding to the retained set. S55. Based on the adjusted elimination threshold, critical point pair elimination is re-executed, gradient cell pairs are reset in reverse along the unique discrete gradient path, and separation lines, point-line adjacency relationships and branch connection relationships are reconstructed based on the alternative connection mapping to obtain the feedback simplified point-line feature set. S56. Based on the feedback-simplified point-line feature set, the topology transmission unit is recombined, and the transmission quality, attribute cost matrix, source structure matrix and target structure matrix are recalculated. The corrected transmission matrix is ​​obtained by inputting the fused Gromov-Wasserstein model. S57. Select the topology transmission unit pairs from the correction part of the transmission matrix that have the highest unit occupancy rate, are located in the same locked transmission channel and have closed point-line adjacency relationship, establish the correction point matching relationship and the correction line matching relationship, and obtain the correction matching relationship.

[0014] The beneficial effects of this invention are: This invention constructs a two-dimensional discrete scalar field and combines it with discrete Morse complexes to extract extreme points, saddle points, and separating lines between critical points in an image. It establishes point features, line features, and topological connectivity relationships, thereby achieving a unified expression of local structural information in the image. Compared with traditional feature extraction methods that rely solely on gray-level gradients or local descriptors, this invention can preserve the spatial topological constraints in the image and improve the integrity and stability of feature expression in complex and weak texture environments.

[0015] This invention introduces the attribute information and topological structure information of point and line features into the fusion part of the Gromov-Wasserstein model, and establishes a matching relationship by combining partial transmission quality constraints, attribute cost matrix and structural cost matrix. This allows the feature matching process to consider both local feature differences and overall topological relationships, solving the problem that traditional feature distance matching methods are prone to mismatches in scenarios with occlusion, viewpoint changes and feature quantity changes, and improving the accuracy and environmental adaptability of image matching. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of an image matching and fusion method based on point and line feature SLAM proposed in this invention; Figure 2 This is a schematic diagram of the construction of a two-dimensional discrete scalar field and the generation process of a discrete Morse complex proposed in this invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0018] refer to Figure 1 - Figure 2 An image matching and fusion method based on point and line feature SLAM includes the following steps: S1. Acquire continuous image frames, and construct a two-dimensional discrete scalar field by normalizing grayscale and unifying resolution. S2. Based on the two-dimensional discrete scalar field, construct a discrete Morse complex, persistently pair extreme points and saddle points, extract the separating lines between critical points, and form point features, line features, and point-line topological relationships. S3. Determine the region elimination threshold based on the persistence of critical point pairs, local gray-level fluctuations, separation line length, and cross-frame repetition, eliminate low-stability critical point pairs, and synchronously update the discrete gradient path and point-line topology to obtain a simplified point-line feature set. S4. The persistence, cross-frame stability and connection reliability of the simplified point and line feature set are converted into partial transmission quality. The attribute cost and structural cost are constructed based on the differences in point and line attributes and topology. The partial transmission matrix and initial matching relationship are obtained by fusing a partial Gromov-Wasserstein model. S5. Calculate the matching confidence based on the partial transmission matrix and adjust the region elimination threshold. Re-execute critical point pair elimination, topology update, transmission quality calculation and model solution to obtain the corrected matching relationship. S6. Based on the correction matching relationship, construct the point reprojection residual and the line projection distance residual. Determine the residual weight with persistence, partial transmission quality and matching confidence. Jointly optimize the camera pose. Write the point and line features and connection relationships that have reached the lower limit of persistence and matching confidence and the pose residual is lower than the upper limit into the point and line hybrid map.

[0019] In this embodiment, S1 includes: S11. Arrange the consecutive image frames in ascending order according to the acquisition time, configure the frame order identifier for each image frame, read the red channel value, green channel value and blue channel value pixel by pixel, and use fixed channel weights to weight and sum the three channel values ​​to obtain the initial grayscale matrix corresponding to each image frame. S12. Calculate the maximum and minimum gray values ​​in the initial gray matrix, subtract the minimum gray value from the gray value of each pixel, and then divide by the difference between the maximum and minimum gray values ​​to map the gray values ​​of each pixel to the numerical range of zero to one, thus obtaining the normalized gray matrix. S13. Set the target width and target height, determine the horizontal mapping ratio based on the initial width and target width, determine the vertical mapping ratio based on the initial height and target height, reverse map the target pixel position to the normalized grayscale matrix, read the four adjacent pixels around the mapped position, and assign interpolation weights based on the horizontal and vertical distances to calculate the grayscale value of the target pixel and obtain the standard grayscale matrix. S14. Arrange the pixels in ascending order of gray values ​​according to the standard gray matrix. When the gray values ​​are the same, determine the arrangement order by ascending row coordinates and ascending column coordinates, and establish a unique scalar order among the pixels. S15. Set each pixel position in the standard grayscale matrix as a vertex, connect horizontally adjacent vertices and vertically adjacent vertices as edges, set the closed area enclosed by four adjacent vertices as a two-dimensional cell cavity, record the relationship between each vertex and edge, and between each edge and two-dimensional cell cavity, to form a two-dimensional regular cell cavity complex. S16. Assign the pixel gray values ​​in the standard gray matrix to the corresponding vertices, set the scalar value of each edge to the larger of the two endpoint scalar values, set the scalar value of each two-dimensional cell to the larger of the boundary vertex scalar values, and store the frame sequence identifier, two-dimensional regular cell complex, association relationship and scalar value accordingly to obtain the two-dimensional discrete scalar field of each image frame.

[0020] In this embodiment, S2 includes: S21. Read the two-dimensional regular cell cavity complex, cell cavity association relationship, cell cavity scalar value and scalar order in the two-dimensional discrete scalar field, and assign each side and two-dimensional cell cavity to the lower star set corresponding to the vertex with the highest scalar order in its associated vertex, so that there are no duplicate cells between different lower star sets. S22. In each lower star set, establish candidate pairing relationships between vertices and edges, and between edges and two-dimensional cavities. Select candidate pairings in order of increasing scalar span of cavities and increasing order of scalars of low-dimensional cavities. For each gradient cavity pair generated, visit the high-dimensional cavity and its boundary cavity alternately along the generated gradient cavity pair. Delete candidate pairings that cause the visiting path to return to the starting cavity until there are no more candidate pairings available. This will result in the initial acyclic discrete gradient field. S23. Starting from each cell in the initial acyclic discrete gradient field, trace along the gradient cell pair towards the direction of decreasing scalar to the unpaired vertex, and trace along the inverse relationship of the gradient cell pair towards the direction of increasing scalar to the unpaired two-dimensional cell. Combine the identifiers of the reached unpaired vertex and the unpaired two-dimensional cell to form the endpoint signature of the corresponding cell: ; in, For cell cavity endpoint signature, This identifies the unpaired vertex reached in the scalar decreasing direction. For unpaired two-dimensional cavities reached in the direction of scalar increase; when there are multiple branches at the same tracking position, the unique tracking direction is determined according to the scalar order of the next cavity in the branch; S24. Remove the gradient pairing between two cells with different endpoint signatures in the initial acyclic discrete gradient field, re-establish candidate pairing relationships in the corresponding lower star set, and only form gradient cell pairs by adjacent dimension cells with the same endpoint signature, boundary correlation and no closed gradient path after addition, to obtain the endpoint-constrained discrete gradient field. S25. Determine the unpaired vertices in the endpoint-constrained discrete gradient field as minimum critical cavities, and determine the minimum point with the corresponding vertex coordinates; determine the unpaired edges as saddle-shaped critical cavities, and determine the saddle point with the midpoint of the corresponding edge; determine the unpaired two-dimensional cavities as maximum critical cavities, and determine the maximum point with the center of the corresponding two-dimensional cavities. S26. Add cavities to the lower-level set in ascending order of scalar quantity, and establish a lower-level connected component for each minimal critical cavity. When a saddle-shaped critical cavity connects two lower-level connected components, persistently pair the saddle point with the minimum point corresponding to the subsequently established lower-level connected component. Add cavities to the upper-level set in descending order of scalar quantity, and establish an upper-level connected component for each maximal critical cavity. When an unpaired saddle-shaped critical cavity connects two upper-level connected components, persistently pair the saddle point with the maximum point corresponding to the subsequently established upper-level connected component, and calculate the persistence of the paired critical point according to the following formula: ; in, Critical point With critical point Durability, and These are the scalar values ​​corresponding to the critical cell cavities; S27. Starting from each saddle-shaped critical cell, trace from the low scalar boundary branches on both sides of the saddle-shaped critical cell along the endpoint constrained discrete gradient field to the corresponding minimum critical cell. Then trace from the high scalar upper neighbor branches on both sides of the saddle-shaped critical cell along the reverse relationship of the endpoint constrained discrete gradient field to the corresponding maximum critical cell. Connect the vertex, edge midpoint and two-dimensional cell center according to the tracing order to obtain the candidate separation line. S28. Starting from the extreme point reached by the candidate separation line, trace backward along the corresponding gradient cavity pair to the saddle point. Compare the reverse-traced cavity sequence with the forward-traced cavity sequence of the candidate separation line in reverse order. When there is a separation position between the two cavity sequences, the cavity between the first separation position and the first re-merging position is determined as the conflict cavity zone. Remove the gradient cavity pairs inside the conflict cavity zone, keep the boundary, critical cavity, and endpoint signature of the conflict cavity zone unchanged, and re-pair only between adjacent dimension cavities with the same endpoint signature. Perform closed gradient path detection and critical cavity number detection on the re-pairing results. Re-trace the forward cavity sequence and the reverse cavity sequence. When the two cavity sequences are in reverse order, determine the corresponding candidate separation line as the separation line between critical points. When there is no pairing result that meets the above conditions in the conflict cavity zone, delete the corresponding candidate separation line. S29. Record the minimum points, maximum points, and saddle points as point features, and record the separation lines between critical points as line features. Establish point-line adjacency relationships based on the endpoints of the separation lines between each critical point, and establish branch connection relationships based on the separation lines between critical points connected by the same saddle point. Combine the endpoint-constrained discrete gradient field, critical point persistence pairing, point features, line features, point-line adjacency relationships, and branch connection relationships to form a discrete Morse complex.

[0021] In this embodiment, S3 includes: S31. Using saddle points as regional anchor points, the associated extreme points, separation lines, and cell cavities through which the separation lines pass are classified into the same point-line topological region. Regional topological identifiers are generated according to the saddle point type, the branching order of the separation lines, and the signatures of the endpoints of each branch. In consecutive image frames, point-line topological regions with the same regional topological identifiers and corresponding anchor point positions are formed into a sequence of homologous regions. S32. For each critical point pair in the same region sequence, read the persistence of the critical point pair, calculate the average deviation of the gray value in the adjacent cell cavity of the separation line relative to the average gray value of the region as the local gray value fluctuation, accumulate the distance between adjacent trajectory points of the separation line to obtain the length of the separation line, and determine the cross-frame repetition as the ratio of the number of frames in the same region sequence to the number of frames in the sequence. S33. Establish a stable dominance relationship for critical point pairs within each point-line topology region: when the persistence of the first critical point pair is not lower than that of the second critical point pair, the local grayscale fluctuation is not higher than that of the second critical point pair, the separation line length is not shorter than that of the second critical point pair, and the cross-frame repetition is not lower than that of the second critical point pair, and at least one of these conditions is not equal, mark the second critical point pair as a dominated critical point pair; form a retention boundary with the undominated critical point pairs, take the minimum persistence within the retention boundary as the region elimination threshold, and determine the dominated critical point pairs with persistence lower than the region elimination threshold as critical point pairs to be eliminated; S34. For each pair of critical points to be eliminated, determine the unique discrete gradient path connecting the corresponding critical cavities, record the entry cavity, exit cavity and endpoint signatures of each separation line intersecting with the gradient path on the boundary of the path neighborhood, and establish an alternative connection mapping between the entry cavity and the exit cavity according to the principle that the endpoint signatures are consistent and the branch loop order remains unchanged. S35. Reset the gradient cell pairs in reverse along the unique discrete gradient path, delete the critical point pairs to be eliminated and their connecting separation lines, and trace from the entry cell to the corresponding exit cell according to the alternative connection mapping to reconstruct the separation lines, point-line adjacency relationships and branch connection relationships; when the reconstruction result forms a closed gradient path, changes the signature of the boundary endpoint of the region, or changes the branch wrapping order of the retained saddle point, cancel this elimination; otherwise, write the updated discrete gradient path and point-line topology relationship to obtain a simplified point-line feature set.

[0022] In this embodiment, S4 includes: S41. Read the simplified dot and line feature set of two adjacent frames, combine each critical point persistent pair, the separating line connecting the critical point persistent pair and the corresponding dot and line adjacency relationship into a topology transmission unit, and configure the unit identifier for each topology transmission unit according to the connection order of saddle point, extreme point and separating line. S42. Normalize the persistence, cross-frame stability and connection reliability of each topology transmission unit respectively, and take the minimum value of the three normalization results as the transmittable proportion of the corresponding topology transmission unit. Multiply the transmittable proportion by the number of point features and line features contained in the corresponding topology transmission unit to obtain the partial transmission quality. S43. Based on the critical point type, critical point gray-scale response, separation line length, separation line direction, and separation line endpoint type, the source topology transmission unit and the target topology transmission unit are compared pairwise to form an attribute cost matrix; based on the adjacent levels, shared saddle point relationships, branching and wrapping order, and shortest topology path between units, the source structure matrix and the target structure matrix are formed respectively. S44. Input the partial transmission quality vector of the source topology transmission unit, the partial transmission quality vector of the target topology transmission unit, the attribute cost matrix, the source structure matrix, the target structure matrix, the unit type correspondence, and the limited total transmission amount into the fusion part of the Gromov-Wasserstein model to obtain the partial transmission matrix representing the transmission amount between the source topology transmission unit and the target topology transmission unit. S45. Select topology transmission unit pairs from the partial transmission matrix that are each other's row maximum and column maximum and whose transmission volume reaches the matching threshold. Establish point matching relationships according to the critical point roles within the unit and establish line matching relationships according to the branching order. Only retain the corresponding line matching relationship when the critical points at both ends of the separation line are matched and the point-line adjacency relationship is consistent. The remaining point features, line features, and topology transmission units remain unmatched to obtain the initial matching relationship.

[0023] In this embodiment, the fusion portion of the Gromov-Wasserstein model includes: Read the source topology transmission unit, target topology transmission unit, source partial transmission quality vector, target partial transmission quality vector, attribute cost matrix, source structure matrix, target structure matrix, unit type correspondence, and limited total transmission volume; according to the saddle point identifier contained in each topology transmission unit, group the topology transmission units that share the same saddle point into the same saddle point anchoring group; According to the order in which the separation line wraps around the saddle point, the topology transmission units in each saddle point anchoring group are arranged in a loop. For source saddle point anchoring groups and target saddle point anchoring groups with the same saddle point type, the loop start position of the target saddle point anchoring group is changed in turn. The source topology transmission units and target topology transmission units in the same arrangement position are formed into candidate unit pairs. The attribute costs of the candidate unit pairs are accumulated respectively. The loop start position with the smallest accumulated attribute cost is selected as the branch alignment position of the corresponding two saddle point anchoring groups. Establish a locked transmission channel based on the branch alignment position, and only allow transmission quality between source topology transmission units and target topology transmission units that are in the corresponding arrangement position and have the same critical point role; set units with different saddle point types, different extreme point types, different roles of the split line endpoints, and those that do not conform to the branch alignment position as prohibited transmission positions to form a transmission allowed domain; Within the transmission allowable domain, a non-negative partial transmission matrix is ​​established, limiting the transmission amount in each row to no more than a portion of the transmission quality of the corresponding source topology transmission unit, and the transmission amount in each column to no more than a portion of the transmission quality of the corresponding target topology transmission unit, while ensuring that the sum of all transmission amounts equals the limited total transmission amount; the fusion part Gromov-Wasserstein objective function is constructed according to the following formula: ; in, For part of the transmission matrix, The set of matrices jointly defined by the transmission allowable field and the quality constraint. For the first The source topology transmission unit and the first The attribute cost between target topology transmission units For the first The and the first Structural relationships between source topology transmission units For the first The and the first The structural relationship between the target topology transmission units This is the fusion coefficient between attribute cost and structural cost; Arrange the unit combinations within the transmission allowable domain in order of attribute cost from low to high, and allocate the smaller value between the source remaining mass and the target remaining mass to each unit combination in turn. Stop the allocation when the cumulative allocation reaches the limited total transmission amount, and write the allocation results of each unit combination into the initial partial transmission matrix. Based on the current partial transmission matrix, the weighted difference between the source structure relationship and the target structure relationship corresponding to each allowed transmission position is calculated. The weighted difference and the corresponding attribute cost are combined into the current linear cost. A minimum cost flow network is established with the source topology transmission unit as the supply node, the target topology transmission unit as the receiving node, and the allowed transmission position as the directed connection edge. The source partial transmission quality is set as the supply limit, the target partial transmission quality is set as the receiving limit, the current linear cost is set as the connection edge cost, and the limited total transmission volume is used as the network flow to solve for the candidate partial transmission matrix. Connect the current partial transmission matrix with the candidate partial transmission matrix to form a matrix update segment. Calculate the objective function values ​​corresponding to the two endpoints of the update segment and the stationary point of the objective function. Determine the position with the minimum objective function value as the update position and update the partial transmission matrix accordingly. Repeat the calculation of the structural relationship weighted difference, the solution of the minimum cost flow, and the matrix update until the difference between the objective function values ​​after two adjacent updates is not higher than the convergence threshold. Perform topology transmission unit integrity correction on the converged partial transmission matrix, and calculate the unit occupancy rate of each allowed transmission position according to the following formula: ; in, For the first The source topology transmission unit and the first Unit occupancy rate among target topology transmission units To correspond to the transmission quality of the source portion, For the transmission quality of the corresponding target part; Select topology transmission unit pairs according to their unit occupancy rates from high to low. Only retain unit pairs where the source and target topology transmission units have the highest unit occupancy rates, are located in the same locked transmission channel, and have the same branch alignment position in their corresponding saddle point anchoring groups. Set the transmission amount of the selected unit pairs to the smaller value between the corresponding source part transmission quality and the target part transmission quality. Set the transmission amount of the same source topology transmission unit to other target topology transmission units and the transmission amount of other source topology transmission units to the same target topology transmission unit to zero. When the cumulative transmission amount of the selected unit pair is lower than the limit transmission amount, continue to select unoccupied source topology transmission units and target topology transmission units according to the unit occupancy rate order; when the cumulative transmission amount exceeds the limit transmission amount after adding the next unit pair, set the transmission amount of the unit pair to the difference between the limit transmission amount and the existing cumulative transmission amount, and keep the remaining quality in an untransmitted state to obtain a partial transmission matrix that satisfies the quality constraint, branch-around order constraint and topology transmission unit integrity constraint.

[0024] In this embodiment, S5 includes: S51. Read part of the transmission matrix, initial matching relationship, source part transmission quality, target part transmission quality and point-line adjacency relationship of topology transmission units; S52. For each initial matching unit pair, calculate the proportion of the transmission volume to the smaller value of the transmission quality of the two units, and the proportion of the number of consistent point-line adjacency relationships to the total number of point-line adjacency relationships. Take the smaller value of the two as the matching confidence. S53. Critical point pairs with matching confidence reaching the lower confidence limit are included in the retention set, and critical point pairs with no matching or below the lower confidence limit are included in the verification set, and mapped to the corresponding topological regions according to the cell cavities through which the separation line passes. S54. Adjust the elimination threshold of the area covered by the retained set to the adjacent persistence level that is lower than the minimum persistence of the set, and adjust the elimination threshold of the area covered only by the review set to the persistence of the corresponding critical point pair; when two sets overlap, use the threshold corresponding to the retained set. S55. Based on the adjusted elimination threshold, critical point pair elimination is re-executed, gradient cell pairs are reset in reverse along the unique discrete gradient path, and separation lines, point-line adjacency relationships and branch connection relationships are reconstructed based on the alternative connection mapping to obtain the feedback simplified point-line feature set. S56. Based on the feedback-simplified point-line feature set, the topology transmission unit is recombined, and the transmission quality, attribute cost matrix, source structure matrix and target structure matrix are recalculated. The corrected transmission matrix is ​​obtained by inputting the fused Gromov-Wasserstein model. S57. Select the topology transmission unit pairs from the correction part of the transmission matrix that have the highest unit occupancy rate, are located in the same locked transmission channel and have closed point-line adjacency relationship, establish the correction point matching relationship and the correction line matching relationship, and obtain the correction matching relationship.

[0025] In this embodiment, S6 includes: S61. Read the matching relationship of correction points and the matching relationship of correction lines, obtain the image coordinates of the matching points and the associated 3D map points, obtain the 2D straight line parameters of the matching lines and the associated 3D line segment endpoints, and establish a residual index according to the transmission unit to which it belongs. S62. Project the 3D map points onto the current image plane using the pose of the camera to be optimized, and construct the point reprojection residual by the difference between the projected coordinates and the image coordinates of the matching points; project the endpoints of the 3D line segments onto the current image plane, calculate the vertical distance from each projection endpoint to the matching line, and construct the line projection distance residual. S63. Normalize the persistence, partial transmission quality and matching confidence of each topology transmission unit, take the minimum value of the three normalization results as the unit residual weight, and assign the point reprojection residual and line projection distance residual contained in the unit. S64. Construct the pose objective function using the sum of squared residuals of weighted point reprojection residuals and the sum of squared residuals of weighted line projection distances. Calculate the pose increment in the Lie algebra space of the camera pose and update the rotation and translation. Repeat the calculation of residuals and pose increments until the pose increment and the change in the objective function are lower than the corresponding convergence thresholds to obtain the optimized camera pose. S65. Based on the optimized camera pose, recalculate the pose residuals of each matching feature, and determine the point features and line features with a persistence not lower than the lower persistence limit, a matching confidence not lower than the lower confidence limit, and a pose residual not higher than the upper residual limit as map admission features. S66. Convert the map access features to the world coordinate system and retrieve the point-line hybrid map according to the topology transmission unit identifier; if the corresponding map features exist, update the spatial coordinates and observation records; if the corresponding map features do not exist, create map points and map lines, and synchronously write the point-line adjacency relationship and branch connection relationship.

[0026] Example: To verify the feasibility of the image matching and fusion method based on point-line feature SLAM of this invention, it was applied to a vision inspection robot system with autonomous mobility. This system is used for autonomous localization, path planning, and 3D environment map construction in complex indoor environments. The inspection robot's operating area typically includes equipment surfaces, wall structures, pipeline areas, and passageways. During robot movement, the visual sensor continuously acquires environmental images from different perspectives. Due to factors such as equipment occlusion, lighting variations, missing local textures, and repetitive distribution of similar structures in real-world environments, consecutive image frames are prone to problems such as decreased feature quantity, mismatched features, and camera pose estimation shifts, making it difficult for traditional visual SLAM methods to maintain stable localization.

[0027] In this embodiment, the inspection robot is equipped with a binocular camera module, an image processing module, a feature matching module, a pose optimization module, and a map storage module. The binocular camera module acquires continuous image frames during the robot's movement at a fixed acquisition frequency and sends the acquired raw color images to the image processing module. The image processing module assigns a frame sequence identifier to each image frame according to the image acquisition order, reads the red, green, and blue channel values ​​in the image, and performs fusion calculations on the different color channels according to fixed channel weights to generate an initial grayscale matrix. Subsequently, the system counts the maximum and minimum grayscale values ​​in the initial grayscale matrix and normalizes the grayscale values ​​of each pixel to ensure that images acquired under different lighting conditions have a uniform grayscale range.

[0028] After grayscale normalization, the system uniformly processes the image resolution based on preset target width and height. The image processing module determines the pixel mapping relationship based on the ratio between the original image size and the target size, reverse-maps the target pixel positions to the normalized grayscale matrix, and performs interpolation calculations using the grayscale values ​​of adjacent pixels to obtain a standard grayscale matrix. The system further converts the pixel positions in the standard grayscale matrix into a two-dimensional regular cell structure, treating each pixel position as a vertex, the connection relationship between adjacent pixels as an edge, and the region enclosed by adjacent vertices as a two-dimensional cell, and records the correlation relationships between vertices, edges, and two-dimensional cells, thereby constructing a two-dimensional discrete scalar field.

[0029] As the robot traverses the equipment area, the system extracts topological features using a constructed two-dimensional discrete scalar field. The feature processing module reads the cell relationships, scalar values, and scalar order from the two-dimensional discrete scalar field, establishes gradient cell pairing relationships between different cells, and generates a discrete gradient field through endpoint constraints. The system determines minimum critical cells, saddle-shaped critical cells, and maxima critical cells based on unpaired vertices, unpaired edges, and unpaired two-dimensional cells, respectively, and establishes persistent pairings between extreme points and saddle points based on the scalar variation relationships between critical cells.

[0030] After obtaining the critical point pairing relationships, the system uses the saddle-shaped critical cavity as the starting position and traces towards the low-scalar and high-scalar regions according to the gradient path to obtain candidate separating lines connecting different critical points. The system compares the forward and reverse tracing paths corresponding to the candidate separating lines. When two paths satisfy the reverse consistency relationship, the corresponding path is determined as the separating line between critical points. Minimum points, maxima points, and saddle points are recorded as point features, and the separating lines between critical points are recorded as line features. At the same time, the endpoint connection relationships and branch connection relationships of the separating lines are established to form a discrete Morse complex containing point features, line features, and topological relationships.

[0031] When the robot enters areas with repetitive textures or partial occlusion, some critical points may exhibit transient persistence due to image changes. To address this, the system correlates point-line topological regions in consecutive image frames, using saddle points as region anchors. It assigns associated extreme points, separating lines, and corresponding cell cavities to the same topological region and generates region topological identifiers. The system further reads critical point pair information from the sequence of homologous regions, calculates critical point pair persistence, local grayscale fluctuations, separating line length, and cross-frame repetition, and establishes stable dominance relationships for critical point pairs based on these parameters.

[0032] When a critical point pair has low persistence, large local grayscale changes, or few repetitions across frames, the system identifies it as a critical point pair to be eliminated. For this pair, the system does not directly delete the corresponding region structure. Instead, it first determines the discrete gradient path corresponding to the critical point pair, records the entry and exit points of the path through the region, and establishes alternative connections based on the consistency of the endpoint signatures. Subsequently, the system readjusts the gradient-cell relationships, deletes unstable critical point pairs, and regenerates the separation line and point-line adjacency relationships based on the alternative connections, resulting in a simplified set of point-line features.

[0033] When matching consecutive image frames, the system reads the simplified point-line feature sets from adjacent frames and combines each critical point persistence pair, the separating line connecting the critical point persistence pair, and the corresponding point-line adjacency relationship to form a topology transmission unit. The system performs normalization processing based on the persistence, cross-frame stability, and connection reliability contained in the topology transmission unit, and converts the normalization result into partial transmission quality to represent the reliable transmission range between different topology transmission units.

[0034] To avoid erroneous associations caused by traditional matching based solely on feature distance, this embodiment further constructs a fusion part Gromov-Wasserstein model. The system establishes an attribute cost matrix based on critical point type, grayscale response, separation line length, separation line direction, and separation line endpoint type. Simultaneously, it establishes a structure matrix based on the adjacent layers, shared saddle point relationships, branching / encircling order, and shortest topological path between topological transmission units. The system inputs a partial transmission quality vector, attribute cost matrix, and structure matrix into the fusion part Gromov-Wasserstein model to calculate the partial transmission matrix between the source and target topological transmission units.

[0035] Based on the partial transmission matrix results, the system selects topology transmission unit pairs that satisfy transmission volume constraints and topology consistency, and establishes point matching relationships according to the critical point roles and line matching relationships according to the branching and wrapping order. When the critical points at both ends of the separating line are matched and the point-line adjacency relationship remains consistent, the corresponding line matching result is retained to form the initial matching relationship.

[0036] During robot movement, when a low confidence level is detected in some matching relationships, the system calculates the matching confidence level based on the proportion of partial transmission volume and the consistency of point-line adjacency, and adjusts the region elimination threshold accordingly. For reliable matching regions, the system reduces the feature deletion range to retain more stable structures; for abnormal matching regions, the system re-executes critical point screening, gradient path adjustment, topology update, and transmission matrix calculation to obtain corrected matching relationships.

[0037] After completing the matching correction, the system obtains the correspondence between image coordinates and 3D map points based on the matching relationship of correction points, and obtains the correspondence between 2D line parameters and 3D line segment endpoints based on the matching relationship of correction lines. The system projects 3D map points onto the current image plane using the current camera pose to be optimized, and constructs point reprojection residuals based on the difference between the projected coordinates and the actual matching point coordinates; at the same time, it calculates the vertical distance between the 3D line segment projection endpoints and the matching lines, and constructs line projection distance residuals.

[0038] The system further calculates residual weights based on the persistence, partial transmission quality, and matching confidence of each topology transmission unit, and jointly optimizes rotation and translation in the camera pose space. Once the pose increment and objective function change satisfy the convergence condition, the optimized camera pose is obtained. The system then filters stable point and line features based on persistence, matching confidence, and pose residuals, transforms the satisfactory features to the world coordinate system, and writes them into a point-line hybrid map, enabling continuous updates to the robot's operating environment.

[0039] To verify the practical effectiveness of the method of this invention, both the traditional visual SLAM method and the method of this invention were tested using the same visual acquisition equipment. During the tests, continuous image frame data was acquired, and autonomous movement was performed in an environment containing repetitive structures, occluded areas, and areas with varying lighting. The feature extraction, matching effect, localization accuracy, and map construction effect of the two methods were compared, and the test results are shown in the table below.

[0040] Table 1 Comparison of test results for image matching and fusion methods based on point and line feature SLAM The test results show that the method of this invention improves the ability to express environmental structure by constructing a two-dimensional discrete scalar field, a discrete Morse complex, and point-line topological relationships, increasing the average number of effective features from 318 per frame to 562 per frame. By incorporating a portion of the Gromov-Wasserstein model, the method applies both feature attribute relationships and topological structure relationships to the matching calculation, increasing the point-line feature matching success rate from 88.4% to 97.2% and reducing the false matching rate to 2.4%.

[0041] Meanwhile, this invention enables the robot to maintain stable positioning even in occluded environments through dynamic feature filtering, matching feedback correction, and joint optimization of point and line residuals. The average positioning error is reduced from 5.2cm to 1.7cm, and the positioning success rate in occluded areas reaches 95.1%. By constructing a hybrid point-line map that includes point features, line features, and topological connectivity, the continuity of the map structure is improved, resulting in a loop closure detection success rate of 97.0%.

[0042] Therefore, this embodiment shows that the image matching and fusion method based on point and line feature SLAM of the present invention can achieve stable operation of visual SLAM system in complex environment through point and line topological feature extraction, stability constraint optimization, structure-aware matching and pose joint optimization, and solve the problems of insufficient feature matching reliability, accumulation of localization error and discontinuous map construction in traditional methods.

[0043] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. An image matching and fusion method based on point and line feature SLAM, characterized in that, include: S1. Acquire continuous image frames, and construct a two-dimensional discrete scalar field by normalizing grayscale and unifying resolution. S2. Based on the two-dimensional discrete scalar field, construct a discrete Morse complex, persistently pair extreme points and saddle points, extract the separating lines between critical points, and form point features, line features, and point-line topological relationships. S3. Determine the region elimination threshold based on the persistence of critical point pairs, local gray-level fluctuations, separation line length, and cross-frame repetition, eliminate low-stability critical point pairs, and synchronously update the discrete gradient path and point-line topology to obtain a simplified point-line feature set. S4. The persistence, cross-frame stability and connection reliability of the simplified point and line feature set are converted into partial transmission quality. The attribute cost and structural cost are constructed based on the differences in point and line attributes and topology. The partial transmission matrix and initial matching relationship are obtained by fusing a partial Gromov-Wasserstein model. S5. Calculate the matching confidence based on the partial transmission matrix and adjust the region elimination threshold. Re-execute critical point pair elimination, topology update, transmission quality calculation and model solution to obtain the corrected matching relationship. S6. Based on the correction matching relationship, construct the point reprojection residual and the line projection distance residual. Determine the residual weight with persistence, partial transmission quality and matching confidence. Jointly optimize the camera pose. Write the point and line features and connection relationships that have reached the lower limit of persistence and matching confidence and the pose residual is lower than the upper limit into the point and line hybrid map.

2. The image matching and fusion method based on point and line feature SLAM according to claim 1, characterized in that, S1 includes: S11. Arrange the consecutive image frames in ascending order according to the acquisition time, configure the frame order identifier for each image frame, read the red channel value, green channel value and blue channel value pixel by pixel, and use fixed channel weights to weight and sum the three channel values ​​to obtain the initial grayscale matrix corresponding to each image frame. S12. Calculate the maximum and minimum gray values ​​in the initial gray matrix, subtract the minimum gray value from the gray value of each pixel, and then divide by the difference between the maximum and minimum gray values ​​to obtain the normalized gray matrix. S13. Set the target width and target height, determine the horizontal mapping ratio based on the initial width and target width, determine the vertical mapping ratio based on the initial height and target height, reverse map the target pixel position to the normalized grayscale matrix, read the four adjacent pixels around the mapped position, and assign interpolation weights based on the horizontal and vertical distances to calculate the grayscale value of the target pixel and obtain the standard grayscale matrix. S14. Arrange the pixels in ascending order of gray values ​​according to the standard gray matrix. When the gray values ​​are the same, determine the arrangement order by ascending row coordinates and ascending column coordinates, and establish a unique scalar order among the pixels. S15. Set each pixel position in the standard grayscale matrix as a vertex, connect horizontally adjacent vertices and vertically adjacent vertices as edges, set the closed area enclosed by four adjacent vertices as a two-dimensional cell cavity, record the relationship between each vertex and edge, and between each edge and two-dimensional cell cavity, to form a two-dimensional regular cell cavity complex. S16. Assign the pixel gray values ​​in the standard gray matrix to the corresponding vertices, set the scalar value of each edge to the larger of the two endpoint scalar values, set the scalar value of each two-dimensional cell to the larger of the boundary vertex scalar values, and store the frame sequence identifier, two-dimensional regular cell complex, association relationship and scalar value accordingly to obtain the two-dimensional discrete scalar field of each image frame.

3. The image matching and fusion method based on point and line feature SLAM according to claim 1, characterized in that, S2 includes: S21. Read the two-dimensional regular cell cavity complex, cell cavity correlation, cell cavity scalar value and scalar order in the two-dimensional discrete scalar field, and classify each side and two-dimensional cell cavity into the lower star set corresponding to the vertex with the highest scalar order in its associated vertex. S22. In each lower star set, establish candidate pairing relationships between vertices and edges, and between edges and two-dimensional cavities. Select candidate pairings in order of increasing scalar span of cavities and increasing order of scalars of low-dimensional cavities. For each gradient cavity pair generated, visit the high-dimensional cavity and its boundary cavity alternately along the generated gradient cavity pair. Delete candidate pairings that cause the visiting path to return to the starting cavity until there are no more candidate pairings available. This will result in the initial acyclic discrete gradient field. S23. Starting from each cell in the initial acyclic discrete gradient field, trace along the gradient cell pair towards the direction of decreasing scalar to the unpaired vertex, and trace along the inverse relationship of the gradient cell pair towards the direction of increasing scalar to the unpaired two-dimensional cell. Combine the identifiers of the reached unpaired vertex and the unpaired two-dimensional cell to form the endpoint signature of the corresponding cell: ,in For cell cavity endpoint signature, This identifies the unpaired vertex reached in the scalar decreasing direction. For unpaired two-dimensional cavities reached in the direction of scalar increase; when there are multiple branches at the same tracking position, the unique tracking direction is determined according to the scalar order of the next cavity in the branch; S24. Remove the gradient pairing between two cells with different endpoint signatures in the initial acyclic discrete gradient field, re-establish candidate pairing relationships in the corresponding lower star set, and only form gradient cell pairs by adjacent dimension cells with the same endpoint signature, boundary correlation and no closed gradient path after addition, to obtain the endpoint-constrained discrete gradient field. S25. Determine the unpaired vertices in the endpoint-constrained discrete gradient field as minimum critical cavities, and determine the minimum point with the corresponding vertex coordinates; determine the unpaired edges as saddle-shaped critical cavities, and determine the saddle point with the midpoint of the corresponding edge; determine the unpaired two-dimensional cavities as maximum critical cavities, and determine the maximum point with the center of the corresponding two-dimensional cavities. S26. Add cavities to the lower-level set in ascending order of scalar quantity, and establish a lower-level connected component for each minimum critical cavity. When a saddle-shaped critical cavity connects two lower-level connected components, persistently pair the saddle point with the minimum point corresponding to the subsequently established lower-level connected component. Add cavities to the upper-level set in descending order of scalar quantity, and establish an upper-level connected component for each maximum critical cavity. When an unpaired saddle-shaped critical cavity connects two upper-level connected components, persistently pair the saddle point with the maximum point corresponding to the subsequently established upper-level connected component. Calculate the persistence of the paired critical points: ; in, Critical point With critical point Durability, and These are the scalar values ​​corresponding to the critical cell cavities; S27. Starting from each saddle-shaped critical cell, trace from the low scalar boundary branches on both sides of the saddle-shaped critical cell along the endpoint constrained discrete gradient field to the corresponding minimum critical cell. Then trace from the high scalar upper neighbor branches on both sides of the saddle-shaped critical cell along the reverse relationship of the endpoint constrained discrete gradient field to the corresponding maximum critical cell. Connect the vertex, edge midpoint and two-dimensional cell center according to the tracing order to obtain the candidate separation line. S28. Starting from the extreme point reached by the candidate separation line, trace backward along the corresponding gradient cavity pair to the saddle point. Compare the reverse-traced cavity sequence with the forward-traced cavity sequence of the candidate separation line in reverse order. When there is a separation position between the two cavity sequences, the cavity between the first separation position and the first re-merging position is determined as the conflict cavity zone. Remove the gradient cavity pairs inside the conflict cavity zone, keep the boundary, critical cavity, and endpoint signature of the conflict cavity zone unchanged, and re-pair only between adjacent dimension cavities with the same endpoint signature. Perform closed gradient path detection and critical cavity number detection on the re-pairing results. Re-trace the forward cavity sequence and the reverse cavity sequence. When the two cavity sequences are in reverse order, determine the corresponding candidate separation line as the separation line between critical points. When there is no pairing result that meets the above conditions in the conflict cavity zone, delete the corresponding candidate separation line. S29. Record the minimum points, maximum points, and saddle points as point features, and record the separation lines between critical points as line features. Establish point-line adjacency relationships based on the endpoints of the separation lines between each critical point, and establish branch connection relationships based on the separation lines between critical points connected by the same saddle point. Combine the endpoint-constrained discrete gradient field, critical point persistence pairing, point features, line features, point-line adjacency relationships, and branch connection relationships to form a discrete Morse complex.

4. The image matching and fusion method based on point and line feature SLAM according to claim 1, characterized in that, S3 includes: S31. Using saddle points as regional anchor points, the associated extreme points, separation lines, and cell cavities through which the separation lines pass are classified into the same point-line topological region. Regional topological identifiers are generated according to the saddle point type, the branching order of the separation lines, and the signatures of the endpoints of each branch. In consecutive image frames, point-line topological regions with the same regional topological identifiers and corresponding anchor point positions are formed into a sequence of homologous regions. S32. For each critical point pair in the same region sequence, read the persistence of the critical point pair, calculate the average deviation of the gray value in the adjacent cell cavity of the separation line relative to the average gray value of the region as the local gray value fluctuation, accumulate the distance between adjacent trajectory points of the separation line to obtain the length of the separation line, and determine the cross-frame repetition as the ratio of the number of frames in the same region sequence to the number of frames in the sequence. S33. Establish a stable dominance relationship for critical point pairs within each point-line topology region: when the persistence of the first critical point pair is not lower than that of the second critical point pair, the local grayscale fluctuation is not higher than that of the second critical point pair, the separation line length is not shorter than that of the second critical point pair, and the cross-frame repetition is not lower than that of the second critical point pair, and at least one of these conditions is not equal, mark the second critical point pair as a dominated critical point pair; form a retention boundary with the undominated critical point pairs, take the minimum persistence within the retention boundary as the region elimination threshold, and determine the dominated critical point pairs with persistence lower than the region elimination threshold as critical point pairs to be eliminated; S34. For each pair of critical points to be eliminated, determine the unique discrete gradient path connecting the corresponding critical cavities, record the entry cavity, exit cavity and endpoint signatures of each separation line intersecting with the gradient path on the boundary of the path neighborhood, and establish an alternative connection mapping between the entry cavity and the exit cavity according to the principle that the endpoint signatures are consistent and the branch loop order remains unchanged. S35. Reset the gradient cell pairs in reverse along the unique discrete gradient path, delete the critical point pairs to be eliminated and their connecting separation lines, and trace from the entry cell to the corresponding exit cell according to the alternative connection mapping to reconstruct the separation lines, point-line adjacency relationships and branch connection relationships; when the reconstruction result forms a closed gradient path, changes the signature of the boundary endpoint of the region, or changes the branch wrapping order of the retained saddle point, cancel this elimination; otherwise, write the updated discrete gradient path and point-line topology relationship to obtain a simplified point-line feature set.

5. The image matching and fusion method based on point and line feature SLAM according to claim 1, characterized in that, S4 includes: S41. Read the simplified dot and line feature set of two adjacent frames, combine each critical point persistent pair, the separating line connecting the critical point persistent pair and the corresponding dot and line adjacency relationship into a topology transmission unit, and configure the unit identifier for each topology transmission unit according to the connection order of saddle point, extreme point and separating line. S42. Normalize the persistence, cross-frame stability and connection reliability of each topology transmission unit respectively, and take the minimum value of the three normalization results as the transmittable proportion of the corresponding topology transmission unit. Multiply the transmittable proportion by the number of point features and line features contained in the corresponding topology transmission unit to obtain the partial transmission quality. S43. Based on the critical point type, critical point gray-scale response, separation line length, separation line direction, and separation line endpoint type, the source topology transmission unit and the target topology transmission unit are compared pairwise to form an attribute cost matrix; based on the adjacent levels, shared saddle point relationships, branching and wrapping order, and shortest topology path between units, the source structure matrix and the target structure matrix are formed respectively. S44. Input the partial transmission quality vector of the source topology transmission unit, the partial transmission quality vector of the target topology transmission unit, the attribute cost matrix, the source structure matrix, the target structure matrix, the unit type correspondence, and the limited total transmission amount into the fusion part of the Gromov-Wasserstein model to obtain the partial transmission matrix representing the transmission amount between the source topology transmission unit and the target topology transmission unit. S45. Select topology transmission unit pairs from the partial transmission matrix that are each other's row maximum and column maximum and whose transmission volume reaches the matching threshold. Establish point matching relationships according to the critical point roles within the unit and establish line matching relationships according to the branching order. Only retain the corresponding line matching relationship when the critical points at both ends of the separation line are matched and the point-line adjacency relationship is consistent. The remaining point features, line features, and topology transmission units remain unmatched to obtain the initial matching relationship.

6. The image matching and fusion method based on point and line feature SLAM according to claim 5, characterized in that, The fusion part of the Gromov-Wasserstein model includes: Read the source topology transmission unit, target topology transmission unit, source partial transmission quality vector, target partial transmission quality vector, attribute cost matrix, source structure matrix, target structure matrix, unit type correspondence, and limited total transmission volume; according to the saddle point identifier contained in each topology transmission unit, group the topology transmission units that share the same saddle point into the same saddle point anchoring group; According to the order in which the separation line wraps around the saddle point, the topology transmission units in each saddle point anchoring group are arranged in a loop. For source saddle point anchoring groups and target saddle point anchoring groups with the same saddle point type, the loop start position of the target saddle point anchoring group is changed in turn. The source topology transmission units and target topology transmission units in the same arrangement position are formed into candidate unit pairs. The attribute costs of the candidate unit pairs are accumulated respectively. The loop start position with the smallest accumulated attribute cost is selected as the branch alignment position of the corresponding two saddle point anchoring groups. Establish a locked transmission channel based on the branch alignment position, and only allow transmission quality between source topology transmission units and target topology transmission units that are in the corresponding arrangement position and have the same critical point role; set units with different saddle point types, different extreme point types, different roles of the split line endpoints, and those that do not conform to the branch alignment position as prohibited transmission positions to form a transmission allowed domain; Within the transmission allowable domain, a non-negative partial transmission matrix is ​​established, limiting the transmission amount in each row to no more than a portion of the transmission quality of the corresponding source topology transmission unit, and the transmission amount in each column to no more than a portion of the transmission quality of the corresponding target topology transmission unit, while ensuring that the sum of all transmission amounts equals the limited total transmission amount; the fusion part of the Gromov-Wasserstein objective function is constructed: in, For part of the transmission matrix, The set of matrices jointly defined by the transmission allowable field and the quality constraint. For the first The source topology transmission unit and the first The attribute cost between target topology transmission units For the first The and the first Structural relationships between source topology transmission units For the first The and the first The structural relationship between the target topology transmission units This is the fusion coefficient between attribute cost and structural cost; Arrange the unit combinations within the transmission allowable domain in order of attribute cost from low to high, and allocate the smaller value between the source remaining mass and the target remaining mass to each unit combination in turn. Stop the allocation when the cumulative allocation reaches the limited total transmission amount, and write the allocation results of each unit combination into the initial partial transmission matrix. Based on the current partial transmission matrix, the weighted difference between the source structure relationship and the target structure relationship corresponding to each allowed transmission position is calculated. The weighted difference and the corresponding attribute cost are combined into the current linear cost. A minimum cost flow network is established with the source topology transmission unit as the supply node, the target topology transmission unit as the receiving node, and the allowed transmission position as the directed connection edge. The source partial transmission quality is set as the supply limit, the target partial transmission quality is set as the receiving limit, the current linear cost is set as the connection edge cost, and the limited total transmission volume is used as the network flow to solve for the candidate partial transmission matrix. Connect the current partial transmission matrix with the candidate partial transmission matrix to form a matrix update segment. Calculate the objective function values ​​corresponding to the two endpoints of the update segment and the stationary point of the objective function. Determine the position with the minimum objective function value as the update position and update the partial transmission matrix accordingly. Repeat the calculation of the structural relationship weighted difference, the solution of the minimum cost flow, and the matrix update until the difference between the objective function values ​​after two adjacent updates is not higher than the convergence threshold. Perform topology transmission unit integrity correction on the converged partial transmission matrix, and calculate the unit occupancy rate of each allowed transmission position according to the following formula: ; in, For the first The source topology transmission unit and the first Unit occupancy rate among target topology transmission units To correspond to the transmission quality of the source portion, For the transmission quality of the corresponding target part; Select topology transmission unit pairs according to their unit occupancy rates from high to low. Only retain unit pairs where the source and target topology transmission units have the highest unit occupancy rates, are located in the same locked transmission channel, and have the same branch alignment position in their corresponding saddle point anchoring groups. Set the transmission amount of the selected unit pairs to the smaller value between the corresponding source part transmission quality and the target part transmission quality. Set the transmission amount of the same source topology transmission unit to other target topology transmission units and the transmission amount of other source topology transmission units to the same target topology transmission unit to zero. When the cumulative transmission amount of the selected unit pair is lower than the limit transmission amount, continue to select unoccupied source topology transmission units and target topology transmission units according to the unit occupancy rate order; when the cumulative transmission amount exceeds the limit transmission amount after adding the next unit pair, set the transmission amount of the unit pair to the difference between the limit transmission amount and the existing cumulative transmission amount, and keep the remaining quality in an untransmitted state to obtain a partial transmission matrix that satisfies the quality constraint, branch-around order constraint and topology transmission unit integrity constraint.

7. The image matching and fusion method based on point and line feature SLAM according to claim 1, characterized in that, S5 includes: S51. Read part of the transmission matrix, initial matching relationship, source part transmission quality, target part transmission quality and point-line adjacency relationship of topology transmission units; S52. For each initial matching unit pair, calculate the proportion of the transmission volume to the smaller value of the transmission quality of the two units, and the proportion of the number of consistent point-line adjacency relationships to the total number of point-line adjacency relationships. Take the smaller value of the two as the matching confidence. S53. Critical point pairs with matching confidence reaching the lower confidence limit are included in the retention set, and critical point pairs with no matching or below the lower confidence limit are included in the verification set, and mapped to the corresponding topological regions according to the cell cavities through which the separation line passes. S54. Adjust the elimination threshold of the area covered by the retained set to the adjacent persistence level that is lower than the minimum persistence of the set, and adjust the elimination threshold of the area covered only by the review set to the persistence of the corresponding critical point pair; when two sets overlap, use the threshold corresponding to the retained set. S55. Based on the adjusted elimination threshold, critical point pair elimination is re-executed, gradient cell pairs are reset in reverse along the unique discrete gradient path, and separation lines, point-line adjacency relationships and branch connection relationships are reconstructed based on the alternative connection mapping to obtain the feedback simplified point-line feature set. S56. Based on the feedback-simplified point-line feature set, the topology transmission unit is recombined, and the transmission quality, attribute cost matrix, source structure matrix and target structure matrix are recalculated. The corrected transmission matrix is ​​obtained by inputting the fused Gromov-Wasserstein model. S57. Select the topology transmission unit pairs from the correction part of the transmission matrix that have the highest unit occupancy rate, are located in the same locked transmission channel and have closed point-line adjacency relationship, establish the correction point matching relationship and the correction line matching relationship, and obtain the correction matching relationship.