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
path: root/extern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-05-10 10:48:47 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-05-10 10:48:47 +0400
commit4648ec3e82869ee44da88c5551d47c4f830e00c6 (patch)
tree839e78f3c645efd38b245a72c65cece45e0104c8 /extern
parent7a547e441b2a107148a9c0abb3b8badbb728abef (diff)
Remove check for zero focal length in BA cost functor
This check is actually redundant, because empty intrinsics will have focal length of 1.0, which means original comment about BundleIntrinsics was not truth. It is possible that external user will send focal length of zero to be refined, but blender prevents this from happening.
Diffstat (limited to 'extern')
-rw-r--r--extern/libmv/libmv/simple_pipeline/bundle.cc34
1 files changed, 12 insertions, 22 deletions
diff --git a/extern/libmv/libmv/simple_pipeline/bundle.cc b/extern/libmv/libmv/simple_pipeline/bundle.cc
index 17996f70def..77181654466 100644
--- a/extern/libmv/libmv/simple_pipeline/bundle.cc
+++ b/extern/libmv/libmv/simple_pipeline/bundle.cc
@@ -93,28 +93,18 @@ struct OpenCVReprojectionError {
T predicted_x, predicted_y;
- // EuclideanBundle uses empty intrinsics, which breaks undistortion code;
- // so use an implied focal length of 1.0 if the focal length is exactly
- // zero.
- // TODO(keir): Figure out a better way to do this.
- if (focal_length != T(0)) {
- // Apply distortion to the normalized points to get (xd, yd).
- // TODO(keir): Do early bailouts for zero distortion; these are expensive
- // jet operations.
-
- ApplyRadialDistortionCameraIntrinsics(focal_length,
- focal_length,
- principal_point_x,
- principal_point_y,
- k1, k2, k3,
- p1, p2,
- xn, yn,
- &predicted_x,
- &predicted_y);
- } else {
- predicted_x = xn;
- predicted_y = yn;
- }
+ // Apply distortion to the normalized points to get (xd, yd).
+ // TODO(keir): Do early bailouts for zero distortion; these are expensive
+ // jet operations.
+ ApplyRadialDistortionCameraIntrinsics(focal_length,
+ focal_length,
+ principal_point_x,
+ principal_point_y,
+ k1, k2, k3,
+ p1, p2,
+ xn, yn,
+ &predicted_x,
+ &predicted_y);
// The error is the difference between the predicted and observed position.
residuals[0] = predicted_x - T(observed_x);