Skip to content

Commit 27b7132

Browse files
authored
Add support for is_fisheye flag in ingp transforms.json (#1385)
1 parent b653eef commit 27b7132

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nerfstudio/data/dataparsers/instant_ngp_dataparser.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ def _generate_dataparser_outputs(self, split="train"):
123123

124124
w, h = meta["w"], meta["h"]
125125

126+
camera_type = CameraType.PERSPECTIVE
127+
if meta.get("is_fisheye", False):
128+
camera_type = CameraType.FISHEYE
129+
126130
cameras = Cameras(
127131
fx=float(fl_x),
128132
fy=float(fl_y),
@@ -132,7 +136,7 @@ def _generate_dataparser_outputs(self, split="train"):
132136
height=int(h),
133137
width=int(w),
134138
camera_to_worlds=camera_to_world,
135-
camera_type=CameraType.PERSPECTIVE,
139+
camera_type=camera_type,
136140
)
137141

138142
# TODO(ethan): add alpha background color

0 commit comments

Comments
 (0)