fabiotosi92 / SMD-Nets

SMD-Nets: Stereo Mixture Density Networks
MIT License
156 stars 27 forks source link

Understanding dataset Extrinsics folder #8

Closed saryazdi closed 3 years ago

saryazdi commented 3 years ago

Hi, thanks for open sourcing your code!

Looking at the dataset extrinsics files (e.g., 00000/Extrinsics0/00000.txt) the file contains two lines:

1920.000000 0.000000 1920.000000 0.000000 1920.000000 1080.000000 0.000000 0.000000 1.000000
0.469532 0.882916 0.000000 -2.295430 -0.168801 0.089768 -0.981554 -0.117832 0.866629 -0.460871 -0.191186 5.537117

I'm interpreting the first line as the flattened 3x3 intrinsics matrix, and the second line as the flattened 3x4 pose matrix. Is this interpretation correct?

If so, it seems like for a single scene (e.g., scene 00000) the position of the right camera relative to the left camera changes for different frames. E.g., if T_left_0, T_right_0, T_left_100, T_right_100 are the poses read from 00000/Extrinsics0/00000.txt, 00000/Extrinsics1/00000.txt, 00000/Extrinsics0/00100.txt, 00000/Extrinsics1/00100.txt respectively and converted to 4x4 homogenous transformations, then np.linalg.inv(T_left_0) @ T_right_0 != np.linalg.inv(T_left_100) @ T_right_100. I expected the stereo cameras to stay at the same position relative to each other. Can you please tell me if I'm doing something incorrect here?

saryazdi commented 3 years ago

Gentle bump! Still facing this issue - greatly appreciate any ideas! @Spektreto @fabiotosi92

fabiotosi92 commented 3 years ago

Hi! The stereo cameras always stay at the same position relative to each other for a given scene. Camera extrinsics are in world2cam convention, thus you need to multiply T_right_0 @ np.linalg.inv(T_left_0).