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

可以做网站的网络搜索引擎seo是什么意思

可以做网站的网络,搜索引擎seo是什么意思,谷歌官网,网站流量少(二十七)基于法线差的点云分割 图片来源 提出这个方法的论文:Difference of Normals as a Multi-Scale Operator in Unorganized Point Clouds 算法流程: 在大尺度的范围内(半径 r 1 r_1 r1​)估计每个点…

(二十七)基于法线差的点云分割


图片来源

提出这个方法的论文:Difference of Normals as a Multi-Scale Operator in Unorganized Point Clouds

算法流程:

  • 在大尺度的范围内(半径 r 1 r_1 r1)估计每个点的法线;

  • 在晓尺度的范围(半径 r 2 r_2 r2)估计每个点的法线;

  • 计算法线差(Difference of Normals (DoN));

  • 根据设定的法线差阈值过滤点;

  • 对剩余的点进行欧几里得分割。

don_segmentation.cpp

/*** @file don_segmentation.cpp* Difference of Normals Example for PCL Segmentation Tutorials.** @author Yani Ioannou* @date 2012-09-24*/
#include <string>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/search/organized.h>
#include <pcl/search/kdtree.h>
#include <pcl/features/normal_3d_omp.h>
#include <pcl/filters/conditional_removal.h>
#include <pcl/segmentation/extract_clusters.h>
#include <pcl/features/don.h>using namespace pcl;int main (int argc, char *argv[])
{///The smallest scale to use in the DoN filter.double scale1;///The largest scale to use in the DoN filter.double scale2;///The minimum DoN magnitude to threshold bydouble threshold;///segment scene into clusters with given distance tolerance using euclidean clusteringdouble segradius;if (argc < 6){std::cerr << "usage: " << argv[0] << " inputfile smallscale largescale threshold segradius" << std::endl;exit (EXIT_FAILURE);}/// the file to read from.std::string infile = argv[1];/// small scalestd::istringstream (argv[2]) >> scale1;/// large scalestd::istringstream (argv[3]) >> scale2;std::istringstream (argv[4]) >> threshold;   // threshold for DoN magnitudestd::istringstream (argv[5]) >> segradius;   // threshold for radius segmentation// Load cloud in blob formatpcl::PCLPointCloud2 blob;pcl::io::loadPCDFile (infile.c_str (), blob);pcl::PointCloud<PointXYZRGB>::Ptr cloud (new pcl::PointCloud<PointXYZRGB>);pcl::fromPCLPointCloud2 (blob, *cloud);// OrganizedNeighbor适用于有组织的数据。KDTree适用于无组织的数据pcl::search::Search<PointXYZRGB>::Ptr tree;if (cloud->isOrganized ()){tree.reset (new pcl::search::OrganizedNeighbor<PointXYZRGB> ());}else{tree.reset (new pcl::search::KdTree<PointXYZRGB> (false));}// Set the input pointcloud for the search treetree->setInputCloud (cloud);if (scale1 >= scale2){std::cerr << "Error: Large scale must be > small scale!" << std::endl;exit (EXIT_FAILURE);}// 计算每个点小尺度和大尺度的法线// 通过OpenMP多线程,使用处理器中的多个内核来计算法线pcl::NormalEstimationOMP<PointXYZRGB, PointNormal> ne;  // PointNormal-float x,y,z,normal[3], curvaturene.setInputCloud (cloud);ne.setSearchMethod (tree);// 设置一个在所有法线计算中使用的视点,确保了在不同尺度上估计的法线的基本方向一致。ne.setViewPoint (std::numeric_limits<float>::max (), std::numeric_limits<float>::max (), std::numeric_limits<float>::max ());// calculate normals with the small scalestd::cout << "Calculating normals for scale..." << scale1 << std::endl;pcl::PointCloud<PointNormal>::Ptr normals_small_scale (new pcl::PointCloud<PointNormal>);ne.setRadiusSearch (scale1);ne.compute (*normals_small_scale);// calculate normals with the large scalestd::cout << "Calculating normals for scale..." << scale2 << std::endl;pcl::PointCloud<PointNormal>::Ptr normals_large_scale (new pcl::PointCloud<PointNormal>);ne.setRadiusSearch (scale2);ne.compute (*normals_large_scale);// Create output cloud for DoN resultsPointCloud<PointNormal>::Ptr doncloud (new pcl::PointCloud<PointNormal>);copyPointCloud (*cloud, *doncloud);std::cout << "Calculating DoN... " << std::endl;// DoN 估计模板的3个参数<第一个对应于输入点云类型,第二个对应于为点云估计的法线类型.第三个对应于输出类型pcl::DifferenceOfNormalsEstimation<PointXYZRGB, PointNormal, PointNormal> don;don.setInputCloud (cloud);don.setNormalScaleLarge (normals_large_scale);don.setNormalScaleSmall (normals_small_scale);if (!don.initCompute ()){std::cerr << "Error: Could not initialize DoN feature operator" << std::endl;exit (EXIT_FAILURE);}// Compute DoNdon.computeFeature (*doncloud);// Save DoN featurespcl::PCDWriter writer;writer.write<pcl::PointNormal> ("don.pcd", *doncloud, false); std::cout << "Filtering out DoN mag <= " << threshold << "..." << std::endl;// 设定滤波条件,根据点的法线差矢量过滤点 pcl::ConditionOr<PointNormal>::Ptr range_cond (new pcl::ConditionOr<PointNormal> ());// "curvature" :过滤DoN的l2范数小于threshold的点range_cond->addComparison (pcl::FieldComparison<PointNormal>::ConstPtr (new pcl::FieldComparison<PointNormal> ("curvature", pcl::ComparisonOps::GT, threshold)));// 创建条件滤波器pcl::ConditionalRemoval<PointNormal> condrem;condrem.setCondition (range_cond);condrem.setInputCloud (doncloud);pcl::PointCloud<PointNormal>::Ptr doncloud_filtered (new pcl::PointCloud<PointNormal>);// Apply filtercondrem.filter (*doncloud_filtered);doncloud = doncloud_filtered;// Save filtered outputstd::cout << "Filtered Pointcloud: " << doncloud->size () << " data points." << std::endl;writer.write<pcl::PointNormal> ("don_filtered.pcd", *doncloud, false); // 欧几里得聚类分割std::cout << "Clustering using EuclideanClusterExtraction with tolerance <= " << segradius << "..." << std::endl;pcl::search::KdTree<PointNormal>::Ptr segtree (new pcl::search::KdTree<PointNormal>);segtree->setInputCloud (doncloud);std::vector<pcl::PointIndices> cluster_indices;pcl::EuclideanClusterExtraction<PointNormal> ec;ec.setClusterTolerance (segradius);ec.setMinClusterSize (50);ec.setMaxClusterSize (100000);ec.setSearchMethod (segtree);ec.setInputCloud (doncloud);ec.extract (cluster_indices);int j = 0;for (const auto& cluster : cluster_indices){pcl::PointCloud<PointNormal>::Ptr cloud_cluster_don (new pcl::PointCloud<PointNormal>);for (const auto& idx : cluster.indices){cloud_cluster_don->points.push_back ((*doncloud)[idx]);}cloud_cluster_don->width = cloud_cluster_don->size ();cloud_cluster_don->height = 1;cloud_cluster_don->is_dense = true;//Save clusterstd::cout << "PointCloud representing the Cluster: " << cloud_cluster_don->size () << " data points." << std::endl;std::stringstream ss;ss << "don_cluster_" << j << ".pcd";writer.write<pcl::PointNormal> (ss.str (), *cloud_cluster_don, false);++j;}
}

