public class EllipseUtilities extends Object
| Constructor and Description |
|---|
EllipseUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static Ellipse |
ellipseFromCovariance(float x,
float y,
Jama.Matrix sm,
float sf)
Construct ellipse from covariance matrix, scale-factor and centroid.
|
static Ellipse |
ellipseFromEquation(double centerX,
double centerY,
double major,
double minor,
double rotation)
Construct an ellipse using a parametric ellipse equation, namely:
X(t) = centerX + major * cos(t) * cos(rotation) - minor * sin(t) *
sin(rotation) Y(t) = centerY + major * cos(t) * cos(rotation) + minor *
sin(t) * sin(rotation)
|
static Ellipse |
ellipseFromGaussian(MultivariateGaussian gaussian,
float scale)
Construct an ellipse that encompasses the shape of a
CachingMultivariateGaussian. |
static Ellipse |
ellipseFromSecondMoments(float x,
float y,
Jama.Matrix secondMoments)
Construct ellipse from second moment matrix and centroid.
|
static Ellipse |
ellipseFromSecondMoments(float x,
float y,
Jama.Matrix secondMoments,
double scaleFactor)
Construct ellipse from second moment matrix, scale-factor and centroid.
|
static Jama.Matrix |
ellipseToCovariance(Ellipse e)
Create the covariance matrix of an ellipse.
|
static Ellipse |
fromTransformMatrix2x2(Jama.Matrix U,
float x,
float y,
float scale)
Create an ellipse.
|
public EllipseUtilities()
public static Ellipse ellipseFromEquation(double centerX, double centerY, double major, double minor, double rotation)
centerX - centerY - major - minor - rotation - public static Ellipse ellipseFromSecondMoments(float x, float y, Jama.Matrix secondMoments)
x - x-ordinate of centroidy - y-ordinate of centroidsecondMoments - second moments matrixpublic static Ellipse ellipseFromSecondMoments(float x, float y, Jama.Matrix secondMoments, double scaleFactor)
x - x-ordinate of centroidy - y-ordinate of centroidsecondMoments - second moments matrixscaleFactor - the scale factorpublic static Ellipse ellipseFromCovariance(float x, float y, Jama.Matrix sm, float sf)
x - x-ordinate of centroidy - y-ordinate of centroidsm - covariance matrixsf - scale-factorpublic static Jama.Matrix ellipseToCovariance(Ellipse e)
e - the ellipsepublic static Ellipse fromTransformMatrix2x2(Jama.Matrix U, float x, float y, float scale)
U - x - y - scale - public static Ellipse ellipseFromGaussian(MultivariateGaussian gaussian, float scale)
CachingMultivariateGaussian.gaussian - the CachingMultivariateGaussianscale - the relative size of the ellipse