alicevision / AliceVision

Photogrammetric Computer Vision Framework
http://alicevision.org
Other
2.91k stars 809 forks source link

Align by DGPS positions in images in SfmTransform - test with DJI drone images for example #1523

Open belveder79 opened 10 months ago

belveder79 commented 10 months ago

Description

The changes were made to the SfmTransform executable mainly, plus building the dependency GeographicLib from public github repo, and having the feature ON/OFF in the main cmake configuration depending on GeographicLib being available (either built from the dependencies) or the system. The mode aligns the reconstruction using a Ceres implementation and a Huber Loss Function to the x/y/z coordinates given by the GPS coordinates (in metric UTM). The reconstruction ends up in a local coordinate system. The global center coordinates are stored in a separate file.

Features list

Implementation remarks

Depending on the real use case, one might want to make additional modifications like (not implemented):

The alignment was tested on 2 sets of images from DJI Mavic drone footage and shown to work very well. kapelle00 kapelle01

belveder79 commented 8 months ago

thx for the comments. I'm going to review your suggestions and update the request accordingly.

Yes, it has certainly something to do with the coordinate system convention used. It does not convert left-right handed or something, it is a pure 180° rotation around the x-axis. The inversion essentially makes z point to the sky and x/y correspond to right/up in the UTM coordinate system (which is still right-handed). From that point on it is also correct metric scale if it was not before.

Admittedly, the rotation actually makes the visualization in Meshroom look a bit odd, which (I believe) assumes z to be forward and y point down. In a MeshRoom pipeline, the SfmTransform would plug in right after the StructureFromMotion node and before any (I don't recall the exact names) PrepareDense node. That makes the entire textured reconstruction at the very end of the pipeline correct.