mapillary / OpenSfM

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

Datasets with altitude #38

Closed chris-cooper closed 7 years ago

chris-cooper commented 9 years ago

Thanks for open sourcing this code base!

While I can run the example datasets fine, I'm having trouble with a dataset of a vertical wall. It has GPS altitude in the exif but it's geolocating horizontally instead of vertically. I see a number of points in the code where assumptions are being made about altitude e.g.

https://github.com/mapillary/OpenSfM/blob/master/opensfm/dataset.py#L324 https://github.com/mapillary/OpenSfM/blob/master/opensfm/geo.py#L120 etc

I think this issue could also be important for integration into OpenDroneMap.

Are you planning to support datasets with a significant vertical component? If not, are you able to provide any tips on how to get it working?

paulinus commented 9 years ago

Right now, OpenSfM is ignoring the altitude tag in exif. We started with this option because our datasets were mainly flat and we have found the altitude tag coming from phones to be unreliable.

The assumption of "flat" dataset is used in two places.

To support datasets with significant vertical component, we need to use the actual EXIF altitude tag, and set the alignment algorithm to 'naive', which will align the camera positions to the (lat, lon, altitude) tag directly without trying to find the vertical direction first.

Do you have a dataset with good altitude tags that I could try?

chris-cooper commented 9 years ago

Great, thanks for your help @paulinus! I'm able to get something starting to work with these changes:

https://github.com/mapillary/OpenSfM/compare/use-altitude-tag...chris-cooper:altitude-support

A couple of notes...

It's not the dataset I was referring to originally, but I notice this one has altitude... https://github.com/OpenDroneMap/odm_data_lewis It's a more horizontal dataset though, and I have no idea of the quality of the altitude measurement.

paulinus commented 7 years ago

Closing since the problem was solved with the option use_altitude_tag: yes