java.lang.Object
org.jeometry.geom3D.algorithm.fitting.PlaneFitting

public class PlaneFitting
extends Object
Compute a plane from a set of 3D points using a Linear Least Square based method. The method works as follows:

Let a plane defined by C + X × N = 0 where:
  • C is the center of the plane.
  • N is the normal vector to the plane.
  • X is a 3D point that lies on the plane.
Let P a 3D point, the expression of P within plane coordinate can be written:

P = C + μN + pN

Where:
  • μ is the distance from the point to the plane.
  • N is a 2-by-3 matrix representing the perpendicular to the plane's normal.
  • p is a 2-vector of co-factors.
Finding a place from a set of points can be assimilated to the minimization of the quantity E defined such as:

E = Σ(μ2, points)

Source: http://missingbytes.blogspot.com/2012/06/fitting-plane-to-point-cloud.html
Since:
1.0.0
Version:
"1.0.5"
Author:
Julien Seinturier - COMEX S.A. - contact@jorigin.org - https://github.com/jorigin/jeometry
  • Constructor Details

    • PlaneFitting

      public PlaneFitting()
  • Method Details

    • fit

      public static Plane<Point3D> fit​(Point3DContainer<?> points, double iterationMax, double limit)
      Fit a plane from a set of set of 3D points using a Linear Least Square based method.
      Parameters:
      points - the input points (at least 3 points are needed.)
      iterationMax - the maximum number of iterations durint the LEast Square computation
      limit - the numerical limit under which a distance is considered as 0
      Returns:
      The fitted plane or null if no plane can be fitted.