mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 06:49:13 +08:00
Split up render commands (#1923)
* Split up render commands * bump viewer
This commit is contained in:
1 parent
445e17a3c6
commit
531f9d0c4c
5 files changed
+143
-81
No files matched your search
@@ -28,7 +28,7 @@ from nerfstudio.viewer.server.utils import three_js_perspective_camera_focal_len
|
||||
|
||||
|
||||
def get_interpolated_camera_path(cameras: Cameras, steps: int, order_poses: bool) -> Cameras:
|
||||
"""Generate a camera path between two cameras.
|
||||
"""Generate a camera path between two cameras. Uses the camera type of the first camera
|
||||
|
||||
Args:
|
||||
cameras: Cameras object containing intrinsics of all cameras.
|
||||
@@ -41,7 +41,14 @@ def get_interpolated_camera_path(cameras: Cameras, steps: int, order_poses: bool
|
||||
poses = cameras.camera_to_worlds.cpu().numpy()
|
||||
poses, Ks = get_interpolated_poses_many(poses, Ks, steps_per_transition=steps, order_poses=order_poses)
|
||||
|
||||
cameras = Cameras(fx=Ks[:, 0, 0], fy=Ks[:, 1, 1], cx=Ks[0, 0, 2], cy=Ks[0, 1, 2], camera_to_worlds=poses)
|
||||
cameras = Cameras(
|
||||
fx=Ks[:, 0, 0],
|
||||
fy=Ks[:, 1, 1],
|
||||
cx=Ks[0, 0, 2],
|
||||
cy=Ks[0, 1, 2],
|
||||
camera_type=cameras.camera_type[0],
|
||||
camera_to_worlds=poses,
|
||||
)
|
||||
return cameras
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user