MCPcopy Create free account
hub / github.com/LeapLabTHU/ActiveNeRF / render_path_spiral

Function render_path_spiral

load_llff.py:153–162  ·  view source on GitHub ↗
(c2w, up, rads, focal, zdelta, zrate, rots, N)

Source from the content-addressed store, hash-verified

151
152
153def render_path_spiral(c2w, up, rads, focal, zdelta, zrate, rots, N):
154 render_poses = []
155 rads = np.array(list(rads) + [1.])
156 hwf = c2w[:,4:5]
157
158 for theta in np.linspace(0., 2. * np.pi * rots, N+1)[:-1]:
159 c = np.dot(c2w[:3,:4], np.array([np.cos(theta), -np.sin(theta), -np.sin(theta*zrate), 1.]) * rads)
160 z = normalize(c - np.dot(c2w[:3,:4], np.array([0,0,-focal, 1.])))
161 render_poses.append(np.concatenate([viewmatrix(z, up, c), hwf], 1))
162 return render_poses
163
164
165

Callers 1

load_llff_dataFunction · 0.85

Calls 2

normalizeFunction · 0.85
viewmatrixFunction · 0.85

Tested by

no test coverage detected