1、本文内容
open3d
2、平台/环境
windows10, visual studio 2019
通过cmake构建项目,跨平台通用;open3d
3、转载请注明出处:
https://blog.csdn.net/qq_41102371/article/details/135407857
编译open3d:
https://blog.csdn.net/qq_41102371/article/details/121014372
#include <iostream>
#include <chrono>
#include <open3d/Open3D.h>
int main(int argc, char *argv[])
{
auto coordinate_1 = open3d::geometry::TriangleMesh::CreateCoordinateFrame(0.1);
auto coordinate_2 = open3d::geometry::TriangleMesh::CreateCoordinateFrame(0.2);
Eigen::Matrix4d trans_mat = Eigen::Matrix4d::Identity();
trans_mat(0, 3) = 0.5;
coordinate_2->Transform(trans_mat);/// a coordinate on (0, 0, 0.5)
std::shared_ptr<open3d::geometry::LineSet> lineset_0(new open3d::geometry::LineSet);
/// pointset
lineset_0->points_.push_back({0, 0, 0});
lineset_0->points_.push_back({0.5, 0, 0});
lineset_0->points_.push_back({0.5, 0.5, 0});
/// connect point to line
lineset_0->lines_.push_back({0, 1});
lineset_0->lines_.push_back({0, 2});
lineset_0->lines_.push_back({1, 2});
/// color for all lineset
lineset_0->PaintUniformColor({1, 0, 0});
/// color for line0
lineset_0->colors_[0] = Eigen::Vector3d({1, 1, 0});
/// visualize
open3d::visualization::DrawGeometries({coordinate_1, coordinate_2, lineset_0}, "lineset visualize");
return 0;
}
文中已列出
主要做激光/影像三维重建,配准、分割等常用点云算法,技术交流、咨询可私信