|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmpi.cbg.fly.Model
public abstract class Model
Abstract class for arbitrary geometric transformation models to be applied to points in n-dimensional space. Provides methods for generic optimization and model extraction algorithms. Currently, RANSAC and Monte-Carlo minimization implemented. Needs revision... TODO A model is planned to be a generic transformation pipeline to be applied to images, volumes or arbitrary sets of n-dimensional points. E.g. lens transformation of camera images, pose and location of mosaic tiles, non-rigid bending of confocal stacks etc. License: GPL This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. NOTE: The SIFT-method is protected by U.S. Patent 6,711,293: "Method and apparatus for identifying scale invariant features in an image and use of same for locating an object in an image" by the University of British Columbia. That is, for commercial applications the permission of the author is required.
| Field Summary | |
|---|---|
double |
error
error depends on what kind of algorithm is running small error is better than large error |
static int |
MIN_SET_SIZE
|
| Constructor Summary | |
|---|---|
Model()
instantiates an empty model with maximally large error |
|
| Method Summary | |
|---|---|
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 java.awt.geom.AffineTransform |
getAffine()
|
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN_SET_SIZE
public double error
| Constructor Detail |
|---|
public Model()
| Method Detail |
|---|
public abstract boolean fit(PointMatch[] min_matches)
min_matches - minimal set of point correpondences
public 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 java.awt.geom.AffineTransform getAffine()
public abstract java.lang.String toString()
toString in class java.lang.Objectpublic abstract Model clone()
clone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||