colmap / glomap

GLOMAP - Global Structured-from-Motion Revisited
BSD 3-Clause "New" or "Revised" License
1.3k stars 76 forks source link

Relative pose from homography #68

Closed jiahaoli95 closed 4 weeks ago

jiahaoli95 commented 1 month ago

Hi,

Thanks for the great work. I have a question about estimating the relative pose from two images with points related by a homography. In my experience when I decompose a homography matrix I very frequently get two different solutions even after the cheirality check (they both yield the same number of positive depth points, or very close). How do you deal with this ambiguity in glomap? I didn't find any discussion about this in the paper and couldn't decipher it from the code. Any explanation or pointers to code would be highly appreciated.

Thank you.

Jiahao

lpanaf commented 4 weeks ago

Hi, thanks for the question. In GLOMAP, we do not explicitly deal with ambiguity. Instead, for homography, we first check whether it is due to pure rotation or due to planar scene. If it pure rotation, we just take whatever the decomposition gives us. Otherwise, we use essential matrix for getting the relative pose