public class IdentityModel extends AbstractModel<IdentityModel> implements Affine1D<IdentityModel>, Affine2D<IdentityModel>, Affine3D<IdentityModel>, InvertibleBoundable
AbstractModel.| Modifier and Type | Field and Description |
|---|---|
protected static int |
MIN_NUM_MATCHES |
cost, rnd| Constructor and Description |
|---|
IdentityModel() |
| 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(IdentityModel m) |
IdentityModel |
copy()
Clone the model.
|
AffineTransform |
createAffine()
Create an
AffineTransform representing the current parameters
the model. |
IdentityModel |
createInverse()
TODO Not yet tested
|
AffineTransform |
createInverseAffine()
Create an
AffineTransform representing the inverse of the
current parameters of the model. |
void |
estimateBounds(double[] min,
double[] max)
Estimate the bounds of an n-dimensional interval [min,max] with min and
max being n-dimensional vectors.
|
void |
estimateInverseBounds(double[] min,
double[] max)
Estimate the bounds of an n-dimensional interval [min,max] with min and
max being n-dimensional vectors.
|
<P extends PointMatch> |
fit(Collection<P> matches)
Fit the
Model to a set of data points minimizing the global
transfer error. |
void |
fit(double[][] p,
double[][] q,
double[] w)
Default fit implementation using
Model.fit(Collection). |
void |
fit(float[][] p,
float[][] q,
float[] w)
Default fit implementation using
Model.fit(Collection). |
int |
getMinNumMatches() |
void |
preConcatenate(IdentityModel m) |
void |
set(IdentityModel m)
Set the model to m
|
void |
toArray(double[] data)
Write the 2 parameters of the affine into a double array.
|
void |
toMatrix(double[][] data)
Write the 2 parameters of the affine into a 2x1 double array.
|
betterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, testprotected static final int MIN_NUM_MATCHES
public int getMinNumMatches()
getMinNumMatches in interface Model<IdentityModel>PointMatches required
to solve the model.public final double[] apply(double[] l)
CoordinateTransformCoordinateTransform to a location.apply in interface CoordinateTransformpublic final void applyInPlace(double[] l)
CoordinateTransformCoordinateTransform to a location.applyInPlace in interface CoordinateTransformpublic final double[] applyInverse(double[] l)
InverseCoordinateTransformapplyInverse in interface InverseCoordinateTransformpublic final void applyInverseInPlace(double[] l)
InverseCoordinateTransformapplyInverseInPlace in interface InverseCoordinateTransformpublic final void fit(double[][] p,
double[][] q,
double[] w)
AbstractModelModel.fit(Collection). This foils
the intention that AbstractModel.fit(double[][], double[][], double[]) would be
potentially more efficient. You should better implement it directly.fit in interface Model<IdentityModel>fit in class AbstractModel<IdentityModel>p - source pointsq - target pointsw - weightspublic final void fit(float[][] p,
float[][] q,
float[] w)
AbstractModelModel.fit(Collection). This foils
the intention that AbstractModel.fit(float[][], float[][], float[]) would be
potentially more efficient. You should better implement it directly.fit in interface Model<IdentityModel>fit in class AbstractModel<IdentityModel>p - source pointsq - target pointsw - weightspublic final <P extends PointMatch> void fit(Collection<P> matches)
ModelModel to a set of data points minimizing the global
transfer error. This is assumed to be implemented as a weighted least
squares minimization. Use ransac
and/ or Model.filter(java.util.Collection<P>, java.util.Collection<P>, double, int) to remove outliers from your data points.
The estimated model transfers match.p1.local to match.p2.world.
fit in interface Model<IdentityModel>matches - set of point correpondencespublic IdentityModel copy()
Modelcopy in interface Model<IdentityModel>public final void set(IdentityModel m)
Modelset in interface Model<IdentityModel>public final void preConcatenate(IdentityModel m)
preConcatenate in interface Affine1D<IdentityModel>preConcatenate in interface Affine2D<IdentityModel>preConcatenate in interface Affine3D<IdentityModel>public final void concatenate(IdentityModel m)
concatenate in interface Affine1D<IdentityModel>concatenate in interface Affine2D<IdentityModel>concatenate in interface Affine3D<IdentityModel>public IdentityModel createInverse()
createInverse in interface Affine1D<IdentityModel>createInverse in interface Affine2D<IdentityModel>createInverse in interface Affine3D<IdentityModel>createInverse in interface InvertibleCoordinateTransformpublic void toArray(double[] data)
Affine1DtoArray in interface Affine1D<IdentityModel>toArray in interface Affine2D<IdentityModel>toArray in interface Affine3D<IdentityModel>public void toMatrix(double[][] data)
Affine1D[0][0] -> m00; [0][1] -> m01;
toMatrix in interface Affine1D<IdentityModel>toMatrix in interface Affine2D<IdentityModel>toMatrix in interface Affine3D<IdentityModel>public AffineTransform createAffine()
Affine2DAffineTransform representing the current parameters
the model.createAffine in interface Affine2D<IdentityModel>AffineTransformpublic AffineTransform createInverseAffine()
Affine2DAffineTransform representing the inverse of the
current parameters of the model.createInverseAffine in interface Affine2D<IdentityModel>AffineTransformpublic void estimateBounds(double[] min,
double[] max)
BoundableestimateBounds in interface Boundablepublic void estimateInverseBounds(double[] min,
double[] max)
InverseBoundableestimateInverseBounds in interface InverseBoundableCopyright © 2015–2021 Fiji. All rights reserved.