Method
__init__
(self, R: np.ndarray = None, t: np.ndarray = None, H: np.ndarray = None)
Source from the content-addressed store, hash-verified
| 13 | |
| 14 | class RigidMotion: |
| 15 | def __init__(self, R: np.ndarray = None, t: np.ndarray = None, H: np.ndarray = None): |
| 16 | if H is not None: |
| 17 | R = H[:3, :3] |
| 18 | t = H[:3, 3] |
| 19 | if R is None: |
| 20 | R = np.eye(3) |
| 21 | if t is None: |
| 22 | t = np.zeros(3) |
| 23 | |
| 24 | self.R = copy.deepcopy(R) # 3*3 rotation matrix |
| 25 | self.t = copy.deepcopy(np.reshape(t, (3, 1))) # 3*1 position |
| 26 | |
| 27 | def homogeneous_matrix(self): |
| 28 | """returns the 4*4 homogeneous matrix.""" |
Callers
nothing calls this directly
Tested by
no test coverage detected