File: rot2cayley.m

package info (click to toggle)
opengv 1.0%2B1git91f4b1-8
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,484 kB
  • sloc: cpp: 45,813; python: 152; makefile: 17; xml: 13; sh: 4
file content (12 lines) | stat: -rw-r--r-- 176 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
function v = rot2cayley(R)

  C1 = R-eye(3);
  C2 = R+eye(3);
  C = C1 * inv(C2);

  v = zeros(3,1);
  v(1,1) = -C(2,3);
  v(2,1) =  C(1,3);
  v(3,1) = -C(1,2);

end