(c2w, theta, phi, psi=0)
| 435 | return loss |
| 436 | |
| 437 | def perturb_rotation(c2w, theta, phi, psi=0): |
| 438 | last_row = np.array([[0, 0, 0, 1]])# np.tile(np.array([0, 0, 0, 1]), (1, 1)) # (N_images, 1, 4) |
| 439 | c2w = np.concatenate([c2w, last_row], 0) # (N_images, 4, 4) homogeneous coordinate |
| 440 | # print("c2w", c2w) |
| 441 | c2w = rot_phi(phi/180.*np.pi) @ c2w |
| 442 | c2w = rot_theta(theta/180.*np.pi) @ c2w |
| 443 | c2w = rot_psi(psi/180.*np.pi) @ c2w |
| 444 | c2w = c2w[:3,:4] |
| 445 | # print("updated c2w", c2w) |
| 446 | return c2w |
| 447 | |
| 448 | def perturb_single_render_pose(poses, x, angle): |
| 449 | """ |
no outgoing calls
no test coverage detected