Docker
Chrome 79 on Linux
When partial reconstructions are generated, there seems to be an issue in the reconstruction alignment output.
According to the OpenSfM sources, each partial reconstruction from each submodel is thrown into a large bundle adjustment problem, then output as a set of similarity transforms which are applied to each partial reconstruction and then saved to the aligned reconstruction file.
In reality however, it seems like only one partial reconstruction is updated. I can't seem to figure out why.
I would expect each and every point and shot in every partial reconstruction to be modified at least at the 1e-6 magnitude, but this only seems to be true for a single partial reconstruction in each submodel. All other partial reconstructions are identical in a side-by-side comparison for each shot and point.
(As a sidenote, I'd be interested in understanding why the similarity transform is generated to create a rigid transform, rather than just applying the bundle output to the reconstruction as a whole. I would expect this to create smoother boundaries between submodels? Outlier handling?)
Trigger the align_submodels stage in OpenSfM on a dataset split into multiple submodels which also contains multiple partial reconstructions. This should be easily achievable by lowering the minimum feature count and setting a split on a dataset with a sufficient number of entries.
I think this might be a bug rather than an enhancement.
From the sources, all partial reconstructions should always be aligned, but I can't necessarily say it's even the index 0 partial we use in split/merge right now that's actually updated in the alignment - which implies that we might in these cases see a merge resulting in unaligned clouds.
Found it. Apparently the itertools.groupby method used in apply_transformations(transformations) in OpenSfM has to be passed an already sorted list, or it won't group entries correctly. Since the reconstruction is loaded for each group, the unaligned reconstructions will be reloaded and overwrite any previously aligned components.
Submitting a PR to 099 and mapillary OpenSfM in a bit. :tada:
Fantastic! Thanks for looking into this @linusmartensson
No prob! It's a fun codebase. :gift:
Now merged in both OpenDroneMap/OpenSfM and mapillary/OpenSfM, so closing. :)
Most helpful comment
No prob! It's a fun codebase. :gift:
Now merged in both OpenDroneMap/OpenSfM and mapillary/OpenSfM, so closing. :)