|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.geometry.CPD
public class CPD
Field Summary | |
---|---|
static int |
DEFAULT_MAX_ITERS
|
static boolean |
verbose
|
Constructor Summary | |
---|---|
CPD()
|
Method Summary | |
---|---|
static AffineTransform3d |
affine(Point3d[] X,
Point3d[] Y,
double w,
double tol,
int maxIters,
Point3d[] TY)
Uses the affine CPD algorithm to align a set of points |
static AffineTransform3d |
affine(Point3d[] X,
Point3d[] Y,
double w,
double tol,
int maxIters,
Point3d[] TY,
AffineTransform3d trans,
double[] sigma2Holder)
Uses the affine CPD algorithm to align a set of points |
static AffineTransform3d |
affine(PolygonalMesh meshRef,
PolygonalMesh meshReg,
double w,
double tol,
int maxIters)
Uses the affine CPD algorithm to align two meshes |
static void |
coherent(Point3d[] X,
Point3d[] Y,
double lambda,
double beta2,
double w,
double tol,
int maxIters,
Point3d[] TY)
Uses the coherent CPD algorithm to align a set of points |
static void |
coherent(Point3d[] X,
Point3d[] Y,
double lambda,
double beta2,
double w,
double tol,
int maxIters,
Point3d[] TY,
double[] sigma2Holder)
Uses the coherent CPD algorithm to align a set of points |
static void |
coherent(PolygonalMesh meshRef,
PolygonalMesh meshReg,
double lambda,
double beta2,
double w,
double tol,
int maxIters,
PolygonalMesh out)
Uses the coherent CPD algorithm to align two meshes |
static Point3d |
computeMean(Point3d[] pnts,
double[] P,
double Np,
Point3d mean)
Compute and return the weighted mean |
static double |
computeP(Point3d[] X,
Point3d[] TY,
double sigma2,
double w,
double[][] P,
double[] P1,
double[] Pt1)
Computes the CPD probability function P(m|n) |
static double |
computeQ(Point3d[] X,
Point3d[] TY,
double[][] P,
double Np,
double sigma2)
CPD Objective function |
static double |
computeVariance(Point3d[] X,
Point3d[] TY,
double[][] P,
double Np)
Estimates the CPD variance |
static ScaledRigidTransform3d |
rigid(Point3d[] X,
Point3d[] Y,
double w,
double tol,
int maxIters,
boolean allowScaling,
Point3d[] TY)
Uses the rigid CPD algorithm to align a set of points |
static ScaledRigidTransform3d |
rigid(Point3d[] X,
Point3d[] Y,
double w,
double tol,
int maxIters,
boolean allowScaling,
Point3d[] TY,
ScaledRigidTransform3d trans,
double[] sigma2Holder)
Uses the rigid CPD algorithm to align a set of points |
static ScaledRigidTransform3d |
rigid(PolygonalMesh meshRef,
PolygonalMesh meshReg,
double w,
double tol,
int maxIters,
boolean allowScaling)
Uses the rigid CPD algorithm to align two meshes |
static void |
transformPoints(Point3d[] Y,
AffineTransform3dBase trans,
Point3d[] TY)
Transforms a set of points |
static void |
transformPoints(Point3d[] Y,
double s,
Matrix3d R,
Vector3d t,
Point3d[] TY)
Transforms points based on rigid transform |
static void |
transformPoints(Point3d[] Y,
Matrix3d A,
Vector3d t,
Point3d[] TY)
Transforms points based on affine transform |
static void |
transformPoints(Point3d[] Y,
MatrixNd G,
MatrixNd W,
Point3d[] TY)
|
static void |
transformPoints(Point3d[] Y,
Point3d[] TY)
Transforms a set of points by identity (copies points) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int DEFAULT_MAX_ITERS
public static boolean verbose
Constructor Detail |
---|
public CPD()
Method Detail |
---|
public static ScaledRigidTransform3d rigid(Point3d[] X, Point3d[] Y, double w, double tol, int maxIters, boolean allowScaling, Point3d[] TY, ScaledRigidTransform3d trans, double[] sigma2Holder)
X
- reference input pointsY
- points to registerw
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsallowScaling
- whether or not to allow scalingTY
- transformed pointstrans
- initial guess of scaled rigid transformsigma2Holder
- initial guess of variance
public static double computeP(Point3d[] X, Point3d[] TY, double sigma2, double w, double[][] P, double[] P1, double[] Pt1)
X
- Input pointsTY
- Transformed output pointssigma2
- variancew
- weight to account for noise/outliersP
- MxN probability matrixP1
- Mx1 vector, P*1Pt1
- Nx1 vector, trans(P)*1
public static double computeQ(Point3d[] X, Point3d[] TY, double[][] P, double Np, double sigma2)
X
- reference pointsTY
- transformed input pointsP
- probability matrixNp
- sum of all probabilitiessigma2
- probability variance
public static void transformPoints(Point3d[] Y, double s, Matrix3d R, Vector3d t, Point3d[] TY)
Y
- input pointss
- scaleR
- rotationt
- translationTY
- transformed pointspublic static void transformPoints(Point3d[] Y, AffineTransform3dBase trans, Point3d[] TY)
Y
- input pointstrans
- transformTY
- transformed pointspublic static void transformPoints(Point3d[] Y, Point3d[] TY)
Y
- input pointsTY
- transformed pointspublic static void transformPoints(Point3d[] Y, Matrix3d A, Vector3d t, Point3d[] TY)
Y
- input pointsA
- affine transformt
- translationTY
- transformed pointspublic static void transformPoints(Point3d[] Y, MatrixNd G, MatrixNd W, Point3d[] TY)
public static double computeVariance(Point3d[] X, Point3d[] TY, double[][] P, double Np)
X
- N input pointsTY
- M transformed output pointsP
- probability matrix (if null, P(m,n) = 1/M)Np
- Total sum of entries in probability matrix
public static Point3d computeMean(Point3d[] pnts, double[] P, double Np, Point3d mean)
pnts
- set of pointsP
- vector of probabilitiesNp
- sum of probabilitiesmean
- mean to fill, if null, creates new
public static ScaledRigidTransform3d rigid(Point3d[] X, Point3d[] Y, double w, double tol, int maxIters, boolean allowScaling, Point3d[] TY)
X
- reference input pointsY
- points to registerw
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsallowScaling
- whether or not to allow scalingTY
- transformed points
public static ScaledRigidTransform3d rigid(PolygonalMesh meshRef, PolygonalMesh meshReg, double w, double tol, int maxIters, boolean allowScaling)
meshRef
- reference meshmeshReg
- mesh to registerw
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsallowScaling
- whether or not to allow scaling
public static AffineTransform3d affine(Point3d[] X, Point3d[] Y, double w, double tol, int maxIters, Point3d[] TY, AffineTransform3d trans, double[] sigma2Holder)
X
- reference input pointsY
- points to registerw
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsTY
- transformed pointstrans
- initial guess of scaled rigid transformsigma2Holder
- initial guess of variance
public static AffineTransform3d affine(Point3d[] X, Point3d[] Y, double w, double tol, int maxIters, Point3d[] TY)
X
- reference input pointsY
- points to registerw
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsTY
- transformed points
public static AffineTransform3d affine(PolygonalMesh meshRef, PolygonalMesh meshReg, double w, double tol, int maxIters)
meshRef
- reference meshmeshReg
- mesh to registerw
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterations
public static void coherent(Point3d[] X, Point3d[] Y, double lambda, double beta2, double w, double tol, int maxIters, Point3d[] TY, double[] sigma2Holder)
X
- reference input pointsY
- points to registerlambda
- weight factor for regularization term (> 0)beta2
- coherence factor, beta^2 (> 0)w
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsTY
- transformed pointssigma2Holder
- initial variance estimatepublic static void coherent(Point3d[] X, Point3d[] Y, double lambda, double beta2, double w, double tol, int maxIters, Point3d[] TY)
X
- reference input pointsY
- points to registerlambda
- weight factor for regularization term (> 0)beta2
- coherence factor, beta^2 (> 0)w
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsTY
- transformed pointspublic static void coherent(PolygonalMesh meshRef, PolygonalMesh meshReg, double lambda, double beta2, double w, double tol, int maxIters, PolygonalMesh out)
meshRef
- reference meshmeshReg
- mesh to registerlambda
- weight factor for regularization term (> 0)beta2
- coherence factor, beta^2 (> 0)w
- weight, accounting to noise (w=0 --> no noise)tol
- will iterative until objective function changes by less than thismaxIters
- maximum number of iterationsout
- transformed mesh
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |