8000 Allow to save fused point cloud in colmap format when using command line by boitumeloruf · Pull Request #799 · colmap/colmap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow to save fused point cloud in colmap format when using command line #799

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

Merged
merged 3 commits into from
Jul 27, 2020

Conversation

boitumeloruf
Copy link
  • Adjusted src/base/reconstruction.cc to import point cloud from std::vector
  • Adjusted src/exe/colmap.cc to allow saving in colmap format when calling stereo_fusion from command line

See Issue #738

* Adjusted src/base/reconstruction.cc to import point cloud from std::vector<PlyPoints>
* Adjusted src/exe/colmap.cc to allow saving in colmap format when calling stereo_fusion from command line
@@ -864,6 +864,16 @@ void Reconstruction::ImportPLY(const std::string& path) {
}
}

void Reconstruction::ImportPLY(const std::vector<PlyPoint> &plyPoints)
Copy link
Contributor

Choose a reason for hiding this comment

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

const std::vector<PlyPoint>& ply_points

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.

Thanks and good to go after fixing some minor issues.

{
points3D_.clear();
points3D_.reserve(plyPoints.size());
for (const auto& plyPoint : plyPoints) {
Copy link
Contributor

Choose a reason for hiding this comment

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

ply_point

@@ -266,6 +266,7 @@ class Reconstruction {
// Import from other data formats. Note that these import functions are
// only intended for visualization of data and usable for reconstruction.
void ImportPLY(const std::string& path);
void ImportPLY(const std::vector<PlyPoint>& plyPoints);
Copy link
Contributor

Choose a reason for hiding this comment

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

ply_point

Reconstruction reconstruction;

// read data from sparse reconstruction
if (workspace_format == "colmap" )
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove space and wrap if body in {}

} else if (output_type == "txt") {
reconstruction.WriteText(output_path);
} else if (output_type == "ply") {
std::cout << "Writing output: " << output_path << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Extract this to before the if

Copy link
Author

Choose a reason for hiding this comment

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

I didn't which line you meant. I moved the 'std::cout ...' before the if.

@boitumeloruf boitumeloruf requested a review from ahojnnes July 27, 2020 08:31
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.

Sorry, another small suggestion and then I merge.

@@ -266,6 +266,7 @@ int RunStereoFuser(int argc, char** argv) {
std::string workspace_format = "COLMAP";
std::string pmvs_option_name = "option-all";
std::string output_path;
std::string output_type;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make the previous "ply" the default output type? This also requires to change to AddDefaultOption below. Thanks.

Copy link
Author

Choose a reason for hiding this comment

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

no problem

@boitumeloruf boitumeloruf requested a review from ahojnnes July 27, 2020 13:50
@ahojnnes ahojnnes merged commit b731938 into colmap:dev Jul 27, 2020
lucasthahn pushed a commit to tne-ai/colmap that referenced this pull request Aug 17, 2022
…ine (colmap#799)

* Allow to save fused point cloud in colmap format when using command line

* Adjusted src/base/reconstruction.cc to import point cloud from std::vector<PlyPoints>
* Adjusted src/exe/colmap.cc to allow saving in colmap format when calling stereo_fusion from command line

* PR 799: Incorporated reviews

* changed ply to default output type when fusing point clouds via command line
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.

2 participants
0