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:
Diffstat (limited to 'extern/libmv/libmv/simple_pipeline/bundle.cc')
-rw-r--r--extern/libmv/libmv/simple_pipeline/bundle.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/extern/libmv/libmv/simple_pipeline/bundle.cc b/extern/libmv/libmv/simple_pipeline/bundle.cc
index 34117cbbbd7..3e36a78c9df 100644
--- a/extern/libmv/libmv/simple_pipeline/bundle.cc
+++ b/extern/libmv/libmv/simple_pipeline/bundle.cc
@@ -233,7 +233,8 @@ void EuclideanBundle(const Tracks &tracks,
void EuclideanBundleCommonIntrinsics(const Tracks &tracks,
int bundle_intrinsics,
EuclideanReconstruction *reconstruction,
- CameraIntrinsics *intrinsics) {
+ CameraIntrinsics *intrinsics,
+ int bundle_constraints) {
LG << "Original intrinsics: " << *intrinsics;
vector<Marker> markers = tracks.AllMarkers();
@@ -270,7 +271,7 @@ void EuclideanBundleCommonIntrinsics(const Tracks &tracks,
}
problem.AddResidualBlock(new ceres::AutoDiffCostFunction<
- OpenCVReprojectionError, 2, 8, 9 /* 3 */, 3, 3>(
+ OpenCVReprojectionError, 2, 8, 9, 3, 3>(
new OpenCVReprojectionError(
marker.x,
marker.y)),
@@ -284,6 +285,10 @@ void EuclideanBundleCommonIntrinsics(const Tracks &tracks,
problem.SetParameterization(&camera->R(0, 0),
&rotation_parameterization);
+ if (bundle_constraints & BUNDLE_NO_TRANSLATION) {
+ problem.SetParameterBlockConstant(&camera->t(0));
+ }
+
num_residuals++;
}
LG << "Number of residuals: " << num_residuals;