-
Notifications
You must be signed in to change notification settings - Fork 93
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
Added SimpleRadial camera model to colmap.cpp #73
Conversation
Added the SimpleRadial camera model to colmap.cpp from https://github.com/colmap/colmap/blob/0ea2d5ceee1360bba427b2ef61f1351e59a46f91/src/colmap/sensor/models.h#L235 Copied syntax found in SimplePinhole, copying fy=fx for the models with only one focal length parameter.
colmap.cpp
Outdated
cam->fy = cam->fx; | ||
cam->cx = readBinary<double>(camf); | ||
cam->cy = readBinary<double>(camf); | ||
cam->k = readBinary<double>(camf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
is not a valid parameter. See https://github.com/pierotofy/OpenSplat/blob/main/input_data.hpp#L12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, I was incorrectly copying verbatim from the colmap parameter list. Would 'k1' be a reasonable substitute in this situation for what I designated as 'k'? I don't fully understand what the other parameters represent past the 'fx' and 'fy' focal length parameters.
Or would it be more of how 'f' = 'fy' and 'fx'? Would 'k' = 'k1', 'k2', and 'k3'?
Thanks for the PR @Jonathan-Gore ! See the "Build" section from the README to compile and test the changes. |
On it |
Changed k -> k1 so it would be a valid parameter.
Updated k -> k1 and successfully built the application! Ran the newly built .exe on the banana dataset with both PINHOLE and SIMPLE_RADIAL camera models and both were successful! |
Fantastic, thanks for testing and the useful addition! 🙏 |
Added the SimpleRadial camera model to colmap.cpp from https://github.com/colmap/colmap/blob/0ea2d5ceee1360bba427b2ef61f1351e59a46f91/src/colmap/sensor/models.h#L235
Copied syntax found in SimplePinhole, copying fy=fx for the models with only one focal length parameter, like SimpleRadial.
I'm new to c++ so I'm not 100% sure how to test the code.