mpicbg.models
Class InterpolatedModel<A extends Model<A>,B extends Model<B>,M extends InterpolatedModel<A,B,M>>

java.lang.Object
  extended by mpicbg.models.AbstractModel<M>
      extended by mpicbg.models.InterpolatedModel<A,B,M>
All Implemented Interfaces:
Serializable, CoordinateTransform, Model<M>
Direct Known Subclasses:
InvertibleInterpolatedModel

public class InterpolatedModel<A extends Model<A>,B extends Model<B>,M extends InterpolatedModel<A,B,M>>
extends AbstractModel<M>

Linearly interpolates between two independent models. We use this as a base class for regularizing higher order models by lower order models in the context of global optimization.

Author:
Stephan Saalfeld
See Also:
Serialized Form

Field Summary
protected  A a
           
protected  B b
           
protected  double l1
           
protected  double lambda
           
 
Fields inherited from class mpicbg.models.AbstractModel
cost, rnd
 
Constructor Summary
InterpolatedModel(A a, B b, double lambda)
           
 
Method Summary
 double[] apply(double[] location)
          Apply the CoordinateTransform to a location.
 void applyInPlace(double[] location)
          Apply the CoordinateTransform to a location.
 M copy()
          Clone the model.
<P extends PointMatch>
void
fit(Collection<P> matches)
          Fit the Model to a set of data points minimizing the global transfer error.
 A getA()
           
 B getB()
           
 double getLambda()
           
 int getMinNumMatches()
           
 void set(M m)
          Set the model to m
 void setLambda(double lambda)
           
 
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

a

protected final A extends Model<A> a

b

protected final B extends Model<B> b

lambda

protected double lambda

l1

protected double l1
Constructor Detail

InterpolatedModel

public InterpolatedModel(A a,
                         B b,
                         double lambda)
Method Detail

getA

public A getA()

getB

public B getB()

getLambda

public double getLambda()

setLambda

public void setLambda(double lambda)

getMinNumMatches

public int getMinNumMatches()

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 #filter(Class, Collection, Collection) to remove outliers from your data points The estimated model transfers match.p1.local to match.p2.world.

Parameters:
matches - set of point correpondences
Throws:
NotEnoughDataPointsException
IllDefinedDataPointsException

set

public void set(M m)
Description copied from interface: Model
Set the model to m


copy

public M copy()
Description copied from interface: Model
Clone the model.


apply

public double[] apply(double[] location)
Description copied from interface: CoordinateTransform
Apply the CoordinateTransform to a location.

Returns:
transformed location

applyInPlace

public void applyInPlace(double[] location)
Description copied from interface: CoordinateTransform
Apply the CoordinateTransform to a location.



Copyright © 2007-2016 Fiji. All Rights Reserved.