Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created September 11, 2012 14:52
Show Gist options
  • Save eduardolundgren/3699346 to your computer and use it in GitHub Desktop.
Save eduardolundgren/3699346 to your computer and use it in GitHub Desktop.
RANSAC Matrix
A = [
// pair1
[ x11, y11, 1, 0, 0, 0, -x11*x12, -y11*x12 ],
[ 0, 0, 0, x11, y11, 1, -x11*y12, -y11*y12 ],
// pair2
[ x21, y21, 1, 0, 0, 0, -x21*x22, -y21*x22 ],
[ 0, 0, 0, x21, y21, 1, -x21*y22, -y21*y22 ],
// pair3
[ x31, y31, 1, 0, 0, 0, -x31*x32, -y31*x32 ],
[ 0, 0, 0, x31, y31, 1, -x31*y32, -y31*y32 ],
// pair4
[ x41, y41, 1, 0, 0, 0, -x41*x42, -y41*x42 ],
[ 0, 0, 0, x41, y41, 1, -x41*y42, -y41*y42 ]
]
I = A.getInverse();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment