Multi marker that uses bundle adjustment to refine the 3D positions of the markers (point cloud). More...
#include <MultiMarkerBundle.h>
Public Member Functions | |
double | GetOptimizationError () |
int | GetOptimizationKeyframes () |
int | GetOptimizationMarkers () |
bool | GetOptimizing () |
template<class M > | |
void | MeasurementsAdd (const std::vector< M > *markers, const Pose &camera_pose) |
Adds new measurements that are used in bundle adjustment. | |
void | MeasurementsReset () |
Resets the measurements and camera poses that are stored for bundle adjustment. If something goes from in optimization one will call this and acquire new measurements. | |
MultiMarkerBundle (std::vector< int > &indices) | |
Constructor. | |
bool | Optimize (Camera *_cam, double stop, int max_iter, Optimization::OptimizeMethod method=Optimization::TUKEY_LM) |
Runs the bundle adjustment optimization. | |
~MultiMarkerBundle () | |
Protected Member Functions | |
void | _MeasurementsAdd (MarkerIterator &begin, MarkerIterator &end, const Pose &camera_pose) |
int | measurements_index (int frame, int marker_id, int marker_corner) |
Protected Attributes | |
std::vector< Pose > | camera_poses |
std::map< int, PointDouble > | measurements |
double | optimization_error |
int | optimization_keyframes |
int | optimization_markers |
bool | optimizing |
Multi marker that uses bundle adjustment to refine the 3D positions of the markers (point cloud).
This can be initialized by using e.g. MultiMarkerAverage class.
Definition at line 44 of file MultiMarkerBundle.h.
alvar::MultiMarkerBundle::MultiMarkerBundle | ( | std::vector< int > & | indices | ) |
Constructor.
indices | Vector of marker codes that are included into multi marker. The first element defines origin. |
Definition at line 31 of file MultiMarkerBundle.cpp.
Definition at line 37 of file MultiMarkerBundle.cpp.
void alvar::MultiMarkerBundle::_MeasurementsAdd | ( | MarkerIterator & | begin, |
MarkerIterator & | end, | ||
const Pose & | camera_pose | ||
) | [protected] |
Definition at line 253 of file MultiMarkerBundle.cpp.
double alvar::MultiMarkerBundle::GetOptimizationError | ( | ) | [inline] |
Definition at line 74 of file MultiMarkerBundle.h.
int alvar::MultiMarkerBundle::GetOptimizationKeyframes | ( | ) | [inline] |
Definition at line 75 of file MultiMarkerBundle.h.
int alvar::MultiMarkerBundle::GetOptimizationMarkers | ( | ) | [inline] |
Definition at line 76 of file MultiMarkerBundle.h.
bool alvar::MultiMarkerBundle::GetOptimizing | ( | ) | [inline] |
Definition at line 77 of file MultiMarkerBundle.h.
int alvar::MultiMarkerBundle::measurements_index | ( | int | frame, |
int | marker_id, | ||
int | marker_corner | ||
) | [inline, protected] |
Definition at line 53 of file MultiMarkerBundle.h.
void alvar::MultiMarkerBundle::MeasurementsAdd | ( | const std::vector< M > * | markers, |
const Pose & | camera_pose | ||
) | [inline] |
Adds new measurements that are used in bundle adjustment.
markers | Vector of markers detected by MarkerDetector. |
camera_pose | Current camera pose. |
Definition at line 84 of file MultiMarkerBundle.h.
Resets the measurements and camera poses that are stored for bundle adjustment. If something goes from in optimization one will call this and acquire new measurements.
Definition at line 41 of file MultiMarkerBundle.cpp.
bool alvar::MultiMarkerBundle::Optimize | ( | Camera * | _cam, |
double | stop, | ||
int | max_iter, | ||
Optimization::OptimizeMethod | method = Optimization::TUKEY_LM |
||
) |
Runs the bundle adjustment optimization.
markers | Vector of markers detected by MarkerDetector. |
camera_pose | Current camera pose. |
max_iter | Maximum number of iteration loops. |
method | The method that is applied inside optimization. Try Optimization::LEVENBERGMARQUARDT or Optimization::GAUSSNEWTON or Optmization::TUKEY_LM |
Definition at line 102 of file MultiMarkerBundle.cpp.
std::vector<Pose> alvar::MultiMarkerBundle::camera_poses [protected] |
Definition at line 51 of file MultiMarkerBundle.h.
std::map<int, PointDouble> alvar::MultiMarkerBundle::measurements [protected] |
Definition at line 52 of file MultiMarkerBundle.h.
double alvar::MultiMarkerBundle::optimization_error [protected] |
Definition at line 49 of file MultiMarkerBundle.h.
int alvar::MultiMarkerBundle::optimization_keyframes [protected] |
Definition at line 47 of file MultiMarkerBundle.h.
int alvar::MultiMarkerBundle::optimization_markers [protected] |
Definition at line 48 of file MultiMarkerBundle.h.
bool alvar::MultiMarkerBundle::optimizing [protected] |
Definition at line 50 of file MultiMarkerBundle.h.