31 image_to_cameras_map_ = other.image_to_cameras_map_;
32 points_ = other.points_;
38 image_to_cameras_map_ = other.image_to_cameras_map_;
39 points_ = other.points_;
47 LG <<
"InsertCamera " << image <<
":\nR:\n" <<
R <<
"\nt:\n" << t;
54 image_to_cameras_map_.insert(make_pair(image, camera));
58 LG <<
"InsertPoint " << track <<
":\n" <<
X;
59 if (track >= points_.size()) {
60 points_.resize(track + 1);
62 points_[track].track = track;
73 ImageToCameraMap::const_iterator it = image_to_cameras_map_.find(image);
74 if (it == image_to_cameras_map_.end()) {
82 for (
const ImageToCameraMap::value_type& image_and_camera :
83 image_to_cameras_map_) {
84 cameras.push_back(image_and_camera.second);
95 if (track < 0 || track >= points_.size()) {
99 if (point->
track == -1) {
107 for (
int i = 0;
i < points_.size(); ++
i) {
108 if (points_[
i].track != -1) {
109 points.push_back(points_[
i]);
116 LG <<
"InsertCamera " << image <<
":\nP:\n" <<
P;
119 camera.
image = image;
122 image_to_cameras_map_.insert(make_pair(image, camera));
126 LG <<
"InsertPoint " << track <<
":\n" <<
X;
127 if (track >= points_.size()) {
128 points_.resize(track + 1);
130 points_[track].track = track;
131 points_[track].X =
X;
142 ImageToCameraMap::const_iterator it = image_to_cameras_map_.find(image);
143 if (it == image_to_cameras_map_.end()) {
151 for (
const ImageToCameraMap::value_type& image_and_camera :
152 image_to_cameras_map_) {
153 cameras.push_back(image_and_camera.second);
165 if (track < 0 || track >= points_.size()) {
169 if (point->
track == -1) {
177 for (
int i = 0;
i < points_.size(); ++
i) {
178 if (points_[
i].track != -1) {
179 points.push_back(points_[
i]);
EuclideanReconstruction()
vector< EuclideanCamera > AllCameras() const
Returns all cameras.
EuclideanPoint * PointForTrack(int track)
Returns a pointer to the point corresponding to track.
void InsertCamera(int image, const Mat3 &R, const Vec3 &t)
void InsertPoint(int track, const Vec3 &X)
EuclideanReconstruction & operator=(const EuclideanReconstruction &other)
EuclideanCamera * CameraForImage(int image)
Returns a pointer to the camera corresponding to image.
vector< EuclideanPoint > AllPoints() const
Returns all points.
void InsertPoint(int track, const Vec4 &X)
vector< ProjectivePoint > AllPoints() const
Returns all points.
vector< ProjectiveCamera > AllCameras() const
Returns all cameras.
ProjectivePoint * PointForTrack(int track)
Returns a pointer to the point corresponding to track.
ProjectiveCamera * CameraForImage(int image)
Returns a pointer to the camera corresponding to image.
void InsertCamera(int image, const Mat34 &P)
Eigen::Matrix< double, 3, 3 > Mat3
Eigen::Matrix< double, 3, 4 > Mat34
std::vector< ElementType, Eigen::aligned_allocator< ElementType > > vector