点云场景中进行物体识别,使用全局特征的方法严重依赖于点云分割,难以适应杂乱场景。使用局部特征,即对点云进行提取类似于3D SURF、ROPS之类的局部特征,需要寻找离散点云块的局部显著性。

点云的基本局部显著性有某一点处的曲率。

一、几何尺寸

可表述为显著性曲率的曲率阈值与物体的几何大小有关。

                

典型三维模型Dragon和ball两个物体,ball也可以进行三维剖分,但其三维剖分没有任何几何意义,而deagon的三维剖分有特异性。

二、无规则三角化

参考PCL官方网站链接:Fast triangulation of unordered point clouds

代码:

#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/features/normal_3d.h>
#include <pcl/surface/gp3.h> int
main (int argc, char** argv)
{
// Load input file into a PointCloud<T> with an appropriate type
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
pcl::PCLPointCloud2 cloud_blob;
pcl::io::loadPCDFile ("bun0.pcd", cloud_blob);
pcl::fromPCLPointCloud2 (cloud_blob, *cloud);
//* the data should be available in cloud // Normal estimation*
pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> n;
pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal>);
pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ>);
tree->setInputCloud (cloud);
n.setInputCloud (cloud);
n.setSearchMethod (tree);
n.setKSearch (20);
n.compute (*normals);
//* normals should not contain the point normals + surface curvatures // Concatenate the XYZ and normal fields*
pcl::PointCloud<pcl::PointNormal>::Ptr cloud_with_normals (new pcl::PointCloud<pcl::PointNormal>);
pcl::concatenateFields (*cloud, *normals, *cloud_with_normals);
//* cloud_with_normals = cloud + normals // Create search tree*
pcl::search::KdTree<pcl::PointNormal>::Ptr tree2 (new pcl::search::KdTree<pcl::PointNormal>);
tree2->setInputCloud (cloud_with_normals); // Initialize objects
pcl::GreedyProjectionTriangulation<pcl::PointNormal> gp3;
pcl::PolygonMesh triangles; // Set the maximum distance between connected points (maximum edge length)
gp3.setSearchRadius (0.025); // Set typical values for the parameters
gp3.setMu (2.5);
gp3.setMaximumNearestNeighbors (100);
gp3.setMaximumSurfaceAngle(M_PI/4); // 45 degrees
gp3.setMinimumAngle(M_PI/18); // 10 degrees
gp3.setMaximumAngle(2*M_PI/3); // 120 degrees
gp3.setNormalConsistency(false); // Get result
gp3.setInputCloud (cloud_with_normals);
gp3.setSearchMethod (tree2);
gp3.reconstruct (triangles); // Additional vertex information
std::vector<int> parts = gp3.getPartIDs();
std::vector<int> states = gp3.getPointStates(); // Finish
return (0);
}

图形效果:

