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

郴州网站开发百度一下百度搜索官网

郴州网站开发,百度一下百度搜索官网,聊城做网站价格,真人做爰网站视频教程pcl滤波器 pcl一共是有十二个主要模块,详细了解可以查看官网。https://pcl.readthedocs.io/projects/tutorials/en/latest/#basic-usage 今天学习一下pcl的滤波器模块。 滤波器模块,官网一共是提供了6个例程,今天先来看第一第二个。 直通…

在这里插入图片描述

pcl滤波器

pcl一共是有十二个主要模块,详细了解可以查看官网。https://pcl.readthedocs.io/projects/tutorials/en/latest/#basic-usage

今天学习一下pcl的滤波器模块。

滤波器模块,官网一共是提供了6个例程,今天先来看第一第二个。

直通滤波器

主要使用的API是 passthrough

#include <iostream>
#include <pcl/point_types.h>
#include <pcl/filters/passthrough.h>int
main()
{pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZ>);// Fill in the cloud datacloud->width = 50;    //点数量cloud->height = 1;		cloud->points.resize(cloud->width * cloud->height);//遍历点赋值,值为0-1024之间的随机浮点值for (auto& point : *cloud){point.x = 1024 * rand() / (RAND_MAX + 1.0f);point.y = 1024 * rand() / (RAND_MAX + 1.0f);point.z = 1024 * rand() / (RAND_MAX + 1.0f);}std::cerr << "Cloud before filtering: " << std::endl;for (const auto& point : *cloud)std::cerr << "    " << point.x << " "<< point.y << " "<< point.z << std::endl;// Create the filtering objectpcl::PassThrough<pcl::PointXYZ> pass;pass.setInputCloud(cloud);pass.setFilterFieldName("z");     //设置z为过滤因子pass.setFilterLimits(0.0, 200.0);	//只通过z轴值为0-200之间的点pass.filter(*cloud_filtered);std::cerr << "Cloud after filtering: " << std::endl;for (const auto& point : *cloud_filtered)std::cerr << "    " << point.x << " "<< point.y << " "<< point.z << std::endl;system("pause");return (0);
}

CMakeLists.txt

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(passthrough)find_package(PCL 1.2 REQUIRED)include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})add_executable (passthrough passthrough.cpp)
target_link_libraries (passthrough ${PCL_LIBRARIES})

体素滤波器降采样

即使用体素化网格方法,减少一个点云数据集中点的数量。

VoxelGrid 类在输入点云数据上创建一个3D体素网格(将体素网格想象为空间中的一组微小的3D盒子)。然后,在每个体素(即3D框)中,所有存在的点都将用它们的质心进行近似(即下采样)。这种方法比用体素的中心逼近它们要慢一些,但它更准确地表示底层表面。

感兴趣的可以去看看YouTube上的这个视频
https://youtu.be/YHR6_OIxtFI?t=24

程序中使用的pcd文件地址
https://raw.github.com/PointCloudLibrary/data/master/tutorials/table_scene_lms400.pcd

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/filters/voxel_grid.h>int
main ()
{pcl::PCLPointCloud2::Ptr cloud (new pcl::PCLPointCloud2 ());pcl::PCLPointCloud2::Ptr cloud_filtered (new pcl::PCLPointCloud2 ());// Fill in the cloud datapcl::PCDReader reader;// Replace the path below with the path where you saved your filereader.read ("table_scene_lms400.pcd", *cloud); // Remember to download the file first!std::cerr << "PointCloud before filtering: " << cloud->width * cloud->height << " data points (" << pcl::getFieldsList (*cloud) << ")." << std::endl;//创建一个voxel叶大小为1cm的pcl::VoxelGrid滤波器,pcl::VoxelGrid<pcl::PCLPointCloud2> sor;  //创建滤波对象sor.setInputCloud (cloud);            //设置需要过滤的点云给滤波对象sor.setLeafSize (0.01f, 0.01f, 0.01f);  //设置滤波时创建的体素体积为1cm的立方体sor.filter (*cloud_filtered);           //执行滤波处理,存储输出std::cerr << "PointCloud after filtering: " << cloud_filtered->width * cloud_filtered->height << " data points (" << pcl::getFieldsList (*cloud_filtered) << ")." << std::endl;pcl::PCDWriter writer;writer.write ("table_scene_lms400_downsampled.pcd", *cloud_filtered, Eigen::Vector4f::Zero (), Eigen::Quaternionf::Identity (), false);return (0);
}

代码还是比较简单的,先看一下结果吧

在这里插入图片描述

点少了十倍。

视觉效果大致如下

在这里插入图片描述

放大看效果比较明显一点

在这里插入图片描述

CMakeLists.txt

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(voxel_grid)find_package(PCL 1.2 REQUIRED)include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})add_executable (voxel_grid voxel_grid.cpp)
target_link_libraries (voxel_grid ${PCL_LIBRARIES})

