PCL 采样一致性模型介绍

采样一致性可以简单高效的检测出一些具有数学表达式的目标模型。PCL中的sample consensus模块中不仅包含各种的采样一致性估计方法,也包含一些已经编写好的数学模型,下面主要介绍一下PCL中的采样一致性模型。

1. 二维圆模型

pcl::SampleConsensusModelCircle2D< PointT > Class Template Reference

定义了在 X-Y 平面上进行 2D 圆分割的模型。包含圆心和半径三个参数。

1.1模型系数

模型系数定义为:

  • center.x : 圆心的 X 坐标
  • center.y : 圆心的 Y 坐标
  • radius : 圆的半径

1.2 源码

   // Center (x, y)
   model_coefficients[0] = static_cast<float> ((m[0] * u[0] -  m[1] * v[0]  - uvdif[1] )             / (m[0] - m[1]));
   model_coefficients[1] = static_cast<float> ((m[0] * m[1] * uvdif[0] +  m[0] * v[1] - m[1] * u[1]) / (m[0] - m[1]));
  
   // Radius
   model_coefficients[2] = static_cast<float> (sqrt ((model_coefficients[0] - p0[0]) * (model_coefficients[0] - p0[0]) +
                                                     (model_coefficients[1] - p0[1]) * (model_coefficients[1] - p0[1])));
   PCL_DEBUG ("[pcl::SampleConsensusModelCircle2D::computeModelCoefficients] Model is (%g,%g,%g).\n",
              model_coefficients[0], model_coefficients[1], model_coefficients[2]);

1.3 PCL代码实现

PCL RANSAC拟合二维圆_点云侠的博客-CSDN博客_ransac圆拟合
​blog.csdn.net/qq_36686437/article/details/121962098

2. 三维圆模型

pcl::SampleConsensusModelCircle3D< PointT > Class Template Reference

定义了一个用于 3D 圆分割的模型。

2.1 模型系数

模型系数定义为:

  • center.x : 圆心的 X 坐标
  • center.y : 圆心的 Y 坐标
  • center.z : 圆心的 Z 坐标
  • radius : 圆的半径
  • normal.x : 法线方向的 X 坐标
  • normal.y : 法线方向的 Y 坐标
  • normal.z : 法线方向的 Z 坐标

2.2 源码

 Eigen::Vector3d common_helper_vec = helper_vec01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值