Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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