Algomorph / LevelSetFusion-Python

Level Set Fusion (3D Reconstruction of Dynamic Scenes) Experimental Code
Apache License 2.0
15 stars 1 forks source link

TSDF transformation duplicated #33

Closed Algomorph closed 5 years ago

Algomorph commented 5 years ago

Summary: approximate duplication of TSDF transformation functionality prohibits alternative interpolation/filtering methods

Relevant code: https://github.com/Algomorph/LevelSetFusion-Python/blob/82c1bb948f12bae74cc35efe4bc70737ed579e2d/tsdf/generation.py#L196-L203

The new twist and apply_transformation parameters here, along with the entire new block seem out-of-place / unnecessary. The TSDF points are already transformed relative to the camera using the camera's extrinsic matrix, passed in as camera_extrinsic_matrix.

@fshanAtUMD , what your code should do instead is perform this conversion from twist to a 4x4 transformation in a separate method (put it in math_utils somewhere, since it is generic and may be useful in other places in the code), call this method on the twist in your code before calling the TSDF generation routine, and then pass in the result as the camera_extrinsic_matrix. No need for 2 different transformations here.

If you do this, then we can use any of the generation methods virtually unchanged with your code, including the alternative filtering methods, which is critical and cannot be properly done otherwise.

This will become unnecessary: https://github.com/Algomorph/LevelSetFusion-Python/blob/82c1bb948f12bae74cc35efe4bc70737ed579e2d/tsdf/generation.py#L255

Please revise your code in a separate bug/tsdf_trans_dupl branch, make sure the tests still pass, and make a new PR.

Algomorph commented 5 years ago

This takes priority over #21, #22, #23

fei-shan commented 5 years ago

OK, got it.

Algomorph commented 5 years ago

Fixed in #41