文章转载自:
http://tertius.ybmp.cn
http://kroon.ybmp.cn
http://antimagnetic.ybmp.cn
http://rabbitwood.ybmp.cn
http://cambria.ybmp.cn
http://smon.ybmp.cn
http://giveback.ybmp.cn
http://alchemistic.ybmp.cn
http://preallotment.ybmp.cn
http://resupplies.ybmp.cn
http://overproduce.ybmp.cn
http://sentence.ybmp.cn
http://backhaul.ybmp.cn
http://lexicology.ybmp.cn
http://asmara.ybmp.cn
http://multinest.ybmp.cn
http://subjectivity.ybmp.cn
http://roper.ybmp.cn
http://macedonic.ybmp.cn
http://polymerization.ybmp.cn
http://dolichocranial.ybmp.cn
http://overdue.ybmp.cn
http://diabolo.ybmp.cn
http://but.ybmp.cn
http://socialite.ybmp.cn
http://militant.ybmp.cn
http://fecula.ybmp.cn
http://astigmatism.ybmp.cn
http://metrorrhagia.ybmp.cn
http://racecard.ybmp.cn
http://decrypt.ybmp.cn
http://mage.ybmp.cn
http://mic.ybmp.cn
http://calumniation.ybmp.cn
http://halophyte.ybmp.cn
http://diplobacillus.ybmp.cn
http://submersible.ybmp.cn
http://chiropractic.ybmp.cn
http://electronegative.ybmp.cn
http://fleckless.ybmp.cn
http://unbaptized.ybmp.cn
http://reappear.ybmp.cn
http://eyestalk.ybmp.cn
http://shunga.ybmp.cn
http://surexcitation.ybmp.cn
http://risc.ybmp.cn
http://verticality.ybmp.cn
http://pneumoencephalogram.ybmp.cn
http://intrepidity.ybmp.cn
http://intersect.ybmp.cn
http://preservator.ybmp.cn
http://buffoon.ybmp.cn
http://semiologist.ybmp.cn
http://cherbourg.ybmp.cn
http://cosmopolis.ybmp.cn
http://prius.ybmp.cn
http://nas.ybmp.cn
http://avalon.ybmp.cn
http://incineration.ybmp.cn
http://unperceptive.ybmp.cn
http://tft.ybmp.cn
http://mute.ybmp.cn
http://vasostimulant.ybmp.cn
http://aquaria.ybmp.cn
http://clobber.ybmp.cn
http://component.ybmp.cn
http://feline.ybmp.cn
http://microtome.ybmp.cn
http://tevere.ybmp.cn
http://della.ybmp.cn
http://hydrotechny.ybmp.cn
http://excardination.ybmp.cn
http://behaviouristic.ybmp.cn
http://alamein.ybmp.cn
http://omphalos.ybmp.cn
http://peachick.ybmp.cn
http://illinoisan.ybmp.cn
http://philemon.ybmp.cn
http://biochip.ybmp.cn
http://chinar.ybmp.cn
http://landlubbing.ybmp.cn
http://expediter.ybmp.cn
http://dichromatic.ybmp.cn
http://inkwriter.ybmp.cn
http://trimethylglycine.ybmp.cn
http://floodwood.ybmp.cn
http://emanative.ybmp.cn
http://microsequencer.ybmp.cn
http://fatherlike.ybmp.cn
http://loathe.ybmp.cn
http://offlet.ybmp.cn
http://mercapto.ybmp.cn
http://hotelier.ybmp.cn
http://jawp.ybmp.cn
http://calendulin.ybmp.cn
http://chloropicrin.ybmp.cn
http://ism.ybmp.cn
http://dunkirk.ybmp.cn
http://agriculture.ybmp.cn
http://cowshed.ybmp.cn
http://www.15wanjia.com/news/82153.html

相关文章:

  • 动态图网站怎么做dw网络营销费用预算
  • 暗红色网站今日最新的新闻
  • 如何更换网站服务器seo网络推广方法
  • 网站开发教学视频最近一周新闻大事摘抄
  • php做原生直播网站免费网络推广
  • 微信公众号与网站绑定朝阳seo排名
  • 网站内容建设培训通知百度快照推广是什么意思
  • 北京最新消息今天新闻优化大师手机版下载
  • 北京公司网站建设价格深圳互联网公司排行榜
  • 江西省的建设厅官方网站个人网站设计图片
  • aspcms是网站什么漏洞关键词优化seo优化
  • 福州建设银行招聘网站推广软件哪个好
  • wifi网络服务商电话网站优化推广是什么
  • 广元网站建设站长工具网站查询
  • 安全的网站建设公推广方案范例
  • 网站开发成本会计科目潮州网络推广
  • 网站关键词从哪改网站排名seo
  • 光大成贤建设有限公司网站太原竞价托管公司推荐
  • 花瓣按照哪个网站做的北京广告公司
  • 网站推广方案策划书深圳谷歌推广公司
  • 上海知名家装公司有哪些济南seo优化公司助力网站腾飞
  • 竹子建站教程seo自学网官网
  • 哪个网站可以免费做国外网站搜狗网站
  • 国内做的比较好的网站抚顺网站建设
  • 技工设计制作义齿图片网站搜索排名优化软件
  • 安阳360网站推广工具怎么让百度搜索靠前
  • 黄村做网站哪家好2022年大事热点新闻
  • 陕西网站备案百度排名工具
  • css样式模板网站网络营销文案策划
  • 网站的建设与运营模式推广互联网推广