[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40243] branches/soc-2011-tomato: Camera tracking integration

Sergey Sharybin g.ulairi at gmail.com
Thu Sep 15 21:01:32 CEST 2011


Revision: 40243
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40243
Author:   nazgul
Date:     2011-09-15 19:01:32 +0000 (Thu, 15 Sep 2011)
Log Message:
-----------
Camera tracking integration
===========================

- Do not disable track when tracking frame-by-frame and tracking
  threshold became bad.
- Show anchored image in track preview widget.
- Do not show search area for non-selected and disabled markers.
- Keep anchor constant position when sliding offset parameters in panel.
- Re-enabled occasionally disabled openmp for tracking.
- Renamed clearing operator so now buttons are more clear.
- Updated eigen to the very recent version.

NOTE: I had to enable static aligning again due to it gave crashes
      when tracking on my new laptop. I'm not sure it'll work fine
      on another systems.

Modified Paths:
--------------
    branches/soc-2011-tomato/extern/Eigen3/Eigen/Core
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LDLT.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LLT.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/BandMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/CwiseNullaryOp.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Diagonal.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Dot.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Functors.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Fuzzy.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/GenericPacketMath.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Map.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/MathFunctions.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/MatrixBase.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/NumTraits.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/PlainObjectBase.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/StableNorm.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/TriangularMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/GeneralMatrixVector.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/TriangularMatrixVector.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/products/TriangularSolverVector.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/util/Macros.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/util/Memory.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigen2Support/Cwise.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigen2Support/CwiseOperators.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigen2Support/Geometry/AlignedBox.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigen2Support/SVD.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigenvalues/ComplexSchur.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigenvalues/EigenSolver.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigenvalues/RealSchur.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Geometry/AlignedBox.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Geometry/AngleAxis.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Geometry/Hyperplane.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Geometry/ParametrizedLine.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/LU/FullPivLU.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/LU/PartialPivLU.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/LU/arch/Inverse_SSE.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/QR/ColPivHouseholderQR.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/QR/FullPivHouseholderQR.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/QR/HouseholderQR.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/SVD/JacobiSVD.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/AmbiVector.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/CompressedStorage.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/DynamicSparseMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/SparseFuzzy.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/SparseMatrix.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/SparseMatrixBase.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/SparseSelfAdjointView.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Sparse/SparseSparseProduct.h
    branches/soc-2011-tomato/extern/Eigen3/Eigen/src/StlSupport/StdVector.h
    branches/soc-2011-tomato/extern/libmv/CMakeLists.txt
    branches/soc-2011-tomato/extern/libmv/SConscript
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_tracking.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_buttons.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/Core
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/Core	2011-09-15 18:59:30 UTC (rev 40242)
+++ branches/soc-2011-tomato/extern/Eigen3/Eigen/Core	2011-09-15 19:01:32 UTC (rev 40243)
@@ -175,13 +175,6 @@
   #include <new>
 #endif
 
-// this needs to be done after all possible windows C header includes and before any Eigen source includes
-// (system C++ includes are supposed to be able to deal with this already):
-// windows.h defines min and max macros which would make Eigen fail to compile.
-#if defined(min) || defined(max)
-#error The preprocessor symbols 'min' or 'max' are defined. If you are compiling on Windows, do #define NOMINMAX to prevent windows.h from defining these symbols.
-#endif
-
 // defined in bits/termios.h
 #undef B0
 

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LDLT.h
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LDLT.h	2011-09-15 18:59:30 UTC (rev 40242)
+++ branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LDLT.h	2011-09-15 19:01:32 UTC (rev 40243)
@@ -159,9 +159,18 @@
 
     /** \returns a solution x of \f$ A x = b \f$ using the current decomposition of A.
       *
+      * This function also supports in-place solves using the syntax <tt>x = decompositionObject.solve(x)</tt> .
+      *
       * \note_about_checking_solutions
       *
-      * \sa solveInPlace(), MatrixBase::ldlt()
+      * More precisely, this method solves \f$ A x = b \f$ using the decomposition \f$ A = P^T L D L^* P \f$
+      * by solving the systems \f$ P^T y_1 = b \f$, \f$ L y_2 = y_1 \f$, \f$ D y_3 = y_2 \f$, 
+      * \f$ L^* y_4 = y_3 \f$ and \f$ P x = y_4 \f$ in succession. If the matrix \f$ A \f$ is singular, then
+      * \f$ D \f$ will also be singular (all the other matrices are invertible). In that case, the
+      * least-square solution of \f$ D y_3 = y_2 \f$ is computed. This does not mean that this function
+      * computes the least-square solution of \f$ A x = b \f$ is \f$ A \f$ is singular.
+      *
+      * \sa MatrixBase::ldlt()
       */
     template<typename Rhs>
     inline const internal::solve_retval<LDLT, Rhs>
