public final class FitEllipsoid extends Object
Modifier and Type | Method and Description |
---|---|
static double[][] |
testEllipsoid(double a,
double b,
double c,
double angle,
double xCentre,
double yCentre,
double zCentre,
double noise,
int nPoints,
boolean random)
Return points on an ellipsoid with optional noise.
|
static Object[] |
yuryPetrov(double[][] points)
Ellipsoid fitting method by Yury Petrov.
|
public static double[][] testEllipsoid(double a, double b, double c, double angle, double xCentre, double yCentre, double zCentre, double noise, int nPoints, boolean random)
a
- First axis lengthb
- Second axis lengthc
- Third axis lengthangle
- angle of axis (rad)xCentre
- x coordinate of centreyCentre
- y coordinate of centrezCentre
- z coordinate of centrenoise
- Intensity of noise to add to the pointsnPoints
- number of points to generaterandom
- if true, use a random grid to generate points, else use a
regular gridpublic static Object[] yuryPetrov(double[][] points)
Fits an ellipsoid in the form Ax2 + By 2 + Cz2 + 2Dxy + 2Exz + 2 Fyz + 2Gx + 2Hy + 2Iz = 1 To an n * 3 array of coordinates.
See MATLAB script
points
- array[n][3] where n > 8IllegalArgumentException
- if number of coordinates is less than 9 or
if ellipsoid matrix is not positive definite (i.e. the fitted function is
one of the other quadrics).Copyright © 2018–2022 BoneJ. All rights reserved.