diff --git a/nerfstudio/data/dataparsers/colmap_dataparser.py b/nerfstudio/data/dataparsers/colmap_dataparser.py index a70936180..837794ce1 100644 --- a/nerfstudio/data/dataparsers/colmap_dataparser.py +++ b/nerfstudio/data/dataparsers/colmap_dataparser.py @@ -276,6 +276,12 @@ class ColmapDataParser(DataParser): cy.append(float(frame["cy"])) height.append(int(frame["h"])) width.append(int(frame["w"])) + if any([k in frame and float(frame[k]) != 0.0 for k in ["k4", "k5", "k6"]]): + raise ValueError( + "K4/K5/K6 is non-zero! Note that Nerfstudio camera model's K4 has different meaning than colmap " + "OPENCV camera model K4. Nerfstudio's K4 is the 4-th order of radial distortion coefficient, while " + "colmap/OPENCV's K4 is 4-th coefficient in fractional radial distortion model." + ) distort.append( camera_utils.get_distortion_params( k1=float(frame["k1"]) if "k1" in frame else 0.0,