diff options
Diffstat (limited to 'intern/libmv/libmv/simple_pipeline/reconstruction.h')
-rw-r--r-- | intern/libmv/libmv/simple_pipeline/reconstruction.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/intern/libmv/libmv/simple_pipeline/reconstruction.h b/intern/libmv/libmv/simple_pipeline/reconstruction.h index 947a0636476..544aeac042e 100644 --- a/intern/libmv/libmv/simple_pipeline/reconstruction.h +++ b/intern/libmv/libmv/simple_pipeline/reconstruction.h @@ -22,6 +22,7 @@ #define LIBMV_SIMPLE_PIPELINE_RECONSTRUCTION_H_ #include "libmv/base/vector.h" +#include "libmv/base/map.h" #include "libmv/numeric/numeric.h" namespace libmv { @@ -29,7 +30,7 @@ namespace libmv { /*! A EuclideanCamera is the location and rotation of the camera viewing \a image. - \a image identify which image from \l Tracks this camera represents. + \a image identify which image from \link Tracks this camera represents. \a R is a 3x3 matrix representing the rotation of the camera. \a t is a translation vector representing its positions. @@ -47,7 +48,7 @@ struct EuclideanCamera { /*! A Point is the 3D location of a track. - \a track identify which track from \l Tracks this point corresponds to. + \a track identify which track from \link Tracks this point corresponds to. \a X represents the 3D position of the track. \sa Reconstruction @@ -89,7 +90,7 @@ class EuclideanReconstruction { \a image is the key used to retrieve the cameras with the other methods in this class. - \note You should use the same \a image identifier as in \l Tracks. + \note You should use the same \a image identifier as in \link Tracks. */ void InsertCamera(int image, const Mat3 &R, const Vec3 &t); @@ -101,7 +102,7 @@ class EuclideanReconstruction { \a track is the key used to retrieve the points with the other methods in this class. - \note You should use the same \a track identifier as in \l Tracks. + \note You should use the same \a track identifier as in \link Tracks. */ void InsertPoint(int track, const Vec3 &X); @@ -120,14 +121,18 @@ class EuclideanReconstruction { vector<EuclideanPoint> AllPoints() const; private: - vector<EuclideanCamera> cameras_; + // Indexed by frame number. + typedef map<int, EuclideanCamera> ImageToCameraMap; + ImageToCameraMap image_to_cameras_map_; + + // Insxed by track. vector<EuclideanPoint> points_; }; /*! A ProjectiveCamera is the projection matrix for the camera of \a image. - \a image identify which image from \l Tracks this camera represents. + \a image identify which image from \link Tracks this camera represents. \a P is the 3x4 projection matrix. \sa ProjectiveReconstruction @@ -143,7 +148,7 @@ struct ProjectiveCamera { /*! A Point is the 3D location of a track. - \a track identifies which track from \l Tracks this point corresponds to. + \a track identifies which track from \link Tracks this point corresponds to. \a X is the homogeneous 3D position of the track. \sa Reconstruction @@ -177,7 +182,7 @@ class ProjectiveReconstruction { \a image is the key used to retrieve the cameras with the other methods in this class. - \note You should use the same \a image identifier as in \l Tracks. + \note You should use the same \a image identifier as in \link Tracks. */ void InsertCamera(int image, const Mat34 &P); @@ -189,7 +194,7 @@ class ProjectiveReconstruction { \a track is the key used to retrieve the points with the other methods in this class. - \note You should use the same \a track identifier as in \l Tracks. + \note You should use the same \a track identifier as in \link Tracks. */ void InsertPoint(int track, const Vec4 &X); @@ -208,7 +213,11 @@ class ProjectiveReconstruction { vector<ProjectivePoint> AllPoints() const; private: - vector<ProjectiveCamera> cameras_; + // Indexed by frame number. + typedef map<int, ProjectiveCamera> ImageToCameraMap; + ImageToCameraMap image_to_cameras_map_; + + // Indexed by track. vector<ProjectivePoint> points_; }; |