mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-19 14:23:57 +08:00
Full implementation of features for dynamic scenes into the Viser viewer. (#2936)
* Add time buttons & export render_time * Added preview of dynamic scenes, time interpolation for rendering, etc. (Fixes #2934) * Fixes to comply with Ruff * Fixed UnboundLocalError in static mode * Formatting * Fixed pyrights compliance * Nit remove unused sleep * Fixed JSON export/import for dynamic camera paths * Fixed fov override check for loading json camera paths --------- Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
1 parent
36c48c7177
commit
a8b3f71eeb
4 files changed
+147
-42
No files matched your search
@@ -39,10 +39,12 @@ class CameraState:
|
||||
"""The camera matrix."""
|
||||
camera_type: Literal[CameraType.PERSPECTIVE, CameraType.EQUIRECTANGULAR, CameraType.FISHEYE]
|
||||
"""Type of camera to render."""
|
||||
time: float = 0.0
|
||||
"""The rendering time of the camera state."""
|
||||
|
||||
|
||||
def get_camera(
|
||||
camera_state: CameraState, image_height: int, image_width: Optional[Union[int, float]] = None, time: float = 0.0
|
||||
camera_state: CameraState, image_height: int, image_width: Optional[Union[int, float]] = None
|
||||
) -> Cameras:
|
||||
"""Returns the camera intrinsics matrix and the camera to world homogeneous matrix.
|
||||
|
||||
@@ -74,7 +76,7 @@ def get_camera(
|
||||
cy=pp_h,
|
||||
camera_type=camera_state.camera_type,
|
||||
camera_to_worlds=camera_state.c2w.to(torch.float32)[None, ...],
|
||||
times=torch.tensor([time], dtype=torch.float32),
|
||||
times=torch.tensor([camera_state.time], dtype=torch.float32),
|
||||
)
|
||||
return camera
|
||||
|
||||
|
||||
Reference in new issue
Block a user