Add support for is_fisheye flag in ingp transforms.json (#1385)

This commit is contained in:
Jonáš Kulhánek authored and GitHub committed 2023-02-09 17:23:33 -08:00
1 parent b653eef91c
commit 27b71325ff
1 file changed
+5 -1
@@ -123,6 +123,10 @@ class InstantNGP(DataParser):
w, h = meta["w"], meta["h"]
camera_type = CameraType.PERSPECTIVE
if meta.get("is_fisheye", False):
camera_type = CameraType.FISHEYE
cameras = Cameras(
fx=float(fl_x),
fy=float(fl_y),
@@ -132,7 +136,7 @@ class InstantNGP(DataParser):
height=int(h),
width=int(w),
camera_to_worlds=camera_to_world,
camera_type=CameraType.PERSPECTIVE,
camera_type=camera_type,
)
# TODO(ethan): add alpha background color