This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var intrinsic:Vector.<Number> = new Vector.<Number>(9, true); | |
var intrinsicInverse:Vector.<Number> = new Vector.<Number>(9, true); | |
var R:Vector.<Number> = new Vector.<Number>( 9, true ); | |
var t:Vector.<Number> = new Vector.<Number>( 3, true ); | |
// SVD routine | |
var svd:SVD = new SVD(); | |
// input homography[9] - 3x3 Matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file (with a leading space) exists so that the gist has a sensible name, rather than "LICENSE." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |