本文介绍了从OpenCV中的3D点进行平面构造的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从OpenCV中的3D点列表构建平面.我想通过以下形式找到四个参数来获得结果:Ax+By+Cz+D = 0.有人会建议我这样做吗?

I would like to construct a plane from a list of 3D points in OpenCV. I would like to obtain the result by finding the four parameters in the following form: Ax+By+Cz+D = 0. Would anyone suggest me a way to do it?

推荐答案

如果数据不包含离群值并且不包含多个平面.此外,所有点都精确地位于一个平面上(数据不嘈杂),它是如此简单:

If the data does not contain outliers and does not contain more than one plane. Furthermore, all the points lay exactly on a plane (the data is not noisy), it is so simple:

  1. 拾取三个不在同一条线上的随机点.
  2. 求解此线性方程组:
x1+by1+cz1+d = 0
x2+by2+cz2+d = 0
x3+by3+cz3+d = 0

然后:

A= Choose any number you want in order to match your scale.
B= b*A
C= c*A
D= d*A

如果数据嘈杂或包含离群值或超过平面(或两者兼有),则需要某种鲁棒估计技术.首先搜索RANSAC.

If the data is noisy or contains outliers or more than plane (or both) you need then some kind of Robust Estimation techniques. Search for RANSAC as a start.

如果您熟悉RANSAC,可以在此处查看此示例关于线条,您可以简单地将其通用化以处理平面)

if you are familar with RANSAC you can see this example here (it is about lines you can simply generlize it to deal with plane)

这篇关于从OpenCV中的3D点进行平面构造的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 00:39