MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / alignSIM3

Function alignSIM3

utils/utils_poses/ATE/align_utils.py:107–116  ·  view source on GitHub ↗

calculate s, R, t so that: gt = R * s * est + t

(p_es, p_gt, q_es, q_gt, n_aligned=-1)

Source from the content-addressed store, hash-verified

105
106# align by similarity transformation
107def alignSIM3(p_es, p_gt, q_es, q_gt, n_aligned=-1):
108 '''
109 calculate s, R, t so that:
110 gt = R * s * est + t
111 '''
112 idxs = _getIndices(n_aligned, p_es.shape[0])
113 est_pos = p_es[idxs, 0:3]
114 gt_pos = p_gt[idxs, 0:3]
115 s, R, t = align.align_umeyama(gt_pos, est_pos) # note the order
116 return s, R, t
117
118
119# a general interface

Callers 1

alignTrajectoryFunction · 0.85

Calls 1

_getIndicesFunction · 0.85

Tested by

no test coverage detected