Open tianyilim opened 3 months ago
Hi @tianyilim, I'm working on the same function.
Can you share the get_mast3r_output full code and how to calculate scale_K value?
Thank you!
In visloc.py, it's not done like this, though it could, especially if you use mast3r to estimate the intrinsics. Instead, it's rescaling the matches back to the original size and running pnp with the full img intrinsics.
with cv2, we use cv2.SOLVEPNP_SQPNP, and you may want to remove low confidence matches.
@piuabramo Here you go:
I lightly touched the code in the README for get_mast3r_output
. Of course, this script has to be placed in the Mast3r repository root.
And for scale_K
, I already know the intrinsics of my image. So it's just a matter of ensuring the sensor_size matches the Mast3r outputs.
Hope this helps! :smile:
@yocabon Thanks for the input!
Out of curiosity, is scaling the matches back to original size more accurate than doing PnP at mast3r scale? I would think there's a trade-off in the noise of the keypoint locations, if the mast3r resolution is lower than original input resolution.
I will indeed try the SQPNP method and add some low-confidence match filtering as you suggested.
Hi, I would like to sanity-check using mast3r for absolute pose estimation.
Here is some code adapted from the example usage in the Readme
Is this the recommended way to extract absolute camera poses between the two images in Mast3r?