public abstract class Model
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
double |
error
error depends on what kind of algorithm is running
small error is better than large error
|
static int |
MIN_SET_SIZE |
Constructor and Description |
---|
Model()
instantiates an empty model with maximally large error
|
Modifier and Type | Method and Description |
---|---|
abstract float[] |
apply(float[] point)
apply the model to a point location
|
abstract void |
applyInPlace(float[] point)
apply the model to a point location
|
abstract float[] |
applyInverse(float[] point)
apply the inverse of the model to a point location
|
abstract void |
applyInverseInPlace(float[] point)
apply the inverse of the model to a point location
|
boolean |
betterThan(Model m)
less than operater to make the models comparable, returns false for error < 0
|
abstract Model |
clone()
clone
|
abstract boolean |
fit(PointMatch[] min_matches)
fit the model to a minimal set of point correpondences
estimates a model to transform match.p2.local to match.p1.world
|
abstract Matrix |
getMatrix() |
abstract void |
minimize(java.util.Collection<PointMatch> matches) |
abstract void |
shake(java.util.Collection<PointMatch> matches,
float scale,
float[] center)
randomly change the model a bit
estimates the necessary amount of shaking for each single dimensional
distance in the set of matches
|
boolean |
test(java.util.Collection<PointMatch> candidates,
java.util.Collection<PointMatch> inliers,
double epsilon,
double min_inlier_ratio)
test the model for a set of point correspondence candidates
clears inliers and fills it with the fitting subset of candidates
|
abstract java.lang.String |
toString()
string to output stream
|
public static final int MIN_SET_SIZE
public double error
public abstract boolean fit(PointMatch[] min_matches)
min_matches
- minimal set of point correpondencespublic abstract float[] apply(float[] point)
point
- public abstract void applyInPlace(float[] point)
point
- public abstract float[] applyInverse(float[] point)
point
- public abstract void applyInverseInPlace(float[] point)
point
- public boolean test(java.util.Collection<PointMatch> candidates, java.util.Collection<PointMatch> inliers, double epsilon, double min_inlier_ratio)
candidates
- set of point correspondence candidatesinliers
- set of point correspondences that fit the modelepsilon
- maximal allowed transfer errormin_inliers
- minimal ratio of inliers (0.0 => 0%, 1.0 => 100%)public boolean betterThan(Model m)
m
- public abstract void shake(java.util.Collection<PointMatch> matches, float scale, float[] center)
matches
- point matchesscale
- gives a multiplicative factor to each dimensional distance (scales the amount of shaking)center
- local pivot point for centered shakes (e.g. rotation)public abstract void minimize(java.util.Collection<PointMatch> matches)
public abstract Matrix getMatrix()
public abstract java.lang.String toString()
toString
in class java.lang.Object
public abstract Model clone()
clone
in class java.lang.Object