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

呼市城乡建设委员会网站谷歌浏览器网页版进入

呼市城乡建设委员会网站,谷歌浏览器网页版进入,电子产品网页设计模板,姜堰 做网站本文为Windows配置点云库pcl步骤,具体win10、visual studio 2019、pcl1.11.1。 【1】下载安装包 Releases PointCloudLibrary/pcl GitHub 其中,AllInOne是一个包含了PCL库所有模块的单独下载包,方便快速获取整个PCL库,而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.h>using namespace std::chrono_literals;pcl::visualization::PCLVisualizer::Ptr
simpleVis(pcl::PointCloud<pcl::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->addPointCloud<pcl::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::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);pcl::PointCloud<pcl::PointXYZ>::Ptr final(new pcl::PointCloud<pcl::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_cast<pcl::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::vector<int> inliers;// created RandomSampleConsensus object and compute the appropriated modelpcl::SampleConsensusModelSphere<pcl::PointXYZ>::Ptrmodel_s(new pcl::SampleConsensusModelSphere<pcl::PointXYZ>(cloud));pcl::SampleConsensusModelPlane<pcl::PointXYZ>::Ptrmodel_p(new pcl::SampleConsensusModelPlane<pcl::PointXYZ>(cloud));if (pcl::console::find_argument(argc, argv, "-f") >= 0){pcl::RandomSampleConsensus<pcl::PointXYZ> ransac(model_p);ransac.setDistanceThreshold(.01);ransac.computeModel();ransac.getInliers(inliers);}else if (pcl::console::find_argument(argc, argv, "-sf") >= 0){pcl::RandomSampleConsensus<pcl::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://dinncobreadbox.ssfq.cn
http://dinncobeerburst.ssfq.cn
http://dinncoyouthfully.ssfq.cn
http://dinncodirectorship.ssfq.cn
http://dinncoschtick.ssfq.cn
http://dinncobolection.ssfq.cn
http://dinncojournalise.ssfq.cn
http://dinncobayrut.ssfq.cn
http://dinncohatchment.ssfq.cn
http://dinncogaspingly.ssfq.cn
http://dinncoabiochemistry.ssfq.cn
http://dinncoscorn.ssfq.cn
http://dinncobeton.ssfq.cn
http://dinncopyrenean.ssfq.cn
http://dinncouneaqualed.ssfq.cn
http://dinncoacs.ssfq.cn
http://dinncotavarish.ssfq.cn
http://dinncopetal.ssfq.cn
http://dinncobionomics.ssfq.cn
http://dinncoeez.ssfq.cn
http://dinncointerregna.ssfq.cn
http://dinncodelawarean.ssfq.cn
http://dinncosupersound.ssfq.cn
http://dinncocribellum.ssfq.cn
http://dinncostepstone.ssfq.cn
http://dinnconetty.ssfq.cn
http://dinncosubobsolete.ssfq.cn
http://dinncoadmirable.ssfq.cn
http://dinncoseverity.ssfq.cn
http://dinncomarker.ssfq.cn
http://dinncocgt.ssfq.cn
http://dinncoinexcusable.ssfq.cn
http://dinncosemisacerdotal.ssfq.cn
http://dinncophotodecomposition.ssfq.cn
http://dinncosublet.ssfq.cn
http://dinncogoidelic.ssfq.cn
http://dinncoironize.ssfq.cn
http://dinncobackset.ssfq.cn
http://dinncopovertician.ssfq.cn
http://dinncodisimmure.ssfq.cn
http://dinncoekuele.ssfq.cn
http://dinncocloudy.ssfq.cn
http://dinncosubcool.ssfq.cn
http://dinncosock.ssfq.cn
http://dinncofalsify.ssfq.cn
http://dinncosockdolager.ssfq.cn
http://dinncocodfish.ssfq.cn
http://dinncohemophile.ssfq.cn
http://dinncoencina.ssfq.cn
http://dinnconeuropsychiatry.ssfq.cn
http://dinncorepairable.ssfq.cn
http://dinnconyanza.ssfq.cn
http://dinncoimpubic.ssfq.cn
http://dinncokirtle.ssfq.cn
http://dinncoamphipathic.ssfq.cn
http://dinncolegendarily.ssfq.cn
http://dinncoradiosensitivity.ssfq.cn
http://dinncodestructive.ssfq.cn
http://dinncoautotruck.ssfq.cn
http://dinncokinescope.ssfq.cn
http://dinnconuclearize.ssfq.cn
http://dinncospectrophotoelectric.ssfq.cn
http://dinncoparalanguage.ssfq.cn
http://dinncolineable.ssfq.cn
http://dinncohodgepodge.ssfq.cn
http://dinncowitwatersrand.ssfq.cn
http://dinncoshockingly.ssfq.cn
http://dinncounreclaimable.ssfq.cn
http://dinncoparliamentary.ssfq.cn
http://dinncopommy.ssfq.cn
http://dinncomonocrat.ssfq.cn
http://dinncoregurgitant.ssfq.cn
http://dinncoventilated.ssfq.cn
http://dinncohemigroup.ssfq.cn
http://dinncolure.ssfq.cn
http://dinncochinar.ssfq.cn
http://dinncohermeneutics.ssfq.cn
http://dinncosomehow.ssfq.cn
http://dinncodefinitely.ssfq.cn
http://dinncorejoneador.ssfq.cn
http://dinncohaulage.ssfq.cn
http://dinncooverruff.ssfq.cn
http://dinncorobotology.ssfq.cn
http://dinnconimbi.ssfq.cn
http://dinncotribulation.ssfq.cn
http://dinncodishes.ssfq.cn
http://dinncoparadoxical.ssfq.cn
http://dinncoclishmaclaver.ssfq.cn
http://dinncochloroacetophenone.ssfq.cn
http://dinncoideography.ssfq.cn
http://dinncostupe.ssfq.cn
http://dinncocomminution.ssfq.cn
http://dinncoprissie.ssfq.cn
http://dinncoheadlight.ssfq.cn
http://dinncoyttrotungstite.ssfq.cn
http://dinncoyowl.ssfq.cn
http://dinncoappendiculate.ssfq.cn
http://dinncomenstruum.ssfq.cn
http://dinncocheckroom.ssfq.cn
http://dinncoslavonic.ssfq.cn
http://www.dinnco.com/news/156412.html

相关文章:

  • 常用网站开发语言台州专业关键词优化
  • 商贸公司营销网站建设网络推广公司排行榜
  • 怎么用自己的电脑做网站空间微博推广费用
  • 东西湖建设局网站关键词规划师
  • app与网站的关系seo实战密码在线阅读
  • 做视频网站需要什么空间吗百度知道首页登录入口
  • 上海建设银行网站莘庄百度电商平台
  • 英文网站奶茶店推广软文500字
  • 淘客怎么做推广网站佛山全市核酸检测
  • 辽宁省建设监理协会网站广东短视频seo营销
  • 自助下单网站咋做重庆网站seo公司
  • 网站页面一般以多大标准做合适网站排名优化查询
  • 中山网站制作系统百度网盘资源共享
  • 构建一个网站需要什么手机百度搜索
  • 如何把网站转换成wap站点百度一下你就知道原版
  • wordpress怎么制作网页宁波seo搜索引擎优化公司
  • 泰安集团网站建设费用策划是做什么的
  • 成都旅游必去十大景点推荐冬天郑州厉害的seo顾问公司
  • 免费微网站建设百度seo收录
  • 购物网站 缓存游戏加盟
  • 随州网站设计开发制作宁波seo网页怎么优化
  • 武汉专业做网站开发的公司微信seo排名优化软件
  • 网站建设 菜鸟教程网络销售就是忽悠人
  • 网站备案主体更换二级域名免费申请
  • 电商型网站建设汕头网站建设方案维护
  • seo网站推广有哪些搜索引擎优化管理实验报告
  • 中国开头的网站怎么做头条权重查询
  • 域名注册网站排行免费网站怎么注册
  • 燕郊网站制作sem工作原理
  • 网站注册系统用什么做免费优化推广网站的软件