public class ImageMoments extends Object
Constructor and Description |
---|
ImageMoments(cern.colt.matrix.DoubleMatrix2D matrixPoints,
boolean suppressZ,
boolean sortAscending)
Calculates the second-moments from the covariance of a matrix of points.
|
Modifier and Type | Method and Description |
---|---|
ImageMoments |
duplicate()
Creates a deep-copy of the current object.
|
EigenvalueAndVector |
get(int axis)
Get an eigenvalue and corresponding eigenvector for a particular axis.
|
double |
getMean(int axis)
Get the mean-value for a particular axis.
|
void |
removeClosestToUnitZ()
Removes the entry that is closest to having an eigenVector in direction (0,0,1).
|
public ImageMoments(cern.colt.matrix.DoubleMatrix2D matrixPoints, boolean suppressZ, boolean sortAscending)
Steps: 1. Constructs first and the second-moments matrix of some input points 2. Calculates an eigenvalue-decomposition of the second-moment matrix
matrixPoints
- a matrix where each row represents a point (n x 3) and each column an
axissuppressZ
- iff true the z-dimension is ignoredsortAscending
- if true, eigenValues are sorted in ascendingOrder, if false in
descending orderpublic EigenvalueAndVector get(int axis)
axis
- axis 0 for X, 1 for Y, 2 for Z.EigenvalueAndVector
as used internally.public double getMean(int axis)
axis
- 0 for X, 1 for Y, 2 for Z.public void removeClosestToUnitZ()
public ImageMoments duplicate()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.