mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-05 15:28:49 +08:00
Add support for is_fisheye flag in ingp transforms.json (#1385)
This commit is contained in:
1 parent
b653eef91c
commit
27b71325ff
1 file changed
+5
-1
@@ -123,6 +123,10 @@ class InstantNGP(DataParser):
|
|||||||
|
|
||||||
w, h = meta["w"], meta["h"]
|
w, h = meta["w"], meta["h"]
|
||||||
|
|
||||||
|
camera_type = CameraType.PERSPECTIVE
|
||||||
|
if meta.get("is_fisheye", False):
|
||||||
|
camera_type = CameraType.FISHEYE
|
||||||
|
|
||||||
cameras = Cameras(
|
cameras = Cameras(
|
||||||
fx=float(fl_x),
|
fx=float(fl_x),
|
||||||
fy=float(fl_y),
|
fy=float(fl_y),
|
||||||
@@ -132,7 +136,7 @@ class InstantNGP(DataParser):
|
|||||||
height=int(h),
|
height=int(h),
|
||||||
width=int(w),
|
width=int(w),
|
||||||
camera_to_worlds=camera_to_world,
|
camera_to_worlds=camera_to_world,
|
||||||
camera_type=CameraType.PERSPECTIVE,
|
camera_type=camera_type,
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(ethan): add alpha background color
|
# TODO(ethan): add alpha background color
|
||||||
|
|||||||
Reference in new issue
Block a user