public class Quadric extends AbstractUnaryFunctionOp<Collection<org.joml.Vector3d>,org.joml.Matrix4d> implements Ops.Stats.LeastSquares, Contingent
The op first solves the quadric that best fits the point cloud by minimising the distance by least squares fitting. It's found by solving a polynomial - the general equation of a quadric. There are no guarantees about the type of the quadric solved, and it can be real or imaginary. The method is sensitive to outlier points.
The op is based on the the implementations of Yury Petrov & KalebKE.
SpecialOp.Flavor
Modifier and Type | Field and Description |
---|---|
static int |
MIN_DATA
Minimum number of points in the input collection needed to fit a quadric
equation.
|
NAME
Constructor and Description |
---|
Quadric() |
Modifier and Type | Method and Description |
---|---|
org.joml.Matrix4d |
calculate(Collection<org.joml.Vector3d> points)
Calculates the output given some input.
|
boolean |
conforms()
True if the contingency holds; i.e., the current circumstances conform to
the contingency's requirements.
|
in, out, run, setInput
ops, setEnvironment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ops, setEnvironment
calculate, getIndependentInstance, run
run
candidates, filterArity, op
initialize
public static final int MIN_DATA
public org.joml.Matrix4d calculate(Collection<org.joml.Vector3d> points)
UnaryFunctionOp
calculate
in interface UnaryFunctionOp<Collection<org.joml.Vector3d>,org.joml.Matrix4d>
points
- Argument to the functionpublic boolean conforms()
Contingent
conforms
in interface Contingent
Copyright © 2014–2022 ImageJ. All rights reserved.