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

Function perturb_rotation

dataset_loaders/load_7Scenes.py:117–124  ·  view source on GitHub ↗
(c2w, theta, phi, psi=0)

Source from the content-addressed store, hash-verified

115 return np.sum(res) / float(res.shape[0])
116
117def perturb_rotation(c2w, theta, phi, psi=0):
118 last_row = np.tile(np.array([0, 0, 0, 1]), (1, 1)) # (N_images, 1, 4)
119 c2w = np.concatenate([c2w, last_row], 0) # (N_images, 4, 4) homogeneous coordinate
120 c2w = rot_phi(phi/180.*np.pi) @ c2w
121 c2w = rot_theta(theta/180.*np.pi) @ c2w
122 c2w = rot_psi(psi/180.*np.pi) @ c2w
123 c2w = c2w[:3,:4]
124 return c2w
125
126def viewmatrix(z, up, pos):
127 vec2 = normalize(z)

Callers 1

perturb_render_poseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected