mpicbg.models

## Class InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>

• ### Field Summary

Fields
Modifier and Type Field and Description
`protected AffineModel1D` `affine`
`protected double[]` `afs`
`protected double[]` `bfs`
• ### Fields inherited from class mpicbg.models.InterpolatedModel

`a, b, l1, lambda`
• ### Fields inherited from class mpicbg.models.AbstractModel

`cost, rnd`
• ### Constructor Summary

Constructors
Constructor and Description
```InterpolatedAffineModel1D(A model, B regularizer, double lambda)```
• ### Method Summary

All Methods
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>void` `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.
• ### Methods inherited from class mpicbg.models.InterpolatedModel

`getA, getB, getLambda, getMinNumMatches, setLambda`
• ### Methods inherited from class mpicbg.models.AbstractModel

`betterThan, filter, filter, filter, filterRansac, filterRansac, filterRansac, filterRansac, fit, fit, getCost, icp, localSmoothnessFilter, ransac, ransac, setCost, test, test`
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### affine

`protected final AffineModel1D affine`
• #### afs

`protected final double[] afs`
• #### bfs

`protected final double[] bfs`
• ### Constructor Detail

• #### InterpolatedAffineModel1D

```public InterpolatedAffineModel1D(A model,
B regularizer,
double lambda)```
• ### Method Detail

• #### interpolate

`public void interpolate()`
• #### fit

```public <P extends PointMatch> void fit(Collection<P> matches)
throws NotEnoughDataPointsException,
IllDefinedDataPointsException```
Description copied from interface: `Model`
Fit the `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.

Specified by:
`fit` in interface `Model<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
Overrides:
`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>>>`
Parameters:
`matches` - set of point correpondences
Throws:
`NotEnoughDataPointsException` - if matches does not contain enough data points
`IllDefinedDataPointsException` - if the set of data points is inappropriate to solve the Model
• #### set

`public void set(InterpolatedAffineModel1D<A,B> m)`
Description copied from interface: `Model`
Set the model to m
Specified by:
`set` in interface `Model<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
Overrides:
`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>>>`
• #### copy

`public InterpolatedAffineModel1D<A,B> copy()`
Description copied from interface: `Model`
Clone the model.
Specified by:
`copy` in interface `Model<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
Overrides:
`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>>>`
• #### apply

`public double[] apply(double[] location)`
Description copied from interface: `CoordinateTransform`
Apply the `CoordinateTransform` to a location.
Specified by:
`apply` in interface `CoordinateTransform`
Overrides:
`apply` 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>>>`
Returns:
transformed location
• #### applyInPlace

`public void applyInPlace(double[] location)`
Description copied from interface: `CoordinateTransform`
Apply the `CoordinateTransform` to a location.
Specified by:
`applyInPlace` in interface `CoordinateTransform`
Overrides:
`applyInPlace` 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>>>`
• #### applyInverse

```public double[] applyInverse(double[] point)
throws NoninvertibleModelException```
Description copied from interface: `InverseCoordinateTransform`
Apply the inverse of the model to a point location
Specified by:
`applyInverse` in interface `InverseCoordinateTransform`
Overrides:
`applyInverse` 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>>>`
Returns:
transformed point
Throws:
`NoninvertibleModelException`
• #### applyInverseInPlace

```public void applyInverseInPlace(double[] point)
throws NoninvertibleModelException```
Description copied from interface: `InverseCoordinateTransform`
apply the inverse of the model to a point location
Specified by:
`applyInverseInPlace` in interface `InverseCoordinateTransform`
Overrides:
`applyInverseInPlace` 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>>>`
Throws:
`NoninvertibleModelException`
• #### createInverse

`public InterpolatedAffineModel1D<A,B> createInverse()`
Specified by:
`createInverse` in interface `Affine1D<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
Specified by:
`createInverse` in interface `InvertibleCoordinateTransform`
Overrides:
`createInverse` 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>>>`
• #### createAffineModel1D

`public AffineModel1D createAffineModel1D()`
• #### preConcatenate

`public void preConcatenate(InterpolatedAffineModel1D<A,B> affine1d)`
Specified by:
`preConcatenate` in interface `Affine1D<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
• #### concatenate

`public void concatenate(AffineModel1D affine1d)`
• #### preConcatenate

`public void preConcatenate(AffineModel1D affine1d)`
• #### concatenate

`public void concatenate(InterpolatedAffineModel1D<A,B> affine1d)`
Specified by:
`concatenate` in interface `Affine1D<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
• #### toArray

`public void toArray(double[] data)`
Description copied from interface: `Affine1D`
Write the 2 parameters of the affine into a double array. The order is m00, m01
Specified by:
`toArray` in interface `Affine1D<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
• #### toMatrix

`public void toMatrix(double[][] data)`
Description copied from interface: `Affine1D`
Write the 2 parameters of the affine into a 2x1 double array. The order is ```[0][0] -> m00; [0][1] -> m01; ```
Specified by:
`toMatrix` in interface `Affine1D<InterpolatedAffineModel1D<A extends Model<A> & Affine1D<A>,B extends Model<B> & Affine1D<B>>>`
• #### set

```@Deprecated
public final void set(float m0,
float m1)```
Deprecated.
Initialize the model such that the respective affine transform is:
``` m0 m1
0   1
```
Parameters:
`m0` -
`m1` -
• #### estimateBounds

```public void estimateBounds(double[] min,
double[] max)```
Description copied from interface: `Boundable`
Estimate the bounds of an n-dimensional interval [min,max] with min and max being n-dimensional vectors.
Specified by:
`estimateBounds` in interface `Boundable`
• #### estimateInverseBounds

```public void estimateInverseBounds(double[] min,
double[] max)
throws NoninvertibleModelException```
Description copied from interface: `InverseBoundable`
Estimate the bounds of an n-dimensional interval [min,max] with min and max being n-dimensional vectors.
Specified by:
`estimateInverseBounds` in interface `InverseBoundable`
Throws:
`NoninvertibleModelException`