* fix nonzero colmap K4
This commit is contained in:
J.Y. authored and GitHub committed 2024-08-25 14:48:17 -07:00
1 parent b707727950
commit 02d45c1fd7
1 file changed
+6
@@ -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,