(pose0, pose1, sampling_frustum, K, x_res, y_res)
| 81 | return X0 |
| 82 | |
| 83 | def compute_frustums_overlap(pose0, pose1, sampling_frustum, K, x_res, y_res): |
| 84 | R0 = pose0[0:3, 0:3] |
| 85 | t0 = pose0[0:3, 3] |
| 86 | R1 = pose1[0:3, 0:3] |
| 87 | t1 = pose1[0:3, 3] |
| 88 | |
| 89 | R10 = np.dot(R1.T, R0) |
| 90 | t10 = np.dot(R1.T, t0 - t1) |
| 91 | |
| 92 | _P = np.dot(R10, sampling_frustum.T).T + t10 |
| 93 | p = np.dot(K, _P.T).T |
| 94 | pn = p[:, 2] |
| 95 | p = np.divide(p, pn[:, None]) |
| 96 | res = np.apply_along_axis(is_inside_frustum, 1, p, x_res, y_res) |
| 97 | return np.sum(res) / float(res.shape[0]) |
| 98 | |
| 99 | def perturb_rotation(c2w, theta, phi, psi=0): |
| 100 | last_row = np.tile(np.array([0, 0, 0, 1]), (1, 1)) # (N_images, 1, 4) |
nothing calls this directly
no outgoing calls
no test coverage detected