mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-24 00:26:08 +08:00
Use max resolution when not moving or training (#1091)
use max resolution when not moving or training
This commit is contained in:
1 parent
2a62d8a14e
commit
f3442c8b7b
1 file changed
+6
-3
@@ -672,9 +672,12 @@ class ViewerState:
|
||||
|
||||
aspect_ratio = camera_object["aspect"]
|
||||
|
||||
image_height = (num_vis_rays / aspect_ratio) ** 0.5
|
||||
image_height = int(round(image_height, -1))
|
||||
image_height = min(self.max_resolution, image_height)
|
||||
if not self.camera_moving and not is_training:
|
||||
image_height = self.max_resolution
|
||||
else:
|
||||
image_height = (num_vis_rays / aspect_ratio) ** 0.5
|
||||
image_height = int(round(image_height, -1))
|
||||
image_height = min(self.max_resolution, image_height)
|
||||
image_width = int(image_height * aspect_ratio)
|
||||
if image_width > self.max_resolution:
|
||||
image_width = self.max_resolution
|
||||
|
||||
Reference in new issue
Block a user