RANSAC平面拟合系数 [英] RANSAC plane fitting coefficients

查看:561
本文介绍了RANSAC平面拟合系数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使飞机适应一组点云.我尝试使用点云库(PCL)和它运作良好.我需要知道的是如何获得拟合平面的系数a,b,c(ax + by + cz + 1 = 0).有什么简单的方法吗?我从这里得到了一些见解: 3D最小二乘平面

I am trying to fit a plane to a set of point cloud. I tried using Point Cloud Library (PCL) & it works well. What I need to know is that how can I obtain the coefficients a,b,c of the fitted plane (ax+by+cz+1=0). Is there any straightforward way? I got some insights from here: 3D Least Squares Plane

推荐答案

请参阅以下平面分割教程:

See the following planar segmentation tutorial:

http://pointclouds.org/documentation/tutorials/planar_segmentation.php

请特别注意pcl::ModelCoefficients数据结构的使用.

Note in particular the use of the pcl::ModelCoefficients data structure.

分配:

pcl::ModelCoefficients::Ptr coefficients (new pcl::ModelCoefficients);

使用:

seg.segment (*inliers, *coefficients);

含义:

coefficients->values[0]/coefficients->values[3]是您的 a .

coefficients->values[1]/coefficients->values[3]是您的 b .

coefficients->values[2]/coefficients->values[3]是您的 c .

另请参阅:

http://docs.pointclouds.org/1.7.0/structpcl_1_1_model_coefficients.html

这篇关于RANSAC平面拟合系数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