public class SimilarityModel2D extends AbstractAffineModel2D<SimilarityModel2D>
@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 static int |
MIN_NUM_MATCHES |
protected double |
scos |
protected double |
ssin |
protected double |
tx |
protected double |
ty |
cost, rnd| Constructor and Description |
|---|
SimilarityModel2D() |
| 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(SimilarityModel2D model) |
SimilarityModel2D |
copy()
Clone the model.
|
AffineTransform |
createAffine()
Create an
AffineTransform representing the current parameters
the model. |
SimilarityModel2D |
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} and implemented by Johannes Schindelin.
|
void |
fit(double[][] p,
double[][] q,
double[] w)
Closed form weighted least squares solution as described by
\citet{SchaeferAl06} and implemented by Johannes Schindelin.
|
void |
fit(float[][] p,
float[][] q,
float[] w)
Closed form weighted least squares solution as described by
\citet{SchaeferAl06} and implemented by Johannes Schindelin.
|
int |
getMinNumMatches() |
protected void |
invert() |
void |
preConcatenate(SimilarityModel2D model) |
void |
reset() |
void |
set(double scos,
double ssin,
double tx,
double ty)
Initialize the model such that the respective affine transform is:
|
void |
set(RigidModel2D m) |
void |
set(SimilarityModel2D m)
Set the model to m
|
void |
set(TranslationModel2D m) |
void |
setScaleRotationTranslation(double s,
double theta,
double tx,
double ty)
Initialize the model such that the respective affine transform is:
|
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, toStringbetterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, testprotected static final int MIN_NUM_MATCHES
protected double scos
protected double ssin
protected double tx
protected double ty
public final int getMinNumMatches()
PointMatches required
to solve the model.public final AffineTransform createAffine()
AbstractAffineModel2DAffineTransform representing the current parameters
the model.createAffine in interface Affine2D<SimilarityModel2D>createAffine in class AbstractAffineModel2D<SimilarityModel2D>AffineTransformpublic final AffineTransform createInverseAffine()
AbstractAffineModel2DAffineTransform representing the inverse of the
current parameters of the model.createInverseAffine in interface Affine2D<SimilarityModel2D>createInverseAffine in class AbstractAffineModel2D<SimilarityModel2D>AffineTransformpublic final double[] apply(double[] l)
CoordinateTransformCoordinateTransform to a location.public final void applyInPlace(double[] l)
CoordinateTransformCoordinateTransform to a location.public final double[] applyInverse(double[] l)
InverseCoordinateTransformpublic final void applyInverseInPlace(double[] l)
InverseCoordinateTransformpublic final void fit(double[][] p,
double[][] q,
double[] w)
throws NotEnoughDataPointsException
fit in interface Model<SimilarityModel2D>fit in class AbstractModel<SimilarityModel2D>p - source pointsq - target pointsw - weightsNotEnoughDataPointsException - if not enough data points
were availablepublic final void fit(float[][] p,
float[][] q,
float[] w)
throws NotEnoughDataPointsException
fit in interface Model<SimilarityModel2D>fit in class AbstractModel<SimilarityModel2D>p - source pointsq - target pointsw - weightsNotEnoughDataPointsException - if not enough data points
were availablepublic final <P extends PointMatch> void fit(Collection<P> matches) throws NotEnoughDataPointsException
matches - set of point correpondencesNotEnoughDataPointsException - if matches does not contain
enough data pointspublic SimilarityModel2D copy()
Modelpublic final void set(SimilarityModel2D m)
Modelpublic final void reset()
public final void set(TranslationModel2D m)
public final void set(RigidModel2D m)
protected final void invert()
public final void preConcatenate(SimilarityModel2D model)
preConcatenate in interface Affine2D<SimilarityModel2D>preConcatenate in class AbstractAffineModel2D<SimilarityModel2D>public final void concatenate(SimilarityModel2D model)
concatenate in interface Affine2D<SimilarityModel2D>concatenate in class AbstractAffineModel2D<SimilarityModel2D>public final void setScaleRotationTranslation(double s,
double theta,
double tx,
double ty)
s * cos(θ) -sin(θ) tx sin(θ) s * cos(θ) ty 0 0 1
theta - θ in radianstx - ty - public final void set(double scos,
double ssin,
double tx,
double ty)
scos -sin tx sin scos ty 0 0 1
scos - ssin - tx - ty - public SimilarityModel2D createInverse()
createInverse in interface Affine2D<SimilarityModel2D>createInverse in interface InvertibleCoordinateTransformcreateInverse in class AbstractAffineModel2D<SimilarityModel2D>public void toArray(double[] data)
Affine2Dpublic 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.