Skip to content

Commit

Permalink
Add support for is_fisheye flag in ingp transforms.json (#1385)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkulhanek authored Feb 10, 2023
1 parent b653eef commit 27b7132
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nerfstudio/data/dataparsers/instant_ngp_dataparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def _generate_dataparser_outputs(self, split="train"):

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),
Expand All @@ -132,7 +136,7 @@ def _generate_dataparser_outputs(self, split="train"):
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
Expand Down

0 comments on commit 27b7132

Please sign in to comment.