diff Framework/Toolbox/LinearAlgebra.h @ 159:0a73d76333db wasm

populating LinearAlgebra
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Feb 2018 09:15:08 +0100
parents a053ca7fa5c6
children 197a5ddaf68c
line wrap: on
line diff
--- a/Framework/Toolbox/LinearAlgebra.h	Wed Feb 14 08:58:31 2018 +0100
+++ b/Framework/Toolbox/LinearAlgebra.h	Wed Feb 14 09:15:08 2018 +0100
@@ -92,5 +92,31 @@
 
     void Convert(Matrix& target,
                  const Vector& source);
+
+    double ComputeDeterminant(const Matrix& a);
+
+    bool IsOrthogonalMatrix(const Matrix& q,
+                            double threshold);
+
+    bool IsOrthogonalMatrix(const Matrix& q);
+
+    bool IsRotationMatrix(const Matrix& r,
+                          double threshold);
+
+    bool IsRotationMatrix(const Matrix& r);
+
+    void InvertUpperTriangularMatrix(Matrix& output,
+                                     const Matrix& k); 
+
+    /**
+     * This function computes the RQ decomposition of a 3x3 matrix,
+     * using Givens rotations. Reference: Algorithm A4.1 (page 579) of
+     * "Multiple View Geometry in Computer Vision" (2nd edition).  The
+     * output matrix "Q" is a rotation matrix, and "R" is upper
+     * triangular.
+     **/
+    void RQDecomposition3x3(Matrix& r,
+                            Matrix& q,
+                            const Matrix& a);
   };
 }