-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
* 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
src/base/reconstruction.cc
Outdated
@@ -864,6 +864,16 @@ void Reconstruction::ImportPLY(const std::string& path) { | |||
} | |||
} | |||
|
|||
void Reconstruction::ImportPLY(const std::vector<PlyPoint> &plyPoints) |
There was a problem hiding this comment.
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
There was a problem hiding this 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.
src/base/reconstruction.cc
Outdated
{ | ||
points3D_.clear(); | ||
points3D_.reserve(plyPoints.size()); | ||
for (const auto& plyPoint : plyPoints) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ply_point
src/base/reconstruction.h
Outdated
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ply_point
src/exe/colmap.cc
Outdated
Reconstruction reconstruction; | ||
|
||
// read data from sparse reconstruction | ||
if (workspace_format == "colmap" ) |
There was a problem hiding this comment.
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 {}
src/exe/colmap.cc
Outdated
} else if (output_type == "txt") { | ||
reconstruction.WriteText(output_path); | ||
} else if (output_type == "ply") { | ||
std::cout << "Writing output: " << output_path << std::endl; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
src/exe/colmap.cc
Outdated
@@ -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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem
…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
See Issue #738