public class AffineModel3D extends AbstractAffineModel3D<AffineModel3D> implements InvertibleBoundable
@article{SchaeferAl06, author = {Scott Schaefer and Travis McPhail and Joe Warren}, title = {Image deformation using moving least squares}, journal = {ACM Transactions on Graphics}, volume = {25}, number = {3}, year = {2006}, pages = {533--540}, publisher = {ACM}, address = {New York, NY, USA}, url = {http://faculty.cs.tamu.edu/schaefer/research/mls.pdf}, }
Modifier and Type | Field and Description |
---|---|
protected double |
i00 |
protected double |
i01 |
protected double |
i02 |
protected double |
i03 |
protected double |
i10 |
protected double |
i11 |
protected double |
i12 |
protected double |
i13 |
protected double |
i20 |
protected double |
i21 |
protected double |
i22 |
protected double |
i23 |
protected boolean |
isInvertible |
protected double |
m00 |
protected double |
m01 |
protected double |
m02 |
protected double |
m03 |
protected double |
m10 |
protected double |
m11 |
protected double |
m12 |
protected double |
m13 |
protected double |
m20 |
protected double |
m21 |
protected double |
m22 |
protected double |
m23 |
protected static int |
MIN_NUM_MATCHES |
cost, rnd
Constructor and Description |
---|
AffineModel3D() |
Modifier and Type | Method and Description |
---|---|
double[] |
apply(double[] l)
Apply the
CoordinateTransform to a location. |
void |
applyInPlace(double[] l)
Apply the
CoordinateTransform to a location. |
double[] |
applyInverse(double[] l)
Apply the inverse of the model to a point location
|
void |
applyInverseInPlace(double[] l)
apply the inverse of the model to a point location
|
void |
concatenate(AffineModel3D model) |
void |
concatenate(TranslationModel3D model) |
AffineModel3D |
copy()
Clone the model.
|
AffineModel3D |
createInverse()
TODO Not yet tested
|
<P extends PointMatch> |
fit(Collection<P> matches)
Closed form weighted least squares solution as described by
\citet{SchaeferAl06}.
|
void |
fit(double[][] p,
double[][] q,
double[] w)
Closed form weighted least squares solution as described by
\citet{SchaeferAl06}.
|
void |
fit(float[][] p,
float[][] q,
float[] w)
Closed form weighted least squares solution as described by
\citet{SchaeferAl06}.
|
double[] |
getMatrix(double[] m) |
int |
getMinNumMatches() |
protected void |
invert() |
void |
preConcatenate(AffineModel3D model) |
void |
preConcatenate(TranslationModel3D model) |
void |
reset() |
void |
rotate(int axis,
double d)
Rotate
|
void |
set(AffineModel3D m)
Set the model to m
|
void |
set(double m00,
double m01,
double m02,
double m03,
double m10,
double m11,
double m12,
double m13,
double m20,
double m21,
double m22,
double m23)
Initialize the model such that the respective affine transform is:
|
void |
set(RigidModel3D m) |
void |
set(SimilarityModel3D m) |
void |
set(TranslationModel3D m) |
void |
toArray(double[] data)
Write the 12 parameters of the affine into a double array.
|
void |
toMatrix(double[][] data)
Write the 12 parameters of the affine into a 4x3 double array.
|
String |
toString() |
estimateBounds, estimateInverseBounds
betterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, test
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
estimateBounds
estimateInverseBounds
protected static final int MIN_NUM_MATCHES
protected double m00
protected double m01
protected double m02
protected double m03
protected double m10
protected double m11
protected double m12
protected double m13
protected double m20
protected double m21
protected double m22
protected double m23
protected double i00
protected double i01
protected double i02
protected double i03
protected double i10
protected double i11
protected double i12
protected double i13
protected double i20
protected double i21
protected double i22
protected double i23
protected boolean isInvertible
public double[] getMatrix(double[] m)
getMatrix
in class AbstractAffineModel3D<AffineModel3D>
public final int getMinNumMatches()
getMinNumMatches
in interface Model<AffineModel3D>
PointMatches
required
to solve the model.public final double[] apply(double[] l)
CoordinateTransform
CoordinateTransform
to a location.apply
in interface CoordinateTransform
public final void applyInPlace(double[] l)
CoordinateTransform
CoordinateTransform
to a location.applyInPlace
in interface CoordinateTransform
public final double[] applyInverse(double[] l) throws NoninvertibleModelException
InverseCoordinateTransform
applyInverse
in interface InverseCoordinateTransform
NoninvertibleModelException
public final void applyInverseInPlace(double[] l) throws NoninvertibleModelException
InverseCoordinateTransform
applyInverseInPlace
in interface InverseCoordinateTransform
NoninvertibleModelException
public final void fit(double[][] p, double[][] q, double[] w) throws NotEnoughDataPointsException, IllDefinedDataPointsException
fit
in interface Model<AffineModel3D>
fit
in class AbstractModel<AffineModel3D>
p
- source pointsq
- target pointsw
- weightsNotEnoughDataPointsException
- if not enough data points
were availableIllDefinedDataPointsException
- if the set of data points is
inappropriate to solve the Modelpublic final void fit(float[][] p, float[][] q, float[] w) throws NotEnoughDataPointsException, IllDefinedDataPointsException
fit
in interface Model<AffineModel3D>
fit
in class AbstractModel<AffineModel3D>
p
- source pointsq
- target pointsw
- weightsNotEnoughDataPointsException
- if not enough data points
were availableIllDefinedDataPointsException
- if the set of data points is
inappropriate to solve the Modelpublic final <P extends PointMatch> void fit(Collection<P> matches) throws NotEnoughDataPointsException, IllDefinedDataPointsException
fit
in interface Model<AffineModel3D>
matches
- set of point correpondencesNotEnoughDataPointsException
- if matches does not contain
enough data pointsIllDefinedDataPointsException
- if the set of data points is
inappropriate to solve the Modelpublic final void set(AffineModel3D m)
Model
set
in interface Model<AffineModel3D>
public final void reset()
public final void set(TranslationModel3D m)
public final void set(RigidModel3D m)
public final void set(SimilarityModel3D m)
public AffineModel3D copy()
Model
copy
in interface Model<AffineModel3D>
protected void invert()
public final void preConcatenate(AffineModel3D model)
preConcatenate
in interface Affine3D<AffineModel3D>
public final void concatenate(AffineModel3D model)
concatenate
in interface Affine3D<AffineModel3D>
public final void concatenate(TranslationModel3D model)
public final void preConcatenate(TranslationModel3D model)
public final void set(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23)
m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 0 0 0 1
m00
- m01
- m02
- m03
- m10
- m11
- m12
- m13
- m20
- m21
- m22
- m23
- public AffineModel3D createInverse()
createInverse
in interface Affine3D<AffineModel3D>
createInverse
in interface InvertibleCoordinateTransform
public void rotate(int axis, double d)
axis
- 0=x, 1=y, 2=zd
- angle in radians
TODO Don't be lazy and do it directly on the values instead of creating another transformpublic void toArray(double[] data)
Affine3D
toArray
in interface Affine3D<AffineModel3D>
public void toMatrix(double[][] data)
Affine3D
[0][0] -> m00; [0][1] -> m01; [0][2] -> m02; [0][3] -> m03
[1][0] -> m10; [1][1] -> m11; [1][2] -> m12; [1][3] -> m13
[2][0] -> m20; [2][1] -> m21; [2][2] -> m22; [2][3] -> m23
toMatrix
in interface Affine3D<AffineModel3D>
Copyright © 2015–2021 Fiji. All rights reserved.