MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / perturb_rotation

Function perturb_rotation

script/feature/misc.py:437–446  ·  view source on GitHub ↗
(c2w, theta, phi, psi=0)

Source from the content-addressed store, hash-verified

435 return loss
436
437def 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
448def perturb_single_render_pose(poses, x, angle):
449 """

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected