public final class InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>> extends InvertibleInterpolatedModel<A,B,InterpolatedAffineModel1D<A,B>> implements Affine1D<InterpolatedAffineModel1D<A,B>>, InvertibleBoundable
InterpolatedModel. Implements
interpolation directly by linear matrix interpolation.
No multiple inheritance in Java, so it cannot be an AffineModel1D
by itself.| Modifier and Type | Field and Description |
|---|---|
protected AffineModel1D |
affine |
protected double[] |
afs |
protected double[] |
bfs |
a, b, l1, lambdacost, rnd| Constructor and Description |
|---|
InterpolatedAffineModel1D(A model,
B regularizer,
double lambda) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
apply(double[] location)
Apply the
CoordinateTransform to a location. |
void |
applyInPlace(double[] location)
Apply the
CoordinateTransform to a location. |
double[] |
applyInverse(double[] point)
Apply the inverse of the model to a point location
|
void |
applyInverseInPlace(double[] point)
apply the inverse of the model to a point location
|
void |
concatenate(AffineModel1D affine1d) |
void |
concatenate(InterpolatedAffineModel1D<A,B> affine1d) |
InterpolatedAffineModel1D<A,B> |
copy()
Clone the model.
|
AffineModel1D |
createAffineModel1D() |
InterpolatedAffineModel1D<A,B> |
createInverse() |
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 |
interpolate() |
void |
preConcatenate(AffineModel1D affine1d) |
void |
preConcatenate(InterpolatedAffineModel1D<A,B> affine1d) |
void |
set(float m0,
float m1)
Deprecated.
|
void |
set(InterpolatedAffineModel1D<A,B> 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.
|
getA, getB, getLambda, getMinNumMatches, setLambdabetterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, fit, fit, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, testprotected final AffineModel1D affine
protected final double[] afs
protected final double[] bfs
public void interpolate()
public <P extends PointMatch> void fit(Collection<P> matches) throws NotEnoughDataPointsException, IllDefinedDataPointsException
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<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>fit in class InterpolatedModel<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>,InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>matches - set of point correpondencesNotEnoughDataPointsException - if matches does not contain
enough data pointsIllDefinedDataPointsException - if the set of data points is
inappropriate to solve the Modelpublic void set(InterpolatedAffineModel1D<A,B> m)
Modelset in interface Model<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>set in class InterpolatedModel<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>,InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>public InterpolatedAffineModel1D<A,B> copy()
Modelcopy in interface Model<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>copy in class InvertibleInterpolatedModel<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>,InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>public double[] apply(double[] location)
CoordinateTransformCoordinateTransform to a location.public void applyInPlace(double[] location)
CoordinateTransformCoordinateTransform to a location.applyInPlace in interface CoordinateTransformapplyInPlace in class InterpolatedModel<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>,InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>public double[] applyInverse(double[] point)
throws NoninvertibleModelException
InverseCoordinateTransformapplyInverse in interface InverseCoordinateTransformapplyInverse in class InvertibleInterpolatedModel<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>,InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>NoninvertibleModelExceptionpublic void applyInverseInPlace(double[] point)
throws NoninvertibleModelException
InverseCoordinateTransformapplyInverseInPlace in interface InverseCoordinateTransformapplyInverseInPlace in class InvertibleInterpolatedModel<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>,InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>NoninvertibleModelExceptionpublic InterpolatedAffineModel1D<A,B> createInverse()
createInverse in interface Affine1D<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>createInverse in interface InvertibleCoordinateTransformcreateInverse in class InvertibleInterpolatedModel<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>,InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>public AffineModel1D createAffineModel1D()
public void preConcatenate(InterpolatedAffineModel1D<A,B> affine1d)
public void concatenate(AffineModel1D affine1d)
public void preConcatenate(AffineModel1D affine1d)
public void concatenate(InterpolatedAffineModel1D<A,B> affine1d)
public void toArray(double[] data)
Affine1Dpublic void toMatrix(double[][] data)
Affine1D[0][0] -> m00; [0][1] -> m01;
@Deprecated public final void set(float m0, float m1)
m0 m1 0 1
m0 - m1 - public void estimateBounds(double[] min,
double[] max)
BoundableestimateBounds in interface Boundablepublic void estimateInverseBounds(double[] min,
double[] max)
throws NoninvertibleModelException
InverseBoundableestimateInverseBounds in interface InverseBoundableNoninvertibleModelExceptionCopyright © 2015–2021 Fiji. All rights reserved.