[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中的各个研究点,为研究生们(应该是博客的多数读者吧)作一个提纲挈领的摘要.然后,我 ...
随机推荐
- NOIp 2013 #3 转圈游戏 Label:模拟
题目描述 n 个小伙伴(编号从 0 到 n-1)围坐一圈玩游戏.按照顺时针方向给 n 个位置编号,从0 到 n-1.最初,第 0 号小伙伴在第 0 号位置,第 1 号小伙伴在第 1 号位置,……,依此 ...
- 如何在电脑上测试手机网站(补充)和phonegap
颜海镜 介绍了专业人士精准测试手机网站的经验 http://www.cnblogs.com/yanhaijing/p/3557261.html, 因为太专业了,稍显复杂和琐碎,这里我介绍下我一直关注的 ...
- 【HDU】2138 How many prime numbers
http://acm.hdu.edu.cn/showproblem.php?pid=2138 题意:给n个数判断有几个素数.(每个数<=2^32) #include <cstdio> ...
- URAL 1133. Fibonacci Sequence
题目链接 #include <cstdio> #include <string> #include <cstring> #include <iostream& ...
- App如何适应 iPhone 5s/6/6 Plus 三种屏幕的尺寸?
来自//www.cocoachina.com/ 初代 iPhone 2007 年,初代 iPhone 发布,屏幕的宽高是 320 x 480 像素.下文也是按照宽度,高度的顺序排列.这个分辨率一直到 ...
- Golang redigo hmset hset 问题
最近公司项目,换到了golang 下面来开发,遇到了redis存储链表的问题,困扰了我好几天,后面静下心来,好好读了一下源码,发现官方的例子,最终还是羊毛出在羊身上 c, err := dial() ...
- 【转】C#进阶系列——WebApi 接口参数不再困惑:传参详解
原文地址:http://www.cnblogs.com/landeanfen/archive/2016/04/06/5337072.html 阅读目录 一.get请求 1.基础类型参数 2.实体作为参 ...
- 《深入.NET平台和C# 编程》内测纠错记录
1. .NET框架的核心组件包括(BD)(选择两项) A.CTS (通用类型系统) B.CLR (公共语言运行时,.NET的基础) C.CLS (公共语言规范) D.FCL (框架类 ...
- [LintCode] Number of Islands 岛屿的数量
Given a boolean 2D matrix, find the number of islands. Notice 0 is represented as the sea, 1 is repr ...
- [CareerCup] 17.8 Contiguous Sequence with Largest Sum 连续子序列之和最大
17.8 You are given an array of integers (both positive and negative). Find the contiguous sequence w ...