Open QuickLearner171998 opened 2 years ago
Hi @QuickLearner171998 ,
1 - Periodically during reconstruction, we align the partial reconstruction that is being grown, to the world coordinate frame using align
(see https://github.com/mapillary/OpenSfM/blob/main/opensfm/reconstruction.py#L1316). If you have GPS metadata, it will realign the partial reconstruction on them.
2 - The reference frame is a topocentric coordinate frame computed as the mean of all GPS metadata's lat/lon/alt, and oriented as East, North, Up (ENU). All OpenSfM world coordinates are wrt. this coordinate frame.
3 - If you have some poses in the world and have the corresponding lat/lon/alt, then you can overwrite them as EXIF gps
using exif_overrides.json
In case, you're working in some arbitrary coordinate frame, then :
1 - align
will do nothing and the reconstruction is in arbitrary coordinate system, with the first two reconstructed camera having a relative translation of scale 1 more-or-less.
2 - If you have some poses in some arbitrary coordinate frame, you can write them directly as a reconstruction
object, dump it as JSON, and then use the extend reconstruction command(https://github.com/mapillary/OpenSfM/blob/7b455d9c424c82d96fc60d57a9c1dbf024aa8b3b/opensfm/commands/extend_reconstruction.py) if you want to add more images while keeping your poses fixed.
Let me know if that helps,
Yann
Hi,
I was going through the reconstruction code and had some doubts regarding the reference coordinate frame.
Here https://github.com/mapillary/OpenSfM/blob/d087aa64159d18e919ac4c5bd25ab0d27b497fad/opensfm/reconstruction.py#L597 we set the reference in some world coordinate frame. And during
bootsraping
https://github.com/mapillary/OpenSfM/blob/d087aa64159d18e919ac4c5bd25ab0d27b497fad/opensfm/reconstruction.py#L640 we set thepose
of the first frame asIdentity
and compute the pose of 2nd frame with respect to the first frame (if my understanding is correct). So this means the reference for each partial reconstruction should be the first frame and hence the pose of the first frame should not change. But duringalignment
andbundle adjustment
the pose of the first frame also changes.So I have two questions -
openSfm
codebase maintaining the correct reference.Thank You