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

[sfmTransform] Creation of auto mode #1402

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Conversation

servantftechnicolor
Copy link
Contributor

New sfmTransform Node

  • Use cameras X axis to estimate the horizontal plane (and the horizon)
  • Use GPS measurements (if available) to align the Z axis with the north
  • Use GPS measurements (if available) to set the scale (otherwise scaled such that stddev=1)
  • Use cameras center mean as frame origin

See alicevision/Meshroom#1954

@fabiencastan fabiencastan added this to the 3.1.0 milestone Apr 6, 2023
Comment on lines +1109 to +1128
Vec3 camCoordinatesSum = Vec3::Zero();
Vec3 gpsCoordinatesSum = Vec3::Zero();
for (const auto & pair : list_pairs)
{
camCoordinatesSum += pair.first;
gpsCoordinatesSum += pair.second;
}

camCoordinatesSum /= list_pairs.size();
gpsCoordinatesSum /= list_pairs.size();

Eigen::Matrix3d camCov = Eigen::Matrix3d::Zero();
Eigen::Matrix3d gpsCov = Eigen::Matrix3d::Zero();
for (const auto & pair : list_pairs)
{
Vec3 centeredCam = pair.first - camCoordinatesSum;
camCov += centeredCam * centeredCam.transpose();
Vec3 centeredGps = pair.second - gpsCoordinatesSum;
gpsCov += centeredGps * centeredGps.transpose();
}
Copy link
Member

Choose a reason for hiding this comment

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

can be broken down into 2 functions like before, it will improve readability

@fabiencastan fabiencastan merged commit f53faf2 into develop Apr 14, 2023
@fabiencastan fabiencastan deleted the dev/sfmTransformAuto branch April 14, 2023 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants