naver / dust3r

DUSt3R: Geometric 3D Vision Made Easy
https://dust3r.europe.naverlabs.com/
Other
5.08k stars 553 forks source link

Calculate the relative camera pose of 2 images #100

Open KhanhNgoDuy opened 4 months ago

KhanhNgoDuy commented 4 months ago

Hi, how can I calculate the relative pose of 2 images.

Specifically, I want to know the (difference in) azimuth, elevation and radius of the 2 viewpoints (which correspond to the 2 camera).

vincent-leroy commented 4 months ago

Hi @KhanhNgoDuy Please check-out this line for pairwise relative pose: https://github.com/naver/dust3r/blob/01b2f1d1e6c6c386f95a007406defb5b8a5d2042/dust3r/cloud_opt/pair_viewer.py#L55 the res variable contains rotation R and translation T as extracted and processed in the lines right after.