一、配置前要先编程open3d
二、开始配置
新建txt
把txt 修改为 pri
在pro 文件中添加 include(F:/xuwanlu/control.pri)
重新构建项目然后回多出来pri
在pri中添加open3d目录
INCLUDEPATH +=
F:\open3d\include\Open3D\3rdparty\GLFW\include \
F:\open3d\include\Open3D\3rdparty\glew\include \
F:\open3d\include\Open3D\3rdparty\fmt\include \
F:\open3d\include\Open3D\3rdparty\Eigen \
F:\open3d\include \
LIBS += F:\xuwanlu\open3d\lib\*.lib \
开始测试
void MainWindow::on_pushButton_13_clicked()
{
// -------------------------生成点云-----------------------------
auto noise_cloud = std::make_shared<open3d::geometry::PointCloud>();
int N = 10000;
noise_cloud->points_.resize(N);
std::normal_distribution<> norm{ 0, 0.002 };
std::random_device rd;
std::default_random_engine rng{ rd() };
for (size_t i = 0; i < N; ++i)
{
noise_cloud->points_[i][0] = norm(rng);
noise_cloud->points_[i][1] = norm(rng);
noise_cloud->points_[i][2] = norm(rng);
}
open3d::io::WritePointCloudToPCD("Gaiss_noise.pcd", *noise_cloud, false);
open3d::visualization::DrawGeometries({ noise_cloud }, "PointCloud", 1600, 900);
}
报错
解决找到 OpenGL32.Lib将lib 添加到 lib 的文件夹里面
发现还是报错
提示glf3w.lib
开始因为lib文件出问题、换了之后出现更多问题
没办法只能换回去
最后经过排查发现少了Gdi32.Lib
快速通道:
链接:https://pan.baidu.com/s/1atMBX4JEEMoEvT46Sltk6g?pwd=ycbm
提取码:ycbm
--来自百度网盘超级会员V4的分享