-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
colmap2nerf: Use separate intrinsics if available #1357
Conversation
…amera intrinsics per frame
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.
Thanks, this looks good to me! I've got just two minor change requests before hitting merge
scripts/colmap2nerf.py
Outdated
is_fisheye = False | ||
camera = {} | ||
camera_id = int(els[0]) | ||
camera['w'] = float(els[2]) |
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.
Could all the ''-strings be changed to ""-strings?
scripts/colmap2nerf.py
Outdated
@@ -333,6 +348,23 @@ def closest_point_2_lines(oa, da, ob, db): # returns point closest to both rays | |||
up += c2w[0:3,1] | |||
|
|||
frame = {"file_path":name,"sharpness":b,"transform_matrix": c2w} | |||
if len(cameras) != 1: | |||
camera = cameras[int(elems[8])] | |||
frame["camera_angle_x"] = camera["angle_x"] |
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.
This could be expressed more concisely using frame |= camera
if the angle_x
parameter is renamed to camera_angle_x
.
Sorry it took a while, but I applied the suggested changes.
|
Oh, I hadn't realized |
…ate() instead of |-
I think we can get the best of both worlds by using Also I accidentally changed |
LGTM, thanks again! |
colmap2nerf: Use separate intrinsics if available
Currently only the last images' intrinsics are being used.
Recently COLMAP added a checkbox to do automatic reconstruction with separate intrinsics per subfolder.
I'm using a rig with multiple cameras (same model), so I thought it would be nice to see if using intrinsics per camera would improve the reconstruction.
Actually there doesn't seem to be a qualitative improvement, but maybe my modification to the script is still useful when for example using non-homogeneous cameras/lenses.