Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPS alignment from exif metadata #1069

Merged
merged 9 commits into from
Jul 22, 2021
Merged

GPS alignment from exif metadata #1069

merged 9 commits into from
Jul 22, 2021

Conversation

simogasp
Copy link
Member

@simogasp simogasp commented Jul 5, 2021

Description

It introduces another option to sfmTransform to align an existing sfmdata to the gps position available as exif metadata.
It computes the closest transformation that align the existing sfmdata to the GPS reference system (cartesian x,y,z ref system)

Features list

  • added functions to parse exif data to extract the gps position in cartesian reference system
  • added methods to View to check for the gps data
  • added option to sfmTransform to use gps data to align the scene

@simogasp simogasp added this to the 2.5.0 milestone Jul 5, 2021
@@ -200,7 +213,7 @@ class View
*/
bool isPoseIndependant() const
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabiencastan I can fix the typo in this one as well but I'd rather do it before merging to avoid introducing too much noise, as there are quite few instances to change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean after merging?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, just before the PR is ready to be merged, i can make the refactoring. Just to avoid noise in the review

@@ -32,6 +33,18 @@ enum class EEXIFOrientation
, UNKNOWN = -1
};

struct GPSExifTags
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabiencastan I don't know if it is the correct or proper way to do it, I just wanted to avoid repeating the raw strings for the GPS tags in many parts of the code (better maintainability).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep it shorter:

struct GPSExifTags
{
    static const std::string latitude = "GPS:Latitude";
...
```
And "static const std::string" could be replaced more properly by "constexpr std::string" with C++20.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I thought about that at first, the only thing is that you cannot initialize the static member inline, you have to do it in the cpp. I went for the functions to avoid any sort of problems with the initialization etc
But I can go back to it if it is better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. We will change it one day when we will move to C++20 ;)

@fabiencastan
Copy link
Member

fabiencastan commented Jul 15, 2021

Need to add "from_gps" option on the meshroom side too.

fabiencastan
fabiencastan previously approved these changes Jul 15, 2021
src/aliceVision/numeric/gps.cpp Outdated Show resolved Hide resolved
src/aliceVision/numeric/gps.cpp Outdated Show resolved Hide resolved
Co-authored-by: Fabien Castan <fabcastan@gmail.com>

[numeric] fix double

Co-authored-by: Fabien Castan <fabcastan@gmail.com>
@simogasp
Copy link
Member Author

Need to add "from_gps" option on the meshroom side too.

Shall I also change the software (minor) version for SfMTransform?

@fabiencastan fabiencastan merged commit 62079b2 into develop Jul 22, 2021
@fabiencastan fabiencastan deleted the dev/gpsAlign branch July 22, 2021 10:08
@natowi natowi mentioned this pull request Jul 4, 2022
@informatter
Copy link

@fabiencastan @simogasp @natowi when is the next release planned? I actually really need this feature. I attempted to compile the develop branch on Ubuntu 18.04, but had no luck. Thanks for all the work that has been done on AliceVision!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants