SACSegmentation封装了多种Ransac方法,包括:

RandomSampleConsensus,

LeastMedianSquares,

MEstimatorSampleConsensus

ProgressiveSampleConsensus,

RandomizedRandomSampleConsensus,

RandomizedMEstimatorSampleConsensus,

MaximumLikelihoodSampleConsensus

1.PCL所谓的平行线判断,是已知一个法向量,判断面与之平行。
2.PCL直线Ransac拟合,为啥只需要设置一个距离阈值?因为默认值迭代50次
 
template <typename PointT> void
pcl::SACSegmentation<PointT>::initSAC (const int method_type)
{
if (sac_)
sac_.reset ();
// Build the sample consensus method
switch (method_type)
{
case SAC_RANSAC:
default:
{
PCL_DEBUG ("[pcl::%s::initSAC] Using a method of type: SAC_RANSAC with a model threshold of %f\n", getClassName ().c_str (), threshold_);
sac_.reset (new RandomSampleConsensus<PointT> (model_, threshold_));
break;
}
case SAC_LMEDS:
{
PCL_DEBUG ("[pcl::%s::initSAC] Using a method of type: SAC_LMEDS with a model threshold of %f\n", getClassName ().c_str (), threshold_);
sac_.reset (new LeastMedianSquares<PointT> (model_, threshold_));
break;
}
case SAC_MSAC:
{
PCL_DEBUG ("[pcl::%s::initSAC] Using a method of type: SAC_MSAC with a model threshold of %f\n", getClassName ().c_str (), threshold_);
sac_.reset (new MEstimatorSampleConsensus<PointT> (model_, threshold_));
break;
}
case SAC_RRANSAC:
{
PCL_DEBUG ("[pcl::%s::initSAC] Using a method of type: SAC_RRANSAC with a model threshold of %f\n", getClassName ().c_str (), threshold_);
sac_.reset (new RandomizedRandomSampleConsensus<PointT> (model_, threshold_));
break;
}
case SAC_RMSAC:
{
PCL_DEBUG ("[pcl::%s::initSAC] Using a method of type: SAC_RMSAC with a model threshold of %f\n", getClassName ().c_str (), threshold_);
sac_.reset (new RandomizedMEstimatorSampleConsensus<PointT> (model_, threshold_));
break;
}
case SAC_MLESAC:
{
PCL_DEBUG ("[pcl::%s::initSAC] Using a method of type: SAC_MLESAC with a model threshold of %f\n", getClassName ().c_str (), threshold_);
sac_.reset (new MaximumLikelihoodSampleConsensus<PointT> (model_, threshold_));
break;
}
case SAC_PROSAC:
{
PCL_DEBUG ("[pcl::%s::initSAC] Using a method of type: SAC_PROSAC with a model threshold of %f\n", getClassName ().c_str (), threshold_);
sac_.reset (new ProgressiveSampleConsensus<PointT> (model_, threshold_));
break;
}
}
// Set the Sample Consensus parameters if they are given/changed
if (sac_->getProbability () != probability_)
{
PCL_DEBUG ("[pcl::%s::initSAC] Setting the desired probability to %f\n", getClassName ().c_str (), probability_);
sac_->setProbability (probability_);
}
if (max_iterations_ != -1 && sac_->getMaxIterations () != max_iterations_)
{
PCL_DEBUG ("[pcl::%s::initSAC] Setting the maximum number of iterations to %d\n", getClassName ().c_str (), max_iterations_);
sac_->setMaxIterations (max_iterations_);
}
if (samples_radius_ > 0.)
{
PCL_DEBUG ("[pcl::%s::initSAC] Setting the maximum sample radius to %f\n", getClassName ().c_str (), samples_radius_);
// Set maximum distance for radius search during random sampling
model_->setSamplesMaxDist (samples_radius_, samples_radius_search_);
}
}

  

