博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[PCL]模型拟合方法——随机采样一致性
阅读量:6793 次
发布时间:2019-06-26

本文共 3167 字,大约阅读时间需要 10 分钟。

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

RandomSampleConsensus,

LeastMedianSquares,

MEstimatorSampleConsensus

ProgressiveSampleConsensus,

RandomizedRandomSampleConsensus,

RandomizedMEstimatorSampleConsensus,

MaximumLikelihoodSampleConsensus

 

1.PCL所谓的平行线判断,是已知一个法向量,判断面与之平行。
2.PCL直线Ransac拟合,为啥只需要设置一个距离阈值?因为默认值迭代50次
 
template 
voidpcl::SACSegmentation
::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
(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
(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
(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
(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
(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
(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
(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_); }}

  

转载于:https://www.cnblogs.com/yhlx125/p/10645392.html

你可能感兴趣的文章
IBM Power6、7配件FC号描述翻译(unix360.part05)
查看>>
IDE---zend studio 9
查看>>
Oracle中使用数据库的最高权限
查看>>
Java中的final
查看>>
【转】Linux系统信息查看命令大全
查看>>
mac下mysql忘记root密码
查看>>
谈谈浏览器的缓存过期时间
查看>>
secilog 1.15 发布,增加数据库采集网站访问统计
查看>>
secilog 1.17 发布 增加了英文版本等新功能
查看>>
四城记之哈尔滨
查看>>
django模版过滤器
查看>>
2015年10月19日作业
查看>>
Skia深入分析10——Skia库的性能与优化潜力
查看>>
PYTHON 文件操作
查看>>
Python---生成器
查看>>
centos7上部署oVirt平台管理kvm
查看>>
网络存储 前序(存储基础) --iscsi
查看>>
mysql数据库
查看>>
mysql 存储过程的创建
查看>>
安卓学习UI组件-PopupWindow-弹出窗口
查看>>