PCL: 根据几何规则的曲面剖分-贪婪法表面重建三角网格的更多相关文章

  1. 【ACM小白成长撸】--贪婪法解硬币找零问题

    question:假设有一种货币,它有面值为1分.2分.5分和1角的硬币,最少需要多少个硬币来找出K分钱的零钱.按照贪婪法的思想,需要不断地使用面值最大的硬币.如果找零的值小于最大的硬币值,则尝试第二 ...

  2. Java实现猜底牌问题(贪婪法)

    1 问题描述 设计一种策略,使在下面的游戏中,期望提问的次数达到最小.有一副纸牌,是由1张A,2张2,3张3,-9张9组成的,一共包含45张牌.有人从这副牌洗过的牌中抽出一张牌,问一连串可以回答是或否 ...

  3. 基于面绘制的MC算法以及基于体绘制的 Ray-casting 实现Dicom图像的三维重建(python实现)

    加入实验室后,经过张老师的介绍,有幸与某公司合共共同完成某个项目,在此项目中我主要负责的是三维 pdf 报告生成.Dicom图像上亮度.对比度调整以及 Dicom图像三维重建.今天主要介绍一下完成Di ...

  4. VR论文调研

    IEEE VR 2018 1.Avatars and Virtual Humans--人物和虚拟人物 2.Augmented Reality--增强现实 3.Body and Mind--人体和思想( ...

  5. 图像数据到网格数据-1——MarchingCubes算法

    原文:http://blog.csdn.net/u013339596/article/details/19167907 概述 之前的博文已经完整的介绍了三维图像数据和三角形网格数据.在实际应用中,利用 ...

  6. 图像数据到网格数据-1——Marching Cubes算法的一种实现

    概述 之前的博文已经完整的介绍了三维图像数据和三角形网格数据.在实际应用中,利用遥感硬件或者各种探测仪器,可以获得表征现实世界中物体的三维图像.比如利用CT机扫描人体得到人体断层扫描图像,就是一个表征 ...

  7. PCL贪婪投影三角化算法

    贪婪投影三角化算法是一种对原始点云进行快速三角化的算法,该算法假设曲面光滑,点云密度变化均匀,不能在三角化的同时对曲面进行平滑和孔洞修复. 方法: (1)将三维点通过法线投影到某一平面 (2)对投影得 ...

  8. pcl曲面网格模型的三种显示方式

    pcl网格模型有三种可选的显示模式,分别是面片模式(surface)显示,线框图模式(wireframe)显示,点模式(point)显示.默认为面片模式进行显示.设置函数分别为: void pcl:: ...

  9. pcl曲面重建模块-贪婪三角形投影算法实例

    贪婪三角形投影算法 在pcl-1.8测试 #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include &l ...

随机推荐

  1. Xen、OpenVZ、KVM、Hyper-V、VMWare虚拟化技术介绍

    一.Xen 官网:http://xen.org/ Xen 由剑桥大学开发,它是基于硬件的完全分割,物理上有多少的资源就只能分配多少资源,因此很难超售.可分为Xen-PV(半虚拟化),和Xen-HVM( ...

  2. RSA算法求明文

    #注:gmpy2 的安装请参考 http://www.cnblogs.com/gwind/p/8000570.html# -*- coding: utf-8 -*- import gmpy2 prin ...

  3. hdu 1273最大流

    #include<stdio.h> #include<string.h> #define inf 1000000000 #include<queue> #defin ...

  4. 洛谷—— P1077 摆花

    https://www.luogu.org/problem/show?pid=1077 题目描述 小明的花店新开张,为了吸引顾客,他想在花店的门口摆上一排花,共m盆.通过调查顾客的喜好,小明列出了顾客 ...

  5. Hadoop1.0之集群搭建

    VirtualBox虚拟机 下载地址 下载择操作系统对应的基础安装包 下载扩展包(不区分操作系统) http://www.oracle.com/technetwork/cn/server-storag ...

  6. Linq查询datatable的记录集合

    通过linq查询datatable数据集合满足条件的数据集 1.首先定义查询字段的变量,比方深度 string strDepth=查询深度的值: var dataRows = from datarow ...

  7. 基数排序之多keyword排序运用队列

    源码例如以下: #include <stdlib.h> #include <stdio.h> typedef struct QUEUEnode* link; struct QU ...

  8. 【JavaSE】day03_Date、SimpleDateFormat、Calendar、Collection

    [JavaSE]day03_Date.SimpleDateFormat.Calendar.Collection 1.Date及其经常使用API 1)JAVA 中的时间 Java中的时间使用标准类库的D ...

  9. 01背包--小P寻宝记——粗心的基友

    题目描写叙述 这对好基友他们在经历无数的艰难险阻后.最终找到了宝藏.无奈的是这一对好基友居然是一样的粗心,又忘记了带一个大一点的包包,可惜啊..选择又出现了啊.. 已知包的体积是v,每种宝贝仅仅有一种 ...

  10. 1215-Cannot add foreign key constraint

    1.错误描写叙述 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/ ...