Skip to content
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

can I fix the camera pose? Or given some restrictive priors #30

Closed
kuaiqushangzixiba opened this issue Mar 8, 2024 · 3 comments
Closed

Comments

@kuaiqushangzixiba
Copy link

A very good job! I have a fixed use of the scene, 4 cameras fixed to shoot an object, but I find that each time the output camera is not in the same position, can you give some prior conditions or modify the code to fix the camera pose?

@vincent-leroy
Copy link
Contributor

vincent-leroy commented Mar 8, 2024

Hello @kuaiqushangzixiba
If you know the camera poses in advance, you can set them with the following:

def preset_pose(self, known_poses, pose_msk=None): # cam-to-world

The same can be done with focals and principal points
def preset_focal(self, known_focals, msk=None):

def preset_principal_point(self, known_pp, msk=None):

Note that if you only care about having all reconstructions living in the same reference frame, you can get the output camera poses and parameters after processing the first sequence and set them manually for the rest of the reconstructions. Note that setting inaccurate camera poses might hinder the quality of the output in some cases.

Best

@kuaiqushangzixiba
Copy link
Author

kuaiqushangzixiba commented Mar 11, 2024

dust3r/demo.py

Line 91 in 517a430

def get_3D_model_from_scene(outdir, scene, min_conf_thr=3, as_pointcloud=False, mask_sky=False,

return _convert_scene_output_to_glb(outdir, rgbimg, pts3d, msk, focals, cams2world, as_pointcloud=as_pointcloud,
transparent_cams=transparent_cams, cam_size=cam_size)

Thanks a lot!
When should I set it up? When you initialize global_aligner, or after get_3D_model_from_scene...

@kuaiqushangzixiba
Copy link
Author

And when I set preset_pose(), I got the following error, I found that the declaration of this method was not defined in the code

AttributeError: 'PointCloudOptimizer' object has no attribute '_get_msk_indices'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants