当前位置: 首页 > news >正文

西安大兴医院网站建设完成网站建设的心得体会

西安大兴医院网站建设,完成网站建设的心得体会,天津公司网站建设费,衡水做网站推广本文为Windows配置点云库pcl步骤#xff0c;具体win10、visual studio 2019、pcl1.11.1。 【1】下载安装包 Releases PointCloudLibrary/pcl GitHub 其中#xff0c;AllInOne是一个包含了PCL库所有模块的单独下载包#xff0c;方便快速获取整个PCL库#xff0c;而pdb则…本文为Windows配置点云库pcl步骤具体win10、visual studio 2019、pcl1.11.1。 【1】下载安装包 Releases · PointCloudLibrary/pcl · GitHub 其中AllInOne是一个包含了PCL库所有模块的单独下载包方便快速获取整个PCL库而pdb则是PCL库的调试信息文件可以在程序崩溃时提供更详细的调试信息来分析解决错误。 【2】安装 2.1 先执行win64.exe 建议自定义安装的位置按提示操作即可建议把pcl添加到PATH中。 2.2 解压win64.zip 把解压出来的子文件全部复制到PCL/bin中 2.3 OpenNI2安装 执行.msi建议修改路径到该文件夹下如果已安装过建议Remove后重新安装以便后续添加PATH和使用时路径清晰。 安装完毕该路径如下 【3】设置环境变量 “此电脑”右键属性如下图添加再重启电脑 【4】visual studio 项目实战 4.1 新建C空项目 可设置Debug-x64 4.2 右键属性 如下图右键 属性 4.3 包含目录 如下图编辑包含目录 添加如下路径不同库的路径层级不同建议各层级都添加避免包含错误 D:\tools\PCL 1.11.1\include\pcl-1.11 D:\tools\PCL 1.11.1\include\pcl-1.11\pcl D:\tools\PCL 1.11.1\3rdParty\Boost\include\boost-1_74\boost D:\tools\PCL 1.11.1\3rdParty\Eigen\eigen3 D:\tools\PCL 1.11.1\3rdParty\Eigen\eigen3\Eigen D:\tools\PCL 1.11.1\3rdParty\Eigen\eigen3\unsupported D:\tools\PCL 1.11.1\3rdParty\Eigen\eigen3\unsupported\Eigen D:\tools\PCL 1.11.1\3rdParty\FLANN\include D:\tools\PCL 1.11.1\3rdParty\FLANN\include\flann D:\tools\PCL 1.11.1\3rdParty\OpenNI2\Include D:\tools\PCL 1.11.1\3rdParty\Qhull\include D:\tools\PCL 1.11.1\3rdParty\Qhull\include\libqhull D:\tools\PCL 1.11.1\3rdParty\Qhull\include\libqhull_r D:\tools\PCL 1.11.1\3rdParty\Qhull\include\libqhullcpp D:\tools\PCL 1.11.1\3rdParty\VTK\include D:\tools\PCL 1.11.1\3rdParty\VTK\include\vtk-8.2 4.4 库目录 仿照4.3包含目录添加库目录 D:\tools\PCL 1.11.1\lib D:\tools\PCL 1.11.1\3rdParty\Boost\lib D:\tools\PCL 1.11.1\3rdParty\FLANN\lib D:\tools\PCL 1.11.1\3rdParty\OpenNI2\Lib D:\tools\PCL 1.11.1\3rdParty\Qhull\lib D:\tools\PCL 1.11.1\3rdParty\VTK\lib 4.5 添加附加依赖项 需要添加PCL和VTK的debug版lib总共140多个。 可以通过以下批处理的方法 cd\d D:\tools\PCL 1.11.1\lib  //转到lib目录 dir/b *d.lib *0.txt                  //把debug用的d.lib后缀名字写到0.txt中 两次操作把这些名字复制粘贴到附加依赖项中。 4.6 添加.cpp并执行 #include iostream #include thread#include pcl/console/parse.h #include pcl/point_cloud.h // for PointCloud #include pcl/common/io.h // for copyPointCloud #include pcl/point_types.h #include pcl/sample_consensus/ransac.h #include pcl/sample_consensus/sac_model_plane.h #include pcl/sample_consensus/sac_model_sphere.h #include pcl/visualization/pcl_visualizer.husing namespace std::chrono_literals;pcl::visualization::PCLVisualizer::Ptr simpleVis(pcl::PointCloudpcl::PointXYZ::ConstPtr cloud) {// --------------------------------------------// -----Open 3D viewer and add point cloud-----// --------------------------------------------pcl::visualization::PCLVisualizer::Ptr viewer(new pcl::visualization::PCLVisualizer(3D Viewer));viewer-setBackgroundColor(0, 0, 0);viewer-addPointCloudpcl::PointXYZ(cloud, sample cloud);viewer-setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 3, sample cloud);//viewer-addCoordinateSystem (1.0, global);viewer-initCameraParameters();return (viewer); }int main(int argc, char** argv) {// initialize PointCloudspcl::PointCloudpcl::PointXYZ::Ptr cloud(new pcl::PointCloudpcl::PointXYZ);pcl::PointCloudpcl::PointXYZ::Ptr final(new pcl::PointCloudpcl::PointXYZ);// populate our PointCloud with pointscloud-width 500;cloud-height 1;cloud-is_dense false;cloud-points.resize(cloud-width * cloud-height);for (pcl::index_t i 0; i static_castpcl::index_t(cloud-size()); i){if (pcl::console::find_argument(argc, argv, -s) 0 || pcl::console::find_argument(argc, argv, -sf) 0){(*cloud)[i].x 1024 * rand() / (RAND_MAX 1.0);(*cloud)[i].y 1024 * rand() / (RAND_MAX 1.0);if (i % 5 0)(*cloud)[i].z 1024 * rand() / (RAND_MAX 1.0);else if (i % 2 0)(*cloud)[i].z sqrt(1 - ((*cloud)[i].x * (*cloud)[i].x)- ((*cloud)[i].y * (*cloud)[i].y));else(*cloud)[i].z -sqrt(1 - ((*cloud)[i].x * (*cloud)[i].x)- ((*cloud)[i].y * (*cloud)[i].y));}else{(*cloud)[i].x 1024 * rand() / (RAND_MAX 1.0);(*cloud)[i].y 1024 * rand() / (RAND_MAX 1.0);if (i % 2 0)(*cloud)[i].z 1024 * rand() / (RAND_MAX 1.0);else(*cloud)[i].z -1 * ((*cloud)[i].x (*cloud)[i].y);}}std::vectorint inliers;// created RandomSampleConsensus object and compute the appropriated modelpcl::SampleConsensusModelSpherepcl::PointXYZ::Ptrmodel_s(new pcl::SampleConsensusModelSpherepcl::PointXYZ(cloud));pcl::SampleConsensusModelPlanepcl::PointXYZ::Ptrmodel_p(new pcl::SampleConsensusModelPlanepcl::PointXYZ(cloud));if (pcl::console::find_argument(argc, argv, -f) 0){pcl::RandomSampleConsensuspcl::PointXYZ ransac(model_p);ransac.setDistanceThreshold(.01);ransac.computeModel();ransac.getInliers(inliers);}else if (pcl::console::find_argument(argc, argv, -sf) 0){pcl::RandomSampleConsensuspcl::PointXYZ ransac(model_s);ransac.setDistanceThreshold(.01);ransac.computeModel();ransac.getInliers(inliers);}// copies all inliers of the model computed to another PointCloudpcl::copyPointCloud(*cloud, inliers, *final);// creates the visualization object and adds either our original cloud or all of the inliers// depending on the command line arguments specified.pcl::visualization::PCLVisualizer::Ptr viewer;if (pcl::console::find_argument(argc, argv, -f) 0 || pcl::console::find_argument(argc, argv, -sf) 0)viewer simpleVis(final);elseviewer simpleVis(cloud);while (!viewer-wasStopped()){viewer-spinOnce(100);std::this_thread::sleep_for(100ms);}return 0; } 执行结果 另执行可能出现的代码错误解决方法 有两种解决方法 1、直接跳转到该位置注释 2、或在预编译器添加 _CRT_SECURE_NO_DEPRECATE 注部分地方参考 PCL学习笔记一-- Windows下配置安装PCL开发环境_pcl环境配置_看到我请叫我学C的博客-CSDN博客
http://www.hkea.cn/news/14338917/

相关文章:

  • 淘宝客怎么做自己网站推广微网站微商城建设
  • 东莞创建网站软文推广的作用
  • 淘客必须做网站灌云网站制作
  • 做网站为什么要钱网站积分程序怎么建设
  • 网站的中英文切换怎么做金融类网站建设
  • 网站怎么做图片动态图片不显示不出来的wordpress rss 订阅
  • 织梦网站模板如何安装网站备案 空间备案 域名备案
  • 高新技术企业网站怎么做网站用图片
  • 建设网站商城需要多少费用吗如何做网络营销?
  • 河北网站制作公司怎么建公司网站账号
  • 兰州网站优化公司it运维工程师简历
  • 购买网站空间的方法作品集模板下载免费
  • 网站优化方案范文如何做公司自己的网站首页
  • 做网站的目的是什么wordpress文字轮播
  • 微网站功能列表深圳市网站制作公司
  • 唐河企业网站制作哪家好网站怎么提高收录
  • 做的网站缩小内容就全乱了wordpress中文docker
  • hao123上网主页官网设置成主页网站框架优化
  • 惠州企业建站程序东莞商城网站开发
  • 网站建设网页设计小江网站内搜索关键字
  • 学校网站建设报价是多少一个视频多平台发布
  • 南宁市建设信息网站南通网站的优化
  • 网站维护与建设实训心得湖南大钧工程建设有限公司网站
  • 长春营销型网站设计杭州创意设计中心
  • 视频网站应该怎么做wordpress文章自适应图片大小
  • 章丘哪里做网站php论坛网站源码下载
  • 响应式网站制作方法六安人才招聘网官网
  • 电子商城网站模板佛山住房和城乡建设厅网站
  • 做3d效果图的网站有哪些做卖衣服网站源代码
  • 苏州做网站公司认定苏州聚尚网络教育平台型网站建设