예제 #1
0
    def exp(cls, m):
        m = np.asarray(m)
        assert np.shape(m) == (3, ), 'shape was ' + str(np.shape(m))

        t = np.linalg.norm(m)
        if t < 1e-8:
            return np.eye(3)  # exp(0) = I

        skewm = skew(m)
        A = np.sin(t) / t
        B = (1. - np.cos(t)) / (t * t)
        I = np.eye(3)
        return I + A * skewm + B * np.dot(skewm, skewm)
예제 #2
0
파일: lie.py 프로젝트: alexflint/pysfm
    def exp(cls, m):
        m = np.asarray(m)
        assert np.shape(m) == (3,), 'shape was '+str(np.shape(m))

        t = np.linalg.norm(m)
        if t < 1e-8:
            return np.eye(3)   # exp(0) = I

        skewm = skew(m)
        A = np.sin(t)/t
        B = (1. - np.cos(t)) / (t*t)
        I = np.eye(3)
        return I + A * skewm + B * np.dot(skewm, skewm)
예제 #3
0
 def generator_field(cls, x):
     return skew(x)
예제 #4
0
 def J_expm_x(cls, x):
     return skew(-x)
예제 #5
0
파일: lie.py 프로젝트: alexflint/pysfm
 def generator_field(cls, x):
     return skew(x)
예제 #6
0
파일: lie.py 프로젝트: alexflint/pysfm
 def J_expm_x(cls, x):
     return skew(-x)