struct mp2p_icp_filters::SimplemapPartition¶
Overview¶
A split of the keyframes of a simple-map into submaps, each one a group of keyframes that observe the same place, plus the similarity graph it comes from. Some keyframes (the nodes) are sampled to build the graph; every keyframe is then linked to the nodes it shares content with.
#include <simplemap_partition.h> struct SimplemapPartition { // fields std::vector<uint32_t> node_keyframe; std::vector<WeightedEdge> node_edges; std::vector<uint32_t> node_submap; std::vector<uint32_t> node_voxels; std::vector<std::vector<std::pair<uint32_t, double>>> keyframe_links; std::vector<uint32_t> keyframe_submap; uint64_t map_fingerprint = 0; // methods std::size_t keyframe_count() const; std::size_t submap_count() const; std::vector<std::vector<size_t>> submap_keyframes() const; void save_to_file(const std::string& file) const; static SimplemapPartition load_from_file(const std::string& file); };
Fields¶
std::vector<uint32_t> node_keyframe
Keyframe index of each node.
std::vector<WeightedEdge> node_edges
Similarity between nodes (node indices, i < j)
std::vector<uint32_t> node_submap
Submap of each node.
std::vector<uint32_t> node_voxels
Size (voxels) of the signature of each node: with the similarity of an edge, it gives the content two nodes share.
std::vector<std::vector<std::pair<uint32_t, double>>> keyframe_links
For each keyframe: the nodes it shares content with and the similarity, sorted by node. A node keyframe lists itself with 1.
std::vector<uint32_t> keyframe_submap
Submap of each keyframe: that of its most similar node, or, without links (no points), that of the closest keyframe in the sequence.
uint64_t map_fingerprint = 0
simplemap_fingerprint() of the map it was made from (0: unknown)
Methods¶
std::vector<std::vector<size_t>> submap_keyframes() const
Keyframes of each submap, in increasing order.