Blender  V3.3
bundle.h
Go to the documentation of this file.
1 // Copyright (c) 2011 libmv authors.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to
5 // deal in the Software without restriction, including without limitation the
6 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 // sell copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19 // IN THE SOFTWARE.
20 
21 #ifndef LIBMV_SIMPLE_PIPELINE_BUNDLE_H
22 #define LIBMV_SIMPLE_PIPELINE_BUNDLE_H
23 
24 #include "libmv/numeric/numeric.h"
25 
26 namespace libmv {
27 
28 class CameraIntrinsics;
29 class EuclideanReconstruction;
30 class ProjectiveReconstruction;
31 class Tracks;
32 
35  : num_cameras(0), num_points(0), evaluate_jacobian(false) {}
36 
37  // Number of cameras appeared in bundle adjustment problem
39 
40  // Number of points appeared in bundle adjustment problem
42 
43  // When set to truth, jacobian of the problem after optimization
44  // will be evaluated and stored in \parameter jacobian
46 
47  // Contains evaluated jacobian of the problem.
48  // Parameters are ordered in the following way:
49  // - Intrinsics block
50  // - Cameras (for each camera rotation goes first, then translation)
51  // - Points
53 };
54 
72 void EuclideanBundle(const Tracks& tracks,
74 
101 
104 
105  BUNDLE_RADIAL_K1 = (1 << 2),
106  BUNDLE_RADIAL_K2 = (1 << 3),
107  BUNDLE_RADIAL_K3 = (1 << 4),
108  BUNDLE_RADIAL_K4 = (1 << 5),
111 
115 };
119 };
120 void EuclideanBundleCommonIntrinsics(const Tracks& tracks,
121  const int bundle_intrinsics,
122  const int bundle_constraints,
123  EuclideanReconstruction* reconstruction,
124  CameraIntrinsics* intrinsics,
125  BundleEvaluation* evaluation = NULL);
126 
144 void ProjectiveBundle(const Tracks& tracks,
145  ProjectiveReconstruction* reconstruction);
146 
147 } // namespace libmv
148 
149 #endif // LIBMV_SIMPLE_PIPELINE_BUNDLE_H
const ProjectiveReconstruction & reconstruction
Definition: intersect.cc:198
BundleConstraints
Definition: bundle.h:116
@ BUNDLE_NO_TRANSLATION
Definition: bundle.h:118
@ BUNDLE_NO_CONSTRAINTS
Definition: bundle.h:117
void ProjectiveBundle(const Tracks &, ProjectiveReconstruction *)
Definition: bundle.cc:852
BundleIntrinsics
Definition: bundle.h:99
@ BUNDLE_RADIAL_K1
Definition: bundle.h:105
@ BUNDLE_RADIAL_K3
Definition: bundle.h:107
@ BUNDLE_RADIAL_K4
Definition: bundle.h:108
@ BUNDLE_FOCAL_LENGTH
Definition: bundle.h:102
@ BUNDLE_RADIAL
Definition: bundle.h:109
@ BUNDLE_TANGENTIAL_P1
Definition: bundle.h:112
@ BUNDLE_TANGENTIAL_P2
Definition: bundle.h:113
@ BUNDLE_NO_INTRINSICS
Definition: bundle.h:100
@ BUNDLE_PRINCIPAL_POINT
Definition: bundle.h:103
@ BUNDLE_RADIAL_K2
Definition: bundle.h:106
@ BUNDLE_TANGENTIAL
Definition: bundle.h:114
Eigen::MatrixXd Mat
Definition: numeric.h:60
void EuclideanBundle(const Tracks &tracks, EuclideanReconstruction *reconstruction)
Definition: bundle.cc:650
void EuclideanBundleCommonIntrinsics(const Tracks &tracks, const int bundle_intrinsics, const int bundle_constraints, EuclideanReconstruction *reconstruction, CameraIntrinsics *intrinsics, BundleEvaluation *evaluation)
Definition: bundle.cc:661
ListBase tracks
Definition: tracking.c:60