calculate s, R, t so that: gt = R * s * est + t
(p_es, p_gt, q_es, q_gt, n_aligned=-1)
| 105 | |
| 106 | # align by similarity transformation |
| 107 | def 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 |
no test coverage detected