CMakeLists.txt

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

数据样例

编译并运行:

$ ./don_segmentation <inputfile> <smallscale> <largescale> <threshold> <segradius>
$./don_segmentation 003000.pcd 0.4 2 0.2 0.5

DoN:
在这里插入图片描述

根据DoN滤除点:

聚类:

http://www.dt0577.cn/news/31986.html

相关文章:

  • 微信服务号可以做万网站么长沙网红打卡景点排行榜
  • 受欢迎的丹阳网站建设seo按照搜索引擎的
  • 网站建设套餐报价百度搜索数据查询
  • 宿迁哪里有做网站开发的制作公司网站的公司
  • 哪个网站免费做简历seo推广灰色词
  • php网站开发软件是什么大的网站建设公司
  • 做外单阿里的网站网站开发外包
  • wordpress 调用随即文章惠州seo排名
  • 网站开发软件启动网站播放视频速度优化
  • 怎么用视频做网站登录的背景谷歌外贸网站推广
  • 网页和网站做哪个好seo培训学校
  • 贵州专业建网站合肥网站seo
  • wordpress仿雷锋网sem和seo哪个工作好
  • 东坑镇网站建设公司seo排名优化厂家
  • 做网站的主要收入上海网络推广服务公司
  • 加强全国政府网站建设监督检查长沙seo关键词排名
  • 青岛浩瀚网络技术有限公司宁波seo博客
  • 用什么软件来做网站网站优化检测
  • 机关网站建设方案网站不收录怎么办
  • 网站建设模拟器杭州网站制作排名
  • 天津实用网站建设平台关键字优化
  • 石龙网站建设seo工具有哪些
  • 贵阳做网站公司网站设计模板网站
  • 网站底部悬浮代码wordpress哈尔滨seo关键字优化
  • 公安厅网站 做10道相关题目全网推广的方式
  • 佛山网站建设玲念建站西安网站设计
  • 新建网站怎样绑定域名安新seo优化排名网站
  • 网站建设的内容要怎么写网站免费制作平台
  • 黑龙江省建设局网站营销策划方案怎么写?
  • 桂平做网站公司广州企业网站推广