[Bf-blender-cvs] [86138d88f6b] master: Revert "Fix critical lens distortion bug in libmv after rB3a7d62cd1f5e."

Sergey Sharybin noreply at git.blender.org
Mon Oct 12 15:12:21 CEST 2020


Commit: 86138d88f6b41790ff043de7625410afb08a56e2
Author: Sergey Sharybin
Date:   Mon Oct 12 10:39:04 2020 +0200
Branches: master
https://developer.blender.org/rB86138d88f6b41790ff043de7625410afb08a56e2

Revert "Fix critical lens distortion bug in libmv after rB3a7d62cd1f5e."

This reverts commit 7e836bde11ce6521953c9f246cacd442a3ef6c0e.

Reverting the incomplete workaround, due to the following reasoning:

- There should be no dependency between CameraIntrinsics and the bundler
  code. This violates intended abstraction of the intrinsics class.

- The fix was not complete, or wrong. Even in the world where there is
  a requirement to the parameters storage size this should have applied
  to all distortion models, including Divisions, Nuke.

Proper fix will be committed next.

===================================================================

M	intern/libmv/libmv/simple_pipeline/bundle.cc
M	intern/libmv/libmv/simple_pipeline/camera_intrinsics.h

===================================================================

diff --git a/intern/libmv/libmv/simple_pipeline/bundle.cc b/intern/libmv/libmv/simple_pipeline/bundle.cc
index 4e76ae1f473..c055846318a 100644
--- a/intern/libmv/libmv/simple_pipeline/bundle.cc
+++ b/intern/libmv/libmv/simple_pipeline/bundle.cc
@@ -47,10 +47,6 @@ enum {
   OFFSET_PRINCIPAL_POINT_Y,
 
   // Distortion model coefficients.
-  // WARNING: camera intrinsics are not required to define/use all of those,
-  // but they have to define all of them up to the last one they need, in that
-  // exact same order. See e.g. how `PolynomialCameraIntrinsics` needs to define
-  // `OFFSET_K4`, even though it does not use it.
   OFFSET_K1,
   OFFSET_K2,
   OFFSET_K3,
diff --git a/intern/libmv/libmv/simple_pipeline/camera_intrinsics.h b/intern/libmv/libmv/simple_pipeline/camera_intrinsics.h
index 60ad1b5b8de..cf0bdb76ccb 100644
--- a/intern/libmv/libmv/simple_pipeline/camera_intrinsics.h
+++ b/intern/libmv/libmv/simple_pipeline/camera_intrinsics.h
@@ -281,7 +281,6 @@ class PolynomialCameraIntrinsics : public CameraIntrinsics {
     OFFSET_K1,
     OFFSET_K2,
     OFFSET_K3,
-    OFFSET_K4,  // Unused, needed to map properly with all deform parameters defined in bundle.cc.
     OFFSET_P1,
     OFFSET_P2,



More information about the Bf-blender-cvs mailing list