vislearn / dsacstar

DSAC* for Visual Camera Re-Localization (RGB or RGB-D)
BSD 3-Clause "New" or "Revised" License
243 stars 36 forks source link

How did you get the pre-computed camera coordinate files? #27

Closed tdd233 closed 10 months ago

tdd233 commented 1 year ago

Hi, first of all this is an excellent work!
I want to know how to get the pre-computed camera coordinate files (eye/). Could you please offer your codes? Besides, if the size of depth and RGB images are different, can it work? Looking forward to your reply!

ebrach commented 10 months ago

Hi!

Regarding the eye files:

I cannot share additional code but computing these files should be relatively easy. They are just back-projected depth maps, ie 3D points in camera space. You can follow the code in dataset.py that computes scene coordinates from depth maps: https://github.com/vislearn/dsacstar/blob/25accc6ae7b3a446ca86ce2487fbfd3daa0a640a/dataset.py#L216-L246.

Just omit the transformation by the camera pose in line 249.

Regarding depth and RGB size mismatch:

The code in dataset.py is resizing the depth maps to the size of the RGB images. So in principle it should work. But you have to make sure that the depth maps (after resizing) are aligned with the RGB images.

Best, Eric