[PCL]模型拟合方法——随机采样一致性的更多相关文章

  1. RANSAC - 随机采样一致性算法

    RANSAC范例的正式描述如下: 首先,要给定: 1一个模型,该模型需要最少n个数据点去实例化它的自由参数: 2一组数据点P,P中包含数据点的数量#(P)大于n. 然后, 从P中随机地选择n个点(组成 ...

  2. PCL采样一致性算法

    在计算机视觉领域广泛的使用各种不同的采样一致性参数估计算法用于排除错误的样本,样本不同对应的应用不同,例如剔除错误的配准点对,分割出处在模型上的点集,PCL中以随机采样一致性算法(RANSAC)为核心 ...

  3. 关于乱序(shuffle)与随机采样(sample)的一点探究

    最近一个月的时间,基本上都在加班加点的写业务,在写代码的时候,也遇到了一个有趣的问题,值得记录一下. 简单来说,需求是从一个字典(python dict)中随机选出K个满足条件的key.代码如下(py ...

  4. 随机采样和随机模拟:吉布斯采样Gibbs Sampling实现高斯分布参数推断

    http://blog.csdn.net/pipisorry/article/details/51539739 吉布斯采样的实现问题 本文主要说明如何通过吉布斯采样来采样截断多维高斯分布的参数(已知一 ...

  5. 随机采样和随机模拟:吉布斯采样Gibbs Sampling实现文档分类

    http://blog.csdn.net/pipisorry/article/details/51525308 吉布斯采样的实现问题 本文主要说明如何通过吉布斯采样进行文档分类(聚类),当然更复杂的实 ...

  6. 随机采样和随机模拟:吉布斯采样Gibbs Sampling

    http://blog.csdn.net/pipisorry/article/details/51373090 吉布斯采样算法详解 为什么要用吉布斯采样 通俗解释一下什么是sampling. samp ...

  7. Pandas排列和随机采样

    随机重排序 import pandas as pd import numpy as np from pandas import Series df = pd.DataFrame(np.arange(5 ...

  8. hive随机采样

    hive> select * from account limit 10;OKaccount.accountname     account.accid   account.platid  ac ...

  9. 利用shuf对数据记录进行随机采样

    最近在用SVM为分类器做实验,但是发现数据量太大(2000k条记录)但是训练时间过长...让我足足等了1天的啊!有人指导说可以先进行一下随机采样,再训练,这样对训练结果不会有太大影响(这个待考证).所 ...

随机推荐

  1. js 读取文件

    读取文本文件 读取文本文件: <input type="file" id="file1" accept="*" /> </ ...

  2. C++11新特性(1)

    1.long long 类型 C++11新增了long long 和 unsigned long long 类型,为长整型和无符号长整型 long long 类型的数据占用8个字节(64位),取值范围 ...

  3. 末学者笔记--Linux中RAID磁盘阵列及centos7启动过程

    <一>RAID概念 磁盘阵列(Redundant Arrays of Independent Disks,RAID),有“独立磁盘构成的具有冗余能力的阵列”之意. 磁盘阵列是由很多价格较便 ...

  4. [原创]基于Zynq AXI-Bram Standalone & Linux 例程

    基于Zynq AXI-Bram Standalone & Linux 例程 待添加完善中

  5. Java模拟耗时任务异步执行

    说明:耗时任务开启单独线程处理,任务线程处理完毕通知主线程 1.回调接口定义 public interface ResponseCallBack { public void printMsg(Stri ...

  6. c++中字符串的反转

    1.对于用char定义的字符串:使用string.h中的strrev函数 #include <iostream> #include <cstring> using namesp ...

  7. (转)urllib库python2和python3具体区别

    转载链接:https://blog.csdn.net/whatday/article/details/54710403 Python 2 name Python 3 name urllib.urlre ...

  8. mybatis查询语句的背后

    转载请注明出处... 一.前言 在先了解mybatis查询之前,先大致了解下以下代码的为查询做了哪些铺垫,在这里我们要事先了解,myabtis会默认使用DefaultSqlSessionFactory ...

  9. rabbitmq-cluster搭建

    一.前期准备: 准备3台linux系统,配置好公司源,或者官网下载相应的网络源 1.条件:准备3台linux系统,确保能连到download.yunwei.edu 2.编写yum源下载脚本: #vim ...

  10. coolSQL安装与使用

    由于笔者最近支援其他项目,所使用的数据库为informix 所以安装一个coolSQL客户端方便些,当然命令行方式也可以,但是感觉不太友好,下面把安装与简单使用过程分享给大家. 一.下载coolSQL ...