Skip to content

Instantly share code, notes, and snippets.

@inspirit
inspirit / HomographyDecomposition.as
Created December 14, 2010 19:57
Decompose Homography into Rotation matrix & Translation vector
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
@astraw
astraw / calib_test_numpy.py
Created November 5, 2011 12:51
computing the OpenGL projection matrix from intrinsic camera parameters
#!/usr/bin/env python
# stdlib imports
import os
#other imports
import numpy as np
import scipy.misc
import matplotlib.pyplot as plt
@atduskgreg
atduskgreg / gist:2334929
Created April 8, 2012 05:19
A Typology of CV Markers
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@jzrake
jzrake / tetrun.cpp
Created April 28, 2012 22:21
Example code demonstrating use of tetgen
/* -----------------------------------------------------------------------------
*
* AUTHOR: Jonathan Zrake, NYU CCPP: [email protected]
*
*
* USAGE: $> ./tetrun [number of trials]
*
*
* DESCRIPTION:
@zchothia
zchothia / avx_dispatch_example.c
Created July 9, 2012 21:13
AVX CPU dispatching - based on Agner Fog's C++ vector class library [http://www.agner.org/optimize/vectorclass.zip]
// AVX CPU dispatching - based on Agner Fog's C++ vector class library:
// http://www.agner.org/optimize/vectorclass.zip
#include <stdio.h>
#include <stdbool.h>
//------------------------------------------------------------------------------
//>> BEGIN <instrset.h>
// Detect 64 bit mode
@flufy3d
flufy3d / gtl.py
Created October 23, 2012 09:20
How to convert global to local coordinates in blender
from mathutils import Matrix
from mathutils import Vector
from mathutils import Quaternion
import bpy
print('start')
rVector = Vector((0.0, 0.0, 0.0))
@rygorous
rygorous / gist:4172889
Created November 30, 2012 00:28
SSE/AVX matrix multiply
#include <immintrin.h>
#include <intrin.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
union Mat44 {
float m[4][4];
__m128 row[4];
};
@CmdQ
CmdQ / fast_gaussian_blur.cpp
Last active September 20, 2019 16:04
Fast Gaussian blur IIR filter. Building on- “Recursive implementation of the Gaussian filter” by Ian T. Young, Lucas J. van Vliet- “Boundary Conditions for Young - van Vliet Recursive Filtering” by Bill Triggs, Michael Sdika- “Boundary Treatment for Young–van Vliet Recursive Zero-Mean Gabor Filtering” by Vladimir Ulman
#include <algorithm>
#include <array>
#include <vector>
#include <stdexcept>
#include <iterator>
using namespace std;
namespace
{
@astanin
astanin / sigmoid-bench.c
Last active July 6, 2023 16:54
Benchmark various sigmoid functions
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <math.h>
#define M_PI_2 1.57079632679489661923 /* pi/2 */
#define M_PI_2_INV (1.0/M_PI_2)
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
#define ERF_COEF (1.0/M_2_SQRTPI)