Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-06-05 14:09:31 +0300
committerJulian Eisel <julian@blender.org>2020-06-05 14:09:31 +0300
commit920a58d9b6d667894cf166cbbd25e4c2fbd238ea (patch)
tree7ca5a9da640753b5e070c439ac3bdd14dfad92cf /intern/libmv/libmv/simple_pipeline/reconstruction.h
parentc94b6209861ca7cc3985b53474feed7d94c0221a (diff)
parenta1d55bdd530390e58c51abe9707b8d3b0ae3e861 (diff)
Merge branch 'master' into wm-drag-drop-rewritewm-drag-drop-rewrite
Diffstat (limited to 'intern/libmv/libmv/simple_pipeline/reconstruction.h')
-rw-r--r--intern/libmv/libmv/simple_pipeline/reconstruction.h29
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_;
};