[CC]Plugin-提取ISS3D关键点
基于CloudCompare开发的提取ISS3D关键点。
void qLxPluginPCL::doISS3D()
{
assert(m_app);
if (!m_app)
return; const ccHObject::Container& selectedEntities = m_app->getSelectedEntities();
size_t selNum = selectedEntities.size();
if (selNum!=)
{
m_app->dispToConsole("Select only one cloud!",ccMainAppInterface::ERR_CONSOLE_MESSAGE);
return;
} ccHObject* ent = selectedEntities[];
assert(ent);
if (!ent || !ent->isA(CC_TYPES::POINT_CLOUD))
{
m_app->dispToConsole("Select a real point cloud!",ccMainAppInterface::ERR_CONSOLE_MESSAGE);
return;
} ccPointCloud* m_cc_cloud = static_cast<ccPointCloud*>(ent); //input cloud
unsigned count = m_cc_cloud->size();
bool hasNorms = m_cc_cloud->hasNormals();
CCVector3 bbMin, bbMax;
m_cc_cloud->getBoundingBox(bbMin,bbMax);
const CCVector3d& globalShift = m_cc_cloud->getGlobalShift();
double globalScale = m_cc_cloud->getGlobalScale(); ccIss3Ddlg dlg;
if (!dlg.exec())
return; double s_SalientRadius=dlg.sbSalientRadius->value();
double s_NonMaxRadius =dlg.spNonMaxRadius->value();
double s_Threshold21 = dlg.spThreshold21->value();
double s_Threshold32 = dlg.spThreshold32->value(); pcl::PointCloud<PointXYZ>::Ptr pcl_cloud (new pcl::PointCloud<PointXYZ>);
try
{
unsigned pointCount = m_cc_cloud->size();
pcl_cloud->resize(pointCount); for (unsigned i = ; i < pointCount; ++i)
{
const CCVector3* P = m_cc_cloud->getPoint(i);
pcl_cloud->at(i).x = static_cast<float>(P->x);
pcl_cloud->at(i).y = static_cast<float>(P->y);
pcl_cloud->at(i).z = static_cast<float>(P->z);
}
}
catch(...)
{
//any error (memory, etc.)
pcl_cloud.reset();
} printf("读取了data点云数据:%d\n",pcl_cloud->size()); pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ> ()); pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_out (new pcl::PointCloud<pcl::PointXYZ>); pcl::ISSKeypoint3D<pcl::PointXYZ,pcl::PointXYZ> iss_detector;
iss_detector.setSearchMethod (tree);
iss_detector.setSalientRadius(s_SalientRadius);
iss_detector.setNonMaxRadius(s_NonMaxRadius);
/*iss_detector.setSalientRadius(2.0f);
iss_detector.setNonMaxRadius(1.6f);*/
iss_detector.setInputCloud(pcl_cloud);
/*iss_detector.setThreshold21 (0.975);
iss_detector.setThreshold32 (0.975);*/
iss_detector.setThreshold21 (s_Threshold21);
iss_detector.setThreshold32 (s_Threshold32);
iss_detector.setMinNeighbors ();
iss_detector.setNumberOfThreads ();
cout<<"parameter set successful"<<endl;
iss_detector.compute(*cloud_out); int pointCount = cloud_out->size(); //static_cast<size_t>(sm_cloud ? sm_cloud->width * sm_cloud->height : 0); ccPointCloud* ccCloud =new ccPointCloud();
if (!ccCloud->reserve(static_cast<unsigned>(pointCount)))
return ;
for (size_t i = ; i < pointCount; ++i)
{
CCVector3 P(cloud_out->at(i).x,cloud_out->at(i).y,cloud_out->at(i).z);
ccCloud->addPoint(P);
}
ccCloud->setName(QString("ISS3D"));
ccColor::Rgb col = ccColor::Generator::Random();
ccCloud->setRGBColor(col);
ccCloud->showColors(true);
ccCloud->setPointSize();
ccHObject* group = ;
if (!group)
group = new ccHObject(QString("ISS3D").arg(ent->getName()));
group->addChild(ccCloud);
group->setVisible(true);
m_app->addToDB(group);
}
界面:

[CC]Plugin-提取ISS3D关键点的更多相关文章
- 从cocos2d-html5中提取出来的,用做前端开发的框架——cc.js
从cocos2d-html5中提取出来的,用做前端开发的框架——cc.js /************************************************************* ...
- (二)ORB描述子提取源码思路与实现
ORBSLAM2中ORB特征提取的特点 ORBSLAM2中通过对OpenCV中的ORB特征点提取类进行修改,对图像进行分块提取,而后划分节点,使得每个节点中保存的特征点性能是该节点所有特征点中最好的. ...
- (一)ORB描述子提取
ORBSLAM2中使用ORB描述子的方法 经典的视觉SLAM系统大体分为两种:其一是基于特征点法的,其二是基于直接法的.那么本文主要就讲特征点法的SLAM. 基于特征点法的视觉SLAM系统典型的有PT ...
- PCL关键点(1)
关键点也称为兴趣点,它是2D图像或是3D点云或者曲面模型上,可以通过定义检测标准来获取的具有稳定性,区别性的点集,从技术上来说,关键点的数量相比于原始点云或图像的数据量减小很多,与局部特征描述子结合在 ...
- 人脸识别之Python DLib库进行人脸关键点识别
一.首先安装DLib模块 这里只介绍linux安装的过程,windows安装过程请自行百度 1.首先,安装dlib.skimage前:先安装libboost sudo apt-get install ...
- ORB-SLAM 代码笔记(四)tracking代码结构
首先要清楚ORB-SLAM视觉跟踪的原理,然后对tracking.cc中的函数逐个讲解 代码的前面部分是从配置文件中读取校准好的相机参数(内参和畸变参数,以及双目的深度测量设定),并且加载ORB特征点 ...
- ORB-SLAM3 细读单目初始化过程(上)
作者:乔不思 来源:微信公众号|3D视觉工坊(系投稿) 3D视觉精品文章汇总:https://github.com/qxiaofan/awesome-3D-Vision-Papers/ 点击上方&qu ...
- 一个简单的inno setup模板
一.模板代码 基本功能包括多路径安装.多语言.自定义图标. [Setup] ShowLanguageDialog=yes AppCopyright=Copyright Reserved(C) , 36 ...
- (转) SLAM系统的研究点介绍 与 Kinect视觉SLAM技术介绍
首页 视界智尚 算法技术 每日技术 来打我呀 注册 SLAM系统的研究点介绍 本文主要谈谈SLAM中的各个研究点,为研究生们(应该是博客的多数读者吧)作一个提纲挈领的摘要.然后,我 ...
随机推荐
- 旋转轮子 UIActivityIndicatorView
旋转轮子 *activityView = [[UIActivityIndicatorView alloc ]initWithActivityIndicatorStyle:UIActivityIndic ...
- [深入浅出WP8.1(Runtime)]Toast通知
9.1 Toast通知 Toast通知是在屏幕最顶上弹出来的临时通知,是Windows Phone通用的弹出式短暂的通知,默认的系统消息都是采用Toast通知的形式,比如当你手机收到短信的时候,在手机 ...
- 【BZOJ1677】[Usaco2005 Jan]Sumsets 求和 递推
... #include <iostream> using namespace std; ]; int n,i; int main() { cin>>n; f[]=; ;i&l ...
- Bootstrap整合ASP.NET MVC验证、jquery.validate.unobtrusive
没什么好讲的,上代码: (function ($) { var defaultOptions = { validClass: 'has-success', errorClass: 'has-error ...
- php by oneself
在php里面写html代码真的很麻烦,最近学到了一个新的方法: <html> <head> <title>PHP</title> <meta ht ...
- Find a way——L
L. Find a way Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave N ...
- 2015Web前端攻城之路
2015目标成为一名合格的前端攻城狮. 养成计划: 1.html / css 2.js 3.ajax 4.框架 5.项目实战
- hdu杭电1671 / poj3630 字典树
传送门 题意:输入n串数字 找出是否有存在串的前缀与另一个串相同 如果存在 输出NO否则输出YES 思路:用字典树解决 标记字典树总串的结尾 查找出一个串内部是否有被标记的节点 如果有那么说明存在前缀 ...
- [CareerCup] 15.6 Entity Relationship Diagram 实体关系图
15.6 Draw an entity-relationship diagram for a database with companies, people, and professionals (p ...
- 关于padding与margin的区别
代码一:全为padding. <!doctype html><html><head> <meta charset="UTF-8"&g ...