public class AffineModel2D extends AbstractAffineModel2D<AffineModel2D>
@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 |
i10 |
protected double |
i11 |
protected double |
i12 |
protected double |
m00 |
protected double |
m01 |
protected double |
m02 |
protected double |
m10 |
protected double |
m11 |
protected double |
m12 |
protected static int |
MIN_NUM_MATCHES |
cost, rnd
Constructor and Description |
---|
AffineModel2D() |
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(AffineModel2D model) |
void |
concatenate(TranslationModel2D model) |
AffineModel2D |
copy()
Clone the model.
|
AffineTransform |
createAffine()
Create an
AffineTransform representing the current parameters
the model. |
AffineModel2D |
createInverse()
TODO Not yet tested
|
AffineTransform |
createInverseAffine()
Create an
AffineTransform representing the inverse of the
current parameters of the model. |
<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}.
|
int |
getMinNumMatches() |
protected void |
invert() |
void |
preConcatenate(AffineModel2D model) |
void |
preConcatenate(TranslationModel2D model) |
void |
reset() |
void |
set(AffineModel2D m)
Set the model to m
|
void |
set(AffineTransform a)
Initialize the model with the parameters of an
AffineTransform . |
void |
set(double m00,
double m10,
double m01,
double m11,
double m02,
double m12)
Initialize the model such that the respective affine transform is:
m00 m01 m02
m10 m11 m12
0 0 1
|
void |
set(RigidModel2D m) |
void |
set(SimilarityModel2D m) |
void |
set(TranslationModel2D m) |
void |
toArray(double[] data)
Write the 6 parameters of the affine into a double array.
|
void |
toMatrix(double[][] data)
Write the 6 parameters of the affine into a 3x2 double array.
|
estimateBounds, estimateInverseBounds, toString
betterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, test
protected static final int MIN_NUM_MATCHES
protected double m00
protected double m10
protected double m01
protected double m11
protected double m02
protected double m12
protected double i00
protected double i10
protected double i01
protected double i11
protected double i02
protected double i12
public final int getMinNumMatches()
PointMatches
required
to solve the model.public final AffineTransform createAffine()
AbstractAffineModel2D
AffineTransform
representing the current parameters
the model.createAffine
in interface Affine2D<AffineModel2D>
createAffine
in class AbstractAffineModel2D<AffineModel2D>
AffineTransform
public final AffineTransform createInverseAffine()
AbstractAffineModel2D
AffineTransform
representing the inverse of the
current parameters of the model.createInverseAffine
in interface Affine2D<AffineModel2D>
createInverseAffine
in class AbstractAffineModel2D<AffineModel2D>
AffineTransform
public final double[] apply(double[] l)
CoordinateTransform
CoordinateTransform
to a location.public final void applyInPlace(double[] l)
CoordinateTransform
CoordinateTransform
to a location.public final double[] applyInverse(double[] l) throws NoninvertibleModelException
InverseCoordinateTransform
NoninvertibleModelException
public final void applyInverseInPlace(double[] l) throws NoninvertibleModelException
InverseCoordinateTransform
NoninvertibleModelException
public final void fit(double[][] p, double[][] q, double[] w) throws NotEnoughDataPointsException, IllDefinedDataPointsException
fit
in interface Model<AffineModel2D>
fit
in class AbstractModel<AffineModel2D>
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<AffineModel2D>
fit
in class AbstractModel<AffineModel2D>
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
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(AffineModel2D m)
Model
public final void reset()
public final void set(TranslationModel2D m)
public final void set(RigidModel2D m)
public final void set(SimilarityModel2D m)
public AffineModel2D copy()
Model
protected final void invert()
public final void preConcatenate(AffineModel2D model)
preConcatenate
in interface Affine2D<AffineModel2D>
preConcatenate
in class AbstractAffineModel2D<AffineModel2D>
public final void concatenate(TranslationModel2D model)
public final void preConcatenate(TranslationModel2D model)
public final void concatenate(AffineModel2D model)
concatenate
in interface Affine2D<AffineModel2D>
concatenate
in class AbstractAffineModel2D<AffineModel2D>
public final void set(double m00, double m10, double m01, double m11, double m02, double m12)
m00
- m10
- m01
- m11
- m02
- m12
- public final void set(AffineTransform a)
AffineTransform
.a
- public AffineModel2D createInverse()
createInverse
in interface Affine2D<AffineModel2D>
createInverse
in interface InvertibleCoordinateTransform
createInverse
in class AbstractAffineModel2D<AffineModel2D>
public void toArray(double[] data)
Affine2D
public void toMatrix(double[][] data)
Affine2D
[0][0] -> m00; [0][1] -> m01; [0][2] -> m02;
[1][0] -> m10; [1][1] -> m11; [1][2] -> m12;
Copyright © 2015–2021 Fiji. All rights reserved.