MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / interp

Function interp

utils/pose_utils.py:519–527  ·  view source on GitHub ↗

Runs multidimensional B-spline interpolation on the input points.

(points, u, k, s)

Source from the content-addressed store, hash-verified

517 return poses, u, n_frames, u_keyframes
518
519 def interp(points, u, k, s):
520 """Runs multidimensional B-spline interpolation on the input points."""
521 sh = points.shape
522 pts = np.reshape(points, (sh[0], -1))
523 k = min(k, sh[0] - 1)
524 tck, u_keyframes = scipy.interpolate.splprep(pts.T, k=k, s=s, per=periodic)
525 new_points = np.array(scipy.interpolate.splev(u, tck))
526 new_points = np.reshape(new_points.T, (len(u), sh[1], sh[2]))
527 return new_points, u_keyframes
528
529
530 if n_buffer is not None:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected