mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 10:34:29 +08:00
add correct none check to distortion params (#878)
* add none check * black formatting
This commit is contained in:
parent
c53df92b9c
commit
6f158a3e68
@ -420,7 +420,7 @@ class Cameras:
|
||||
self.cy[indices],
|
||||
height=self._image_heights[indices],
|
||||
width=self._image_widths[indices],
|
||||
distortion_params=self.distortion_params[indices] if self.distortion_params else None,
|
||||
distortion_params=self.distortion_params[indices] if self.distortion_params is not None else None,
|
||||
camera_type=self.camera_type[indices],
|
||||
)
|
||||
if isinstance(indices, (int, slice)):
|
||||
@ -433,6 +433,8 @@ class Cameras:
|
||||
self.cy[indices + (slice(None),)],
|
||||
height=self._image_heights[indices + (slice(None),)],
|
||||
width=self._image_widths[indices + (slice(None),)],
|
||||
distortion_params=self.distortion_params[indices + (slice(None),)] if self.distortion_params else None,
|
||||
distortion_params=self.distortion_params[indices + (slice(None),)]
|
||||
if self.distortion_params is not None
|
||||
else None,
|
||||
camera_type=self.camera_type[indices + (slice(None),)],
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user