mpicbg.models
Class ConstantModel<A extends Model<A>,M extends ConstantModel<A,M>>

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

public class ConstantModel<A extends Model<A>,M extends ConstantModel<A,M>>
extends AbstractModel<M>

Wraps another models but does not pass through calls to Model.fit(float[][], float[][], float[]). We use this to let models influence each other combining them in an InterpolatedModel.

Author:
Stephan Saalfeld
See Also:
Serialized Form

Field Summary
protected  A model
           
 
Fields inherited from class mpicbg.models.AbstractModel
cost, rnd
 
Constructor Summary
ConstantModel(A model)
           
 
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.
 int getMinNumMatches()
           
 A getModel()
           
 void set(M m)
          Set the model to m
 
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

model

protected final A extends Model<A> model
Constructor Detail

ConstantModel

public ConstantModel(A model)
Method Detail

getModel

public A getModel()

getMinNumMatches

public int getMinNumMatches()

fit

public <P extends PointMatch> void fit(Collection<P> matches)
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

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.