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, test
protected 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)
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)
InverseCoordinateTransform
applyInverse
in interface InverseCoordinateTransform
public final void applyInverseInPlace(double[] l)
InverseCoordinateTransform
applyInverseInPlace
in interface InverseCoordinateTransform
public final void fit(double[][] p, double[][] q, double[] w)
AbstractModel
Model.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)
AbstractModel
Model.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)
Model
Model
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()
Model
copy
in interface Model<IdentityModel>
public final void set(IdentityModel m)
Model
set
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 InvertibleCoordinateTransform
public void toArray(double[] data)
Affine1D
toArray
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()
Affine2D
AffineTransform
representing the current parameters
the model.createAffine
in interface Affine2D<IdentityModel>
AffineTransform
public AffineTransform createInverseAffine()
Affine2D
AffineTransform
representing the inverse of the
current parameters of the model.createInverseAffine
in interface Affine2D<IdentityModel>
AffineTransform
public void estimateBounds(double[] min, double[] max)
Boundable
estimateBounds
in interface Boundable
public void estimateInverseBounds(double[] min, double[] max)
InverseBoundable
estimateInverseBounds
in interface InverseBoundable
Copyright © 2015–2021 Fiji. All rights reserved.