mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-30 21:09:58 +08:00
Add camera_type dropdown in new viewer (#2525)
* Add camera_type dropdown in new viewer Added a gui dropdown menu for selecting the camera type. Currently, the render view doesn't update to preview the equirectangular or fisheye render. * Updating the image url of nerfstudio logo images for the viewer Changing the image urls to restore the nerfstudio logo in the viewer --------- Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
1 parent
e9a3bae859
commit
8e58021a47
2 files changed
+10
-3
No files matched your search
@@ -297,6 +297,13 @@ def populate_render_tab(
|
||||
"""Update the aspect ratio for all cameras when the resolution changes."""
|
||||
camera_path.update_aspect(resolution.value[0] / resolution.value[1])
|
||||
|
||||
camera_type = server.add_gui_dropdown(
|
||||
"Camera Type",
|
||||
("Perspective", "Fisheye", "Equirectangular"),
|
||||
initial_value="Perspective",
|
||||
hint="Camera model to render with.",
|
||||
)
|
||||
|
||||
add_button = server.add_gui_button(
|
||||
"Add keyframe",
|
||||
icon=viser.Icon.PLUS,
|
||||
@@ -584,7 +591,7 @@ def populate_render_tab(
|
||||
}
|
||||
)
|
||||
json_data["keyframes"] = keyframes
|
||||
json_data["camera_type"] = "perspective"
|
||||
json_data["camera_type"] = camera_type.value.lower()
|
||||
json_data["render_height"] = resolution.value[1]
|
||||
json_data["render_width"] = resolution.value[0]
|
||||
json_data["fps"] = framerate_slider.value
|
||||
|
||||
@@ -124,8 +124,8 @@ class Viewer:
|
||||
),
|
||||
)
|
||||
image = viser.theme.TitlebarImage(
|
||||
image_url_light="https://docs.nerf.studio/en/latest/_static/imgs/logo.png",
|
||||
image_url_dark="https://docs.nerf.studio/en/latest/_static/imgs/logo-dark.png",
|
||||
image_url_light="https://docs.nerf.studio/_static/imgs/logo.png",
|
||||
image_url_dark="https://docs.nerf.studio/_static/imgs/logo-dark.png",
|
||||
image_alt="NerfStudio Logo",
|
||||
href="https://docs.nerf.studio/",
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user