mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-02 22:08:41 +08:00
work around mismatch to allow rgb depth side-by-side output (#1156)
* use max resolution when not moving or training * work around mismatch to allow rgb depth side-by-side output * Update render.py Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
This commit is contained in:
1 parent
0e1ea37308
commit
8d4a82ef0b
1 file changed
+7
-1
+7
-1
@@ -90,7 +90,11 @@ def _render_trajectory_video(
|
|||||||
|
|
||||||
with ExitStack() as stack:
|
with ExitStack() as stack:
|
||||||
writer = (
|
writer = (
|
||||||
stack.enter_context(media.VideoWriter(path=output_filename, shape=(render_height, render_width), fps=fps))
|
stack.enter_context(
|
||||||
|
media.VideoWriter(
|
||||||
|
path=output_filename, shape=(render_height, render_width * len(rendered_output_names)), fps=fps
|
||||||
|
)
|
||||||
|
)
|
||||||
if output_format == "video"
|
if output_format == "video"
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
@@ -109,6 +113,8 @@ def _render_trajectory_video(
|
|||||||
)
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
output_image = outputs[rendered_output_name].cpu().numpy()
|
output_image = outputs[rendered_output_name].cpu().numpy()
|
||||||
|
if output_image.shape[-1] == 1:
|
||||||
|
output_image = np.concatenate((output_image,) * 3, axis=-1)
|
||||||
render_image.append(output_image)
|
render_image.append(output_image)
|
||||||
render_image = np.concatenate(render_image, axis=1)
|
render_image = np.concatenate(render_image, axis=1)
|
||||||
if output_format == "images":
|
if output_format == "images":
|
||||||
|
|||||||
Reference in new issue
Block a user