title: C++ plane interpolation from a set of points
body: <p>I am programming in C++ with the PCL, point cloud, library.</p>
  
  <p>My problem is: computing the variance of some of the points but only with respect to the perpendicular axis with respect to the plane. I will explain myself:</p>
  
  <p>So what I am doing is dividing the point cloud into segments by surface smoothness (with <a href="http://pointclouds.org/documentation/tutorials/region_growing_segmentation.php" rel="nofollow noreferrer">region growing segmentation</a>). For each segment I would like to have a measurement of how accurate the surface is, and I thougth the best way was to compute the plane that best fits the points in the surface and then basically compute the variance of the points with respect to the plane (distance from the point to the plane, etc).
  So I know there exists the quadratic or spline interpolation in 3D, but I am not so good at it and I thougth there should be a library that aldready performs it. However most of the ones I found do not compute/return the plane equation, so I am not so sure how to do it.</p>
  
  <p>Any help is appreciated, cheers.</p>