{{ message }}

Instantly share code, notes, and snippets.

wutangyibo

Last active Oct 20, 2020
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
View Eigen Cheat sheet
 // A simple quickref for Eigen. Add anything that's missing. // Main author: Keir Mierle #include Matrix A; // Fixed rows and cols. Same as Matrix3d. Matrix B; // Fixed rows, dynamic cols. Matrix C; // Full dynamic. Same as MatrixXd. Matrix E; // Row major; default is column-major. Matrix3f P, Q, R; // 3x3 float matrix.
Created Aug 9, 2016
Tilt-torsion decomposition for rotation matrices
View tilt_torsion.py
 import numpy as np from tf.transformations import * def tilt_torsion_decomposition(R): z_axis = [0, 0, 1] target_z = np.dot(R.T, z_axis) axis = np.cross(z_axis, target_z) angle = np.arctan2(np.linalg.norm(axis), np.dot(z_axis, target_z)) R_tilt = quaternion_matrix(quaternion_about_axis(angle, axis))[:3, :3] R_torsion = np.dot(R, R_tilt.T)
Last active Apr 6, 2020
A simple implementation of the Levenberg-Marquardt algorithm in plain C
View levmarq - Levenberg-Marquardt in plain C
 This file (with a leading space) exists so that the gist has a sensible name, rather than "LICENSE."
Created Dec 14, 2010
Decompose Homography into Rotation matrix & Translation vector
View HomographyDecomposition.as
 var intrinsic:Vector. = new Vector.(9, true); var intrinsicInverse:Vector. = new Vector.(9, true); var R:Vector. = new Vector.( 9, true ); var t:Vector. = new Vector.( 3, true ); // SVD routine var svd:SVD = new SVD(); // input homography[9] - 3x3 Matrix
You can’t perform that action at this time.