![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Vision/LeastSquaresPoseGraphSolution.h>
Pose graph optimization with Least Squares solution based on g2o's implementation The first pose is the reference pose and will stay fixed, all other poses are free to change. More...
Inheritance diagram for LeastSquaresPoseGraphSolution:Pose graph optimization with Least Squares solution based on g2o's implementation The first pose is the reference pose and will stay fixed, all other poses are free to change.
Public Types | |
| enum | RobustKernel { None = 0 , Cauchy , DCS , GemanMcClure , Fair , Huber , PseudoHuber , Saturated , ScaleDelta , Tukey , Welsch } |
| Robust kernel for the least squares method. | |
Public Member Functions | |
| void | setRobustKernel (RobustKernel robustKernel) |
| RobustKernel | robustKernel () const |
| void | setRobustKernelDelta (double robustKernelDelta) |
| double | robustKernelDelta () const |
| void | setApplySpanningTreeInitialization (bool applySpanningTreeInitialization) |
| Set apply spanning tree initialization for the least squares solution. | |
| bool | applySpanningTreeInitialization () const |
| Get the flag for applying spanning tree for initialization. | |
| bool | compute () override |
| Run least squares solution for pose graph optimization. | |
Public Member Functions inherited from PoseGraphOptimization | |
| bool | addPose (const int &id, const mat4 &T, bool fixed=false) |
| Add node with given pose. Returns false when node already existed. In this case the pose is not updated. | |
| std::map< int, mat4 > | poses () const |
| Return map of all poses (nodes) with their ids. | |
| bool | addConstraint (const Constraint &constraint) |
| Add constraint between nodes. Nodes must exist. Returns false when constraint was not added. | |
| bool | addConstraint (const int &from, const int &to, const mat4 &T, const mat6 &information) |
| Add constraint between nodes. Nodes must exist. Returns false when constraint was not added. | |
| std::vector< Constraint > | constraints () const |
| Get the set of constraints. | |
| void | setMaximumIterations (int maxIter) |
| Set maximum number of iterations to run the optimizer for. | |
| int | maximumIterations () const |
| Get the maximum number of iteration to run the optimizer for. | |
| void | setGainThreshold (double gainThreshold) |
| Set error improvement across iterations below which to abort the optimization. | |
| double | gainThreshold () const |
| Get error improvement across iterations below which to abort the optimization. | |
| bool | isComplete () |
| Tests whether the pose graph is complete, i.e. there is only one connected component. | |
| int | numConnectedComponents () |
| Gives the number of independed components of the added graph by applying Disjoint Set Union to search for the number of connected components. | |
| std::vector< int > | connectedComponents () |
| Gives an index for each pose/node indicating to which component the pose/node belongs (Disjoint Set Union) | |
Additional Inherited Members | |
Protected Member Functions inherited from PoseGraphOptimization | |
| int | traceParents (int *parent, int x) const |
| Traces back to the parent of a node in a graph; used by numConnectedComponents. | |
| std::vector< int > | computeAllParents () const |
Protected Attributes inherited from PoseGraphOptimization | |
| int | m_maxIter = 400 |
| Number of iteration to run the optimizer for. | |
| double | m_gainThreshold = 1e-2 |
| Multiplicative error improvement to abort optimization. | |
| std::vector< mat4 > | m_poses |
| Pose defined as transformation matrix relative to the global-frame. | |
| std::vector< bool > | m_fixed |
| Specifies whether pose should be optimized. | |
| std::unordered_map< int, int > | m_origToConsecutivePoseIds |
| Maps original id of a pose to its consecutive place in the computation sets (which we enforce to be consecutive from 0 to N) | |
| std::vector< Constraint > | m_constraints |
| Relative poses. | |
|
overridevirtual |
Run least squares solution for pose graph optimization.
Reimplemented from PoseGraphOptimization.