public class TranslationModel1D extends AbstractAffineModel1D<TranslationModel1D>
AbstractModel to be applied to points in 1d-space.| Modifier and Type | Field and Description |
|---|---|
protected static int |
MIN_NUM_MATCHES |
protected double |
t |
cost, rnd| Constructor and Description |
|---|
TranslationModel1D() |
| 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(TranslationModel1D m) |
TranslationModel1D |
copy()
Clone the model.
|
TranslationModel1D |
createInverse()
TODO Not yet tested
|
<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). |
double[] |
getMatrix(double[] m) |
int |
getMinNumMatches() |
double |
getTranslation() |
void |
preConcatenate(TranslationModel1D m) |
void |
set(double t)
Initialize the model with an offset
|
void |
set(TranslationModel1D 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.
|
estimateBounds, estimateInverseBoundsbetterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, testprotected static final int MIN_NUM_MATCHES
protected double t
public final double getTranslation()
public final int getMinNumMatches()
PointMatches required
to solve the model.public 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
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<TranslationModel1D>fit in class AbstractModel<TranslationModel1D>p - source pointsq - target pointsw - weightsNotEnoughDataPointsException - if not enough data points
were availablepublic final void fit(float[][] p,
float[][] q,
float[] w)
throws NotEnoughDataPointsException
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<TranslationModel1D>fit in class AbstractModel<TranslationModel1D>p - source pointsq - target pointsw - weightsNotEnoughDataPointsException - if not enough data points
were availablepublic final <P extends PointMatch> void fit(Collection<P> matches) throws NotEnoughDataPointsException
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.
matches - set of point correpondencesNotEnoughDataPointsException - if matches does not contain
enough data pointspublic TranslationModel1D copy()
Modelpublic final void set(TranslationModel1D m)
Modelpublic final void preConcatenate(TranslationModel1D m)
public final void concatenate(TranslationModel1D m)
public final void set(double t)
t - public TranslationModel1D createInverse()
public void toArray(double[] data)
Affine1Dpublic void toMatrix(double[][] data)
Affine1D[0][0] -> m00; [0][1] -> m01;
public double[] getMatrix(double[] m)
getMatrix in class AbstractAffineModel1D<TranslationModel1D>Copyright © 2015–2021 Fiji. All rights reserved.