[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56642] trunk/blender/extern/libmv/libmv/ simple_pipeline/bundle.cc: Remove check for zero focal length in BA cost functor
Sergey Sharybin
sergey.vfx at gmail.com
Fri May 10 08:48:48 CEST 2013
Revision: 56642
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56642
Author: nazgul
Date: 2013-05-10 06:48:47 +0000 (Fri, 10 May 2013)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc
Modified: trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc
===================================================================
--- trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc 2013-05-10 06:46:32 UTC (rev 56641)
+++ trunk/blender/extern/libmv/libmv/simple_pipeline/bundle.cc 2013-05-10 06:48:47 UTC (rev 56642)
@@ -93,29 +93,19 @@
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.
+ // 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);
- 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;
- }
-
// The error is the difference between the predicted and observed position.
residuals[0] = predicted_x - T(observed_x);
residuals[1] = predicted_y - T(observed_y);
More information about the Bf-blender-cvs
mailing list