public class RigidModel2D extends AbstractAffineModel2D<RigidModel2D>
@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 |
cos |
protected double |
itx |
protected double |
ity |
protected static int |
MIN_NUM_MATCHES |
protected double |
sin |
protected double |
tx |
protected double |
ty |
cost, rnd| Constructor and Description |
|---|
RigidModel2D() |
| 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(RigidModel2D model) |
RigidModel2D |
copy()
Clone the model.
|
AffineTransform |
createAffine()
Create an
AffineTransform representing the current parameters
the model. |
RigidModel2D |
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() |
void |
preConcatenate(RigidModel2D model) |
void |
reset() |
void |
set(double theta,
double tx,
double ty)
Initialize the model such that the respective affine transform is:
cos(θ) -sin(θ) tx
sin(θ) cos(θ) ty
0 0 1
|
void |
set(double cos,
double sin,
double tx,
double ty)
Initialize the model such that the respective affine transform is:
cos -sin tx
sin cos ty
0 0 1
|
void |
set(RigidModel2D m)
Set the model to 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, toStringbetterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, testprotected static final int MIN_NUM_MATCHES
protected double cos
protected double sin
protected double tx
protected double ty
protected double itx
protected double ity
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<RigidModel2D>createAffine in class AbstractAffineModel2D<RigidModel2D>AffineTransformpublic final AffineTransform createInverseAffine()
AbstractAffineModel2DAffineTransform representing the inverse of the
current parameters of the model.createInverseAffine in interface Affine2D<RigidModel2D>createInverseAffine in class AbstractAffineModel2D<RigidModel2D>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<RigidModel2D>fit in class AbstractModel<RigidModel2D>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<RigidModel2D>fit in class AbstractModel<RigidModel2D>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 RigidModel2D copy()
Modelpublic final void set(RigidModel2D m)
Modelpublic final void reset()
public final void set(TranslationModel2D m)
public final void preConcatenate(RigidModel2D model)
preConcatenate in interface Affine2D<RigidModel2D>preConcatenate in class AbstractAffineModel2D<RigidModel2D>public final void concatenate(RigidModel2D model)
concatenate in interface Affine2D<RigidModel2D>concatenate in class AbstractAffineModel2D<RigidModel2D>public final void set(double theta,
double tx,
double ty)
theta - θtx - ty - public final void set(double cos,
double sin,
double tx,
double ty)
cos - sin - tx - ty - public RigidModel2D createInverse()
createInverse in interface Affine2D<RigidModel2D>createInverse in interface InvertibleCoordinateTransformcreateInverse in class AbstractAffineModel2D<RigidModel2D>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.