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

Export SfM data to MVE format by implementing an MVEUndistorter class. #282

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

abhishek-carbon3d
Copy link

This is not quite working yet on my sample data. MVE is rejecting all the exported features because apparently the exported cameras don't see them.

I will appreciate if you can take a look and spot any issues. For reference here is more info about the mve camera model.

https://github.com/simonfuhrmann/mve/wiki/Math-Cookbook
https://github.com/simonfuhrmann/mve/wiki/MVE-File-Format

@ahojnnes
Copy link
Contributor

I will have a look these days. Looks great on first sight though. Thanks.

@ahojnnes ahojnnes changed the base branch from master to dev January 25, 2018 18:24
Copy link
Contributor

@ahojnnes ahojnnes left a comment

Choose a reason for hiding this comment

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

Looks great, just a few minor comments, and please rebase your changes on the dev branch. There will be a conflict, since the image_undistorter.cc binary is merged into the colmap.cc. Thanks!

@@ -96,6 +96,10 @@ double Camera::FocalLength() const {
return params_[idxs[0]];
}

double Camera::NormalizedFocalLength() const {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a unit test for this base/camera_test.cc, same for the new methods below.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@@ -62,9 +62,13 @@ int main(int argc, char** argv) {
undistorter.reset(new CMPMVSUndistorter(undistort_camera_options,
reconstruction, *options.image_path,
output_path));
} else if (output_type == "MVE") {
undistorter.reset(new MVEUndistorter(undistort_camera_options,
Copy link
Contributor

Choose a reason for hiding this comment

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

Also add this option to the ui/undistortion_widget.cc.

}

point2D_t MVEUndistorter::ChooseLowestReprojectionErrorPoint(
image_t image_id, point3D_t point3d_id,
Copy link
Contributor

Choose a reason for hiding this comment

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

Make these arguments const please.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fix these please and I will merge. Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Thats not the usual c++ style (I follow google coding style guide) to make pass by value args const. I can do it if you insist for codebase consistency reason.

Copy link
Author

@abhishek-carbon3d abhishek-carbon3d left a comment

Choose a reason for hiding this comment

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

BTW did you see anything wrong with the export of camera info? I am not able to get MVE to register any of the 3d points. It claims that the points are not in the view.

@abhishek-carbon3d
Copy link
Author

Anything else to be taken care of in this pull request?

@ahojnnes
Copy link
Contributor

No, it all looks good. Just haven't had time to test it myself. Can you confirm that this works and the dense reconstruction using MVE works with this exporter?

@abhishek-carbon3d
Copy link
Author

abhishek-carbon3d commented Jan 31, 2018 via email

@ahojnnes
Copy link
Contributor

ahojnnes commented Jan 31, 2018 via email

@abhishek-carbon3d
Copy link
Author

abhishek-carbon3d commented Jan 31, 2018 via email

@SBCV
Copy link
Contributor

SBCV commented Sep 1, 2020

MVE allows now to import Colmap models/workspaces
See here:
simonfuhrmann/mve#514
simonfuhrmann/mve#509

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

Successfully merging this pull request may close these issues.

None yet

3 participants