Package stitching.model
Class Tile
java.lang.Object
stitching.model.Tile
- Direct Known Subclasses:
ImageInformation
TODO
- Author:
- Stephan Saalfeld
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanAdd aTileto the set of connected tiles.final booleanaddMatch(PointMatch match) Add one match.final booleanaddMatches(Collection<PointMatch> more) Add morePointMatches.final voidconnect(Tile o, Collection<PointMatch> matches) connect two tiles by a set of point correspondences re-weighs the point correpondences We set a weigh of 1.0 / num_matches to each correspondence to equalize the connections between tiles during minimization.final booleandiceBetterModel(int max_num_tries, float scale) randomly dice new model until the error is smaller than the old onefinal voidfitModel()Update the transformationModel.final doublefinal doublegetError()final floatfinal ArrayList<PointMatch> final ModelgetModel()float[]getWC()final floatgetWidth()identifyConnectedGraphs(Collection<Tile> tiles) Identify the set of connected graphs that contains all given tiles.final booleanintersects(Tile t) Check if theTileintersects another.final booleanisInside(float[] point) Check if a point that is given in world coordinates is inside the tile.final booleanfinal voidfinal voidfinal voidfinal voidupdate()Apply the currentModelto all local point coordinates.final voidupdateByStrength(float amount) Apply the currentModelto all local point coordinates by weight.
-
Constructor Details
-
Tile
Constructor -
Tile
Constructor
-
-
Method Details
-
getWidth
public final float getWidth() -
getHeight
public final float getHeight() -
getWC
public float[] getWC() -
getModel
-
getMatches
-
resetMatches
public final void resetMatches() -
getConnectedTiles
-
resetConnectedTiles
public final void resetConnectedTiles() -
resetTile
public final void resetTile() -
addConnectedTile
- Parameters:
t- the newTile.- Returns:
- Success of the operation.
-
removeConnectedTile
- Parameters:
t- theTileto be removed.- Returns:
- Success of the operation.
-
getError
public final double getError() -
getDistance
public final double getDistance() -
addMatches
Add morePointMatches.- Parameters:
more- thePointMatches to be added.- Returns:
- True if the list changed as a result of the call.
-
addMatch
Add one match.- Parameters:
match- thePointMatchto be added.- Returns:
- True if the list changed as a result of the call.
-
update
public final void update()Apply the currentModelto all local point coordinates. Update average transfer error. -
updateByStrength
public final void updateByStrength(float amount) Apply the currentModelto all local point coordinates by weight. Update average transfer error. -
diceBetterModel
public final boolean diceBetterModel(int max_num_tries, float scale) randomly dice new model until the error is smaller than the old one- Parameters:
max_num_tries- maximal number of tries before returning false (which means "no better model found")scale- strength of shaking- Returns:
- true if a better model was found
-
fitModel
Update the transformationModel. That is, fit it to the current set ofPointMatches.- Throws:
NotEnoughDataPointsException
-
connect
connect two tiles by a set of point correspondences re-weighs the point correpondences We set a weigh of 1.0 / num_matches to each correspondence to equalize the connections between tiles during minimization. TODO Check if this is a good idea... TODO What about the size of a detection, shouldn't it be used as a weight factor as well? Change 2007-10-27 Do not normalize by changing the weight, correpondences are weighted by feature scale.- Parameters:
o-matches-
-
identifyConnectedGraphs
Identify the set of connected graphs that contains all given tiles.- Parameters:
tiles-- Returns:
-
isInside
Check if a point that is given in world coordinates is inside the tile. TODO: This implies, that the transformation is linear and invertable.- Parameters:
point-- Returns:
- True is the point is inside the
- Throws:
Exception
-
intersects
Check if theTileintersects another. TODO: The intersection test checks for the eight corners of both tiles only. This implies, that the transformation is linear and invertable. !!!!This is wrong: +-+ +-----+ | | | | +-+-+-+ | +-+ | | | | | | | | | +-+-+-+ | +-+ | | | | | +-+ +-----+ Test for edge intersections and points: If only one single edge of this intersects with one of t both tiles intersect.
-