Blender
V3.3
intern
libmv
libmv
simple_pipeline
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
33
struct
BundleEvaluation
{
34
BundleEvaluation
()
35
:
num_cameras
(0),
num_points
(0),
evaluate_jacobian
(false) {}
36
37
// Number of cameras appeared in bundle adjustment problem
38
int
num_cameras
;
39
40
// Number of points appeared in bundle adjustment problem
41
int
num_points
;
42
43
// When set to truth, jacobian of the problem after optimization
44
// will be evaluated and stored in \parameter jacobian
45
bool
evaluate_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
52
Mat
jacobian
;
53
};
54
72
void
EuclideanBundle
(
const
Tracks
&
tracks
,
73
EuclideanReconstruction
*
reconstruction
);
74
99
enum
BundleIntrinsics
{
100
BUNDLE_NO_INTRINSICS
= 0,
101
102
BUNDLE_FOCAL_LENGTH
= (1 << 0),
103
BUNDLE_PRINCIPAL_POINT
= (1 << 1),
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),
109
BUNDLE_RADIAL
= (
BUNDLE_RADIAL_K1
|
BUNDLE_RADIAL_K2
|
BUNDLE_RADIAL_K3
|
110
BUNDLE_RADIAL_K4
),
111
112
BUNDLE_TANGENTIAL_P1
= (1 << 6),
113
BUNDLE_TANGENTIAL_P2
= (1 << 7),
114
BUNDLE_TANGENTIAL
= (
BUNDLE_TANGENTIAL_P1
|
BUNDLE_TANGENTIAL_P2
),
115
};
116
enum
BundleConstraints
{
117
BUNDLE_NO_CONSTRAINTS
= 0,
118
BUNDLE_NO_TRANSLATION
= 1,
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
NULL
return NULL
Definition:
bmesh_operator_api_inline.h:205
libmv::EuclideanReconstruction
Definition:
libmv/simple_pipeline/reconstruction.h:76
libmv::Tracks
Definition:
libmv/simple_pipeline/tracks.h:65
reconstruction
const ProjectiveReconstruction & reconstruction
Definition:
intersect.cc:198
libmv
Definition:
libmv/autotrack/autotrack.h:30
libmv::BundleConstraints
BundleConstraints
Definition:
bundle.h:116
libmv::BUNDLE_NO_TRANSLATION
@ BUNDLE_NO_TRANSLATION
Definition:
bundle.h:118
libmv::BUNDLE_NO_CONSTRAINTS
@ BUNDLE_NO_CONSTRAINTS
Definition:
bundle.h:117
libmv::ProjectiveBundle
void ProjectiveBundle(const Tracks &, ProjectiveReconstruction *)
Definition:
bundle.cc:852
libmv::BundleIntrinsics
BundleIntrinsics
Definition:
bundle.h:99
libmv::BUNDLE_RADIAL_K1
@ BUNDLE_RADIAL_K1
Definition:
bundle.h:105
libmv::BUNDLE_RADIAL_K3
@ BUNDLE_RADIAL_K3
Definition:
bundle.h:107
libmv::BUNDLE_RADIAL_K4
@ BUNDLE_RADIAL_K4
Definition:
bundle.h:108
libmv::BUNDLE_FOCAL_LENGTH
@ BUNDLE_FOCAL_LENGTH
Definition:
bundle.h:102
libmv::BUNDLE_RADIAL
@ BUNDLE_RADIAL
Definition:
bundle.h:109
libmv::BUNDLE_TANGENTIAL_P1
@ BUNDLE_TANGENTIAL_P1
Definition:
bundle.h:112
libmv::BUNDLE_TANGENTIAL_P2
@ BUNDLE_TANGENTIAL_P2
Definition:
bundle.h:113
libmv::BUNDLE_NO_INTRINSICS
@ BUNDLE_NO_INTRINSICS
Definition:
bundle.h:100
libmv::BUNDLE_PRINCIPAL_POINT
@ BUNDLE_PRINCIPAL_POINT
Definition:
bundle.h:103
libmv::BUNDLE_RADIAL_K2
@ BUNDLE_RADIAL_K2
Definition:
bundle.h:106
libmv::BUNDLE_TANGENTIAL
@ BUNDLE_TANGENTIAL
Definition:
bundle.h:114
libmv::Mat
Eigen::MatrixXd Mat
Definition:
numeric.h:60
libmv::EuclideanBundle
void EuclideanBundle(const Tracks &tracks, EuclideanReconstruction *reconstruction)
Definition:
bundle.cc:650
libmv::EuclideanBundleCommonIntrinsics
void EuclideanBundleCommonIntrinsics(const Tracks &tracks, const int bundle_intrinsics, const int bundle_constraints, EuclideanReconstruction *reconstruction, CameraIntrinsics *intrinsics, BundleEvaluation *evaluation)
Definition:
bundle.cc:661
numeric.h
libmv::BundleEvaluation
Definition:
bundle.h:33
libmv::BundleEvaluation::BundleEvaluation
BundleEvaluation()
Definition:
bundle.h:34
libmv::BundleEvaluation::jacobian
Mat jacobian
Definition:
bundle.h:52
libmv::BundleEvaluation::evaluate_jacobian
bool evaluate_jacobian
Definition:
bundle.h:45
libmv::BundleEvaluation::num_cameras
int num_cameras
Definition:
bundle.h:38
libmv::BundleEvaluation::num_points
int num_points
Definition:
bundle.h:41
tracks
ListBase tracks
Definition:
tracking.c:60
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1