@@ -376,7 +385,21 @@
     dec().matrixL().solveInPlace(dst);
 
     // dst = D^-1 (L^-1 P b)
-    dst = dec().vectorD().asDiagonal().inverse() * dst;
+    // more precisely, use pseudo-inverse of D (see bug 241)
+    using std::abs;
+    using std::max;
+    typedef typename LDLTType::MatrixType MatrixType;
+    typedef typename LDLTType::Scalar Scalar;
+    typedef typename LDLTType::RealScalar RealScalar;
+    const Diagonal<const MatrixType> vectorD = dec().vectorD();
+    RealScalar tolerance = (max)(vectorD.array().abs().maxCoeff() * NumTraits<Scalar>::epsilon(),
+				 RealScalar(1) / NumTraits<RealScalar>::highest()); // motivated by LAPACK's xGELSS
+    for (Index i = 0; i < vectorD.size(); ++i) {
+      if(abs(vectorD(i)) > tolerance)
+	dst.row(i) /= vectorD(i);
+      else
+	dst.row(i).setZero();
+    }
 
     // dst = L^-T (D^-1 L^-1 P b)
     dec().matrixU().solveInPlace(dst);

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LLT.h
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LLT.h	2011-09-15 18:59:30 UTC (rev 40242)
+++ branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Cholesky/LLT.h	2011-09-15 19:01:32 UTC (rev 40243)
@@ -233,7 +233,7 @@
 
     Index blockSize = size/8;
     blockSize = (blockSize/16)*16;
-    blockSize = std::min(std::max(blockSize,Index(8)), Index(128));
+    blockSize = (std::min)((std::max)(blockSize,Index(8)), Index(128));
 
     for (Index k=0; k<size; k+=blockSize)
     {
@@ -241,7 +241,7 @@
       //       A00 |  -  |  -
       // lu  = A10 | A11 |  -
       //       A20 | A21 | A22
-      Index bs = std::min(blockSize, size-k);
+      Index bs = (std::min)(blockSize, size-k);
       Index rs = size - k - bs;
       Block<MatrixType,Dynamic,Dynamic> A11(m,k,   k,   bs,bs);
       Block<MatrixType,Dynamic,Dynamic> A21(m,k+bs,k,   rs,bs);

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/BandMatrix.h
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/BandMatrix.h	2011-09-15 18:59:30 UTC (rev 40242)
+++ branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/BandMatrix.h	2011-09-15 19:01:32 UTC (rev 40243)
@@ -87,7 +87,7 @@
       if (i<=supers())
       {
         start = supers()-i;
-        len = std::min(rows(),std::max<Index>(0,coeffs().rows() - (supers()-i)));
+        len = (std::min)(rows(),std::max<Index>(0,coeffs().rows() - (supers()-i)));
       }
       else if (i>=rows()-subs())
         len = std::max<Index>(0,coeffs().rows() - (i + 1 - rows() + subs()));
@@ -96,11 +96,11 @@
 
     /** \returns a vector expression of the main diagonal */
     inline Block<CoefficientsType,1,SizeAtCompileTime> diagonal()
-    { return Block<CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,std::min(rows(),cols())); }
+    { return Block<CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }
 
     /** \returns a vector expression of the main diagonal (const version) */
     inline const Block<const CoefficientsType,1,SizeAtCompileTime> diagonal() const
-    { return Block<const CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,std::min(rows(),cols())); }
+    { return Block<const CoefficientsType,1,SizeAtCompileTime>(coeffs(),supers(),0,1,(std::min)(rows(),cols())); }
 
     template<int Index> struct DiagonalIntReturnType {
       enum {
@@ -122,13 +122,13 @@
     /** \returns a vector expression of the \a N -th sub or super diagonal */
     template<int N> inline typename DiagonalIntReturnType<N>::Type diagonal()
     {
-      return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, std::max(0,N), 1, diagonalLength(N));
+      return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));
     }
 
     /** \returns a vector expression of the \a N -th sub or super diagonal */
     template<int N> inline const typename DiagonalIntReturnType<N>::Type diagonal() const
     {
-      return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, std::max(0,N), 1, diagonalLength(N));
+      return typename DiagonalIntReturnType<N>::BuildType(coeffs(), supers()-N, (std::max)(0,N), 1, diagonalLength(N));
     }
 
     /** \returns a vector expression of the \a i -th sub or super diagonal */
@@ -166,7 +166,7 @@
   protected:
 
     inline Index diagonalLength(Index i) const
-    { return i<0 ? std::min(cols(),rows()+i) : std::min(rows(),cols()-i); }
+    { return i<0 ? (std::min)(cols(),rows()+i) : (std::min)(rows(),cols()-i); }
 };
 
 /**
@@ -284,6 +284,7 @@
       : m_coeffs(coeffs),
         m_rows(rows), m_supers(supers), m_subs(subs)
     {
+      EIGEN_UNUSED_VARIABLE(cols);
       //internal::assert(coeffs.cols()==cols() && (supers()+subs()+1)==coeffs.rows());
     }
 

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/CwiseNullaryOp.h
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/CwiseNullaryOp.h	2011-09-15 18:59:30 UTC (rev 40242)
+++ branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/CwiseNullaryOp.h	2011-09-15 19:01:32 UTC (rev 40243)
@@ -742,7 +742,7 @@
   static EIGEN_STRONG_INLINE Derived& run(Derived& m)
   {
     m.setZero();
-    const Index size = std::min(m.rows(), m.cols());
+    const Index size = (std::min)(m.rows(), m.cols());
     for(Index i = 0; i < size; ++i) m.coeffRef(i,i) = typename Derived::Scalar(1);
     return m;
   }

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Diagonal.h
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Diagonal.h	2011-09-15 18:59:30 UTC (rev 40242)
+++ branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Diagonal.h	2011-09-15 19:01:32 UTC (rev 40243)
@@ -87,7 +87,7 @@
     EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Diagonal)
 
     inline Index rows() const
-    { return m_index.value()<0 ? std::min(m_matrix.cols(),m_matrix.rows()+m_index.value()) : std::min(m_matrix.rows(),m_matrix.cols()-m_index.value()); }
+    { return m_index.value()<0 ? (std::min)(m_matrix.cols(),m_matrix.rows()+m_index.value()) : (std::min)(m_matrix.rows(),m_matrix.cols()-m_index.value()); }
 
     inline Index cols() const { return 1; }
 

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Dot.h
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Dot.h	2011-09-15 18:59:30 UTC (rev 40242)
+++ branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Dot.h	2011-09-15 19:01:32 UTC (rev 40243)
@@ -116,7 +116,9 @@
 
 //---------- implementation of L2 norm and related functions ----------
 
-/** \returns the squared \em l2 norm of *this, i.e., for vectors, the dot product of *this with itself.
+/** \returns, for vectors, the squared \em l2 norm of \c *this, and for matrices the Frobenius norm.
+  * In both cases, it consists in the sum of the square of all the matrix entries.
+  * For vectors, this is also equals to the dot product of \c *this with itself.
   *
   * \sa dot(), norm()
   */
@@ -126,7 +128,9 @@
   return internal::real((*this).cwiseAbs2().sum());
 }
 
-/** \returns the \em l2 norm of *this, i.e., for vectors, the square root of the dot product of *this with itself.
+/** \returns, for vectors, the \em l2 norm of \c *this, and for matrices the Frobenius norm.
+  * In both cases, it consists in the square root of the sum of the square of all the matrix entries.
+  * For vectors, this is also equals to the square root of the dot product of \c *this with itself.
   *
   * \sa dot(), squaredNorm()
   */

Modified: branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Functors.h
===================================================================
--- branches/soc-2011-tomato/extern/Eigen3/Eigen/src/Core/Functors.h	2011-09-15 18:59:30 UTC (rev 40242)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list