Skip to content

Instantly share code, notes, and snippets.

@atinfinity
Created May 15, 2017 14:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atinfinity/5b59e556419f5af4c3f1c4f2be692396 to your computer and use it in GitHub Desktop.
Save atinfinity/5b59e556419f5af4c3f1c4f2be692396 to your computer and use it in GitHub Desktop.
vizモジュールサンプルプログラム(メッシュ表示)
#include <opencv2/viz.hpp>
#include <iostream>
int main(int argc, const char* argv[])
{
if(argc != 2)
{
std::cout << "Usage: " << argv[0] << " <ply filename>" << std::endl;
return -1;
}
cv::viz::Mesh mesh = cv::viz::readMesh(argv[1]);
cv::viz::Viz3d viz("mesh sample");
viz.showWidget("mesh", cv::viz::WMesh(mesh));
viz.spin();
return 0;
}
@atinfinity
Copy link
Author

bunny.plyを表示した結果は以下の通り.

vis_mesh_sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment