|
Solar
|
A covisibility graph of keyframes. This class provides a covisibility graph where each vertex is an id of a keyframe and each edge is weighted by the number of common cloud points between two keyframes. More...
#include <CovisibilityGraph.h>


Public Member Functions | |
| CovisibilityGraph ()=default | |
| CovisibilityGraph constructor. | |
| CovisibilityGraph (const CovisibilityGraph &other)=default | |
| CovisibilityGraph & | operator= (const CovisibilityGraph &other)=default |
| ~CovisibilityGraph ()=default | |
| ~CovisibilityGraph | |
| FrameworkReturnCode | increaseEdge (uint32_t node1_id, uint32_t node2_id, float weight) |
| This method allow to increase edge between 2 nodes. More... | |
| FrameworkReturnCode | decreaseEdge (uint32_t node1_id, uint32_t node2_id, float weight) |
| This method allow to decrease edge between 2 nodes. More... | |
| FrameworkReturnCode | removeEdge (uint32_t node1_id, uint32_t node2_id) |
| This method allow to remove an edge between 2 nodes. More... | |
| FrameworkReturnCode | getEdge (uint32_t node1_id, uint32_t node2_id, float &weight) const |
| This method allow to get edge between 2 nodes. More... | |
| bool | isEdge (const uint32_t node1_id, const uint32_t node2_id) const |
| This method allow to verify that exist an edge between 2 nodes. More... | |
| FrameworkReturnCode | getAllNodes (std::set< uint32_t > &nodes_id) const |
| This method allow to get all nodes of the graph. More... | |
| FrameworkReturnCode | suppressNode (const uint32_t node_id) |
| This method allow to suppress a node of the graph. More... | |
| FrameworkReturnCode | getNeighbors (const uint32_t node_id, const float minWeight, std::vector< uint32_t > &neighbors, const uint32_t maxNbNeighbors=0) const |
| This method allow to get neighbors of a node in the graph. More... | |
| FrameworkReturnCode | minimalSpanningTree (std::vector< std::tuple< uint32_t, uint32_t, float > > &edges_weights, float &minTotalWeights) |
| This method allow to get minimal spanning tree of the graph. More... | |
| FrameworkReturnCode | maximalSpanningTree (std::vector< std::tuple< uint32_t, uint32_t, float > > &edges_weights, float &maxTotalWeights) |
| This method allow to get maximal spanning tree of the graph. More... | |
| FrameworkReturnCode | getShortestPath (const uint32_t node1_id, const uint32_t node2_id, std::vector< uint32_t > &path) |
| This method allow to get the shortest (by number of vertices) path between 2 nodes. More... | |
| FrameworkReturnCode | display () const |
| This method allow to display all vertices and weighted edges of the covisibility graph. | |
| template<typename Archive > | |
| void | serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version) |
Public Member Functions inherited from SolAR::datastructure::Lockable | |
| Lockable ()=default | |
| LockableCollection constructor. | |
| std::unique_lock< std::mutex > | acquireLock () |
| This method returns the point cloud. More... | |
| void | lock () |
| void | unlock () |
| bool | tryLock () |
Friends | |
| class | boost::serialization::access |
A covisibility graph of keyframes. This class provides a covisibility graph where each vertex is an id of a keyframe and each edge is weighted by the number of common cloud points between two keyframes.
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::decreaseEdge | ( | uint32_t | node1_id, |
| uint32_t | node2_id, | ||
| float | weight | ||
| ) |
This method allow to decrease edge between 2 nodes.
| [in] | id | of 1st node |
| [in] | id | of 2nd node |
| [in] | weight | to decrease |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::getAllNodes | ( | std::set< uint32_t > & | nodes_id | ) | const |
This method allow to get all nodes of the graph.
| [out] | ids | of all nodes |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::getEdge | ( | uint32_t | node1_id, |
| uint32_t | node2_id, | ||
| float & | weight | ||
| ) | const |
This method allow to get edge between 2 nodes.
| [in] | id | of 1st node |
| [in] | id | of 2nd node |
| [out] | weight | of the edge |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::getNeighbors | ( | const uint32_t | node_id, |
| const float | minWeight, | ||
| std::vector< uint32_t > & | neighbors, | ||
| const uint32_t | maxNbNeighbors = 0 |
||
| ) | const |
This method allow to get neighbors of a node in the graph.
| [in] | node_id | id of the node to get neighbors |
| [in] | minWeight | min value between this node and a neighbor to accept |
| [out] | neighbors | a vector of neighbors sorted to greater weighted edge. |
| [in] | maxNbNeighbors | the maximum number of neighbors. If it is zero, find all neighbors. |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::getShortestPath | ( | const uint32_t | node1_id, |
| const uint32_t | node2_id, | ||
| std::vector< uint32_t > & | path | ||
| ) |
This method allow to get the shortest (by number of vertices) path between 2 nodes.
| [in] | id | of 1st node |
| [in] | id | of 2nd node |
| [out] | the | shortest path |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::increaseEdge | ( | uint32_t | node1_id, |
| uint32_t | node2_id, | ||
| float | weight | ||
| ) |
This method allow to increase edge between 2 nodes.
| [in] | id | of 1st node |
| [in] | id | of 2nd node |
| [in] | weight | to increase |
| bool SolAR::datastructure::CovisibilityGraph::isEdge | ( | const uint32_t | node1_id, |
| const uint32_t | node2_id | ||
| ) | const |
This method allow to verify that exist an edge between 2 nodes.
| [in] | id | of 1st node |
| [in] | id | of 2nd node |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::maximalSpanningTree | ( | std::vector< std::tuple< uint32_t, uint32_t, float > > & | edges_weights, |
| float & | maxTotalWeights | ||
| ) |
This method allow to get maximal spanning tree of the graph.
| [out] | edges_weights | the maximal spanning tree graph including edges with weights |
| [out] | maxTotalWeights | cost of the maximal spanning tree graph |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::minimalSpanningTree | ( | std::vector< std::tuple< uint32_t, uint32_t, float > > & | edges_weights, |
| float & | minTotalWeights | ||
| ) |
This method allow to get minimal spanning tree of the graph.
| [out] | edges_weights | the minimal spanning tree graph including edges with weights |
| [out] | minTotalWeights | cost of the minimal spanning tree graph |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::removeEdge | ( | uint32_t | node1_id, |
| uint32_t | node2_id | ||
| ) |
This method allow to remove an edge between 2 nodes.
| [in] | id | of 1st node |
| [in] | id | of 2nd node |
| FrameworkReturnCode SolAR::datastructure::CovisibilityGraph::suppressNode | ( | const uint32_t | node_id | ) |
This method allow to suppress a node of the graph.
| [in] | id | of the node to suppress |