mapillary / OpenSfM

Open source Structure-from-Motion pipeline
https://www.opensfm.org/
BSD 2-Clause "Simplified" License
3.41k stars 861 forks source link

Should merged.ply and reconstruction.ply be aligned? #979

Closed tjdahlke closed 1 year ago

tjdahlke commented 1 year ago

Assuming that perfect distortion / camera intrinsic parameters are found or supplied for SFM, should the dense (merged.ply) and sparse (reconstruction.ply) point clouds align? They seem somewhat close, but they are not quite aligned. I cannot find anywhere in the code where scaling / centering of the point clouds is done, so it seems like theoretically I should be able to get alignment of the point clouds? I am trying to determine if I am doing something wrong, or if there is a fundamental reason that the dense point cloud made from undistorted images will no necessarily align with the sparse reconstruction point cloud made from SFM.

Attached are birds-eye views of a street-scene reconstruction. You can see the mis-alignment of the building facades.

sparse_pc sparse_and_dense_pc

Again from a street level view where a traffic cop is obviously not aligned: dense_pc dense_and_sparse_pc

tjdahlke commented 1 year ago

After much investigation, I believe that merged.plyand reconstruction.ply should in fact be aligned. My issues was due to camera intrinsic errors messing with dense reconstruction.