public class TileConfiguration extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected static DecimalFormat |
decimalFormat |
protected static DecimalFormatSymbols |
decimalFormatSymbols |
protected double |
error |
protected HashSet<Tile<?>> |
fixedTiles |
protected double |
maxError |
protected double |
minError |
protected HashSet<Tile<?>> |
tiles |
Constructor and Description |
---|
TileConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
addTile(Tile<?> t)
Add a single
Tile . |
void |
addTiles(Collection<? extends Tile<?>> t)
Add a
Collection of Tiles . |
void |
addTiles(TileConfiguration t)
Add all
Tiles of another TileConfiguration . |
protected void |
apply()
Apply the model of each
Tile to all its
PointMatches . |
void |
clear()
Cleanup.
|
void |
fixTile(Tile<?> t)
Fix a single
Tile . |
ArrayList<PointMatch> |
getConnectingPointMatches(Tile<?> targetTile,
Tile<?> referenceTile)
Returns an
ArrayList of PointMatch that connect the targetTile and the referenceTile. |
double |
getError() |
HashSet<Tile<?>> |
getFixedTiles() |
double |
getMaxError() |
double |
getMinError() |
HashSet<Tile<?>> |
getTiles() |
void |
optimize(double maxAllowedError,
int maxIterations,
int maxPlateauwidth)
Minimize the displacement of all
Correspondence pairs
of all Tiles and tell about it. |
void |
optimize(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
double damp)
Minimize the displacement of all
Correspondence pairs
of all Tiles and tell about it. |
void |
optimize(ErrorStatistic observer,
double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
double damp)
Minimize the displacement of all
Correspondence pairs
of all Tiles and tell about it. |
void |
optimizeAndFilter(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
double maxMeanFactor) |
void |
optimizeAndFilter(double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
double damp,
double maxMeanFactor) |
void |
optimizeSilently(ErrorStatistic observer,
double maxAllowedError,
int maxIterations,
int maxPlateauwidth)
Minimize the displacement of all
Correspondence pairs
of all Tiles |
void |
optimizeSilently(ErrorStatistic observer,
double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
double damp)
Minimize the displacement of all
Correspondence pairs
of all Tiles |
void |
optimizeSilentlyConcurrent(ErrorStatistic observer,
double maxAllowedError,
int maxIterations,
int maxPlateauwidth,
double damp) |
List<Tile<?>> |
preAlign()
Computes a pre-alignemnt of all non-fixed
Tile s by propagating the pairwise
models. |
protected void |
println(String s) |
protected void |
update()
Update all
Correspondences in all Tiles
and estimate the average displacement. |
protected void |
updateErrors()
Estimate min/max/average displacement of all
PointMatches in all Tiles . |
protected static final DecimalFormat decimalFormat
protected static final DecimalFormatSymbols decimalFormatSymbols
protected double minError
protected double maxError
protected double error
public final double getMinError()
public final double getMaxError()
public final double getError()
protected void println(String s)
public void clear()
public void addTiles(Collection<? extends Tile<?>> t)
Collection
of Tiles
.t
- public void addTiles(TileConfiguration t)
Tiles
of another TileConfiguration
.t
- protected void apply()
Tile
to all its
PointMatches
.protected void updateErrors()
PointMatches
in all Tiles
.protected void update()
Correspondences
in all Tiles
and estimate the average displacement.public void optimizeSilently(ErrorStatistic observer, double maxAllowedError, int maxIterations, int maxPlateauwidth) throws NotEnoughDataPointsException, IllDefinedDataPointsException
Correspondence pairs
of all Tiles
maxAllowedError
- do not accept convergence if error is > max_errormaxIterations
- stop after that many iterations even if there was
no minimum foundmaxPlateauwidth
- convergence is reached if the average absolute
slope in an interval of this size and half this size is smaller than
0.0001 (in double accuracy). This is assumed to prevent the algorithm
from stopping at plateaus smaller than this value.NotEnoughDataPointsException
IllDefinedDataPointsException
public void optimizeSilently(ErrorStatistic observer, double maxAllowedError, int maxIterations, int maxPlateauwidth, double damp) throws NotEnoughDataPointsException, IllDefinedDataPointsException
Correspondence pairs
of all Tiles
maxAllowedError
- do not accept convergence if error is > max_errormaxIterations
- stop after that many iterations even if there was
no minimum foundmaxPlateauwidth
- convergence is reached if the average absolute
slope in an interval of this size and half this size is smaller than
0.0001 (in double accuracy). This is assumed to prevent the algorithm
from stopping at plateaus smaller than this value.NotEnoughDataPointsException
IllDefinedDataPointsException
public void optimizeSilentlyConcurrent(ErrorStatistic observer, double maxAllowedError, int maxIterations, int maxPlateauwidth, double damp) throws NotEnoughDataPointsException, IllDefinedDataPointsException, InterruptedException, ExecutionException
public void optimize(double maxAllowedError, int maxIterations, int maxPlateauwidth, double damp) throws NotEnoughDataPointsException, IllDefinedDataPointsException
Correspondence pairs
of all Tiles
and tell about it.maxAllowedError
- maxIterations
- maxPlateauwidth
- NotEnoughDataPointsException
IllDefinedDataPointsException
public void optimize(double maxAllowedError, int maxIterations, int maxPlateauwidth) throws NotEnoughDataPointsException, IllDefinedDataPointsException
Correspondence pairs
of all Tiles
and tell about it.maxAllowedError
- maxIterations
- maxPlateauwidth
- NotEnoughDataPointsException
IllDefinedDataPointsException
public void optimize(ErrorStatistic observer, double maxAllowedError, int maxIterations, int maxPlateauwidth, double damp) throws NotEnoughDataPointsException, IllDefinedDataPointsException
Correspondence pairs
of all Tiles
and tell about it.maxAllowedError
- maxIterations
- maxPlateauwidth
- NotEnoughDataPointsException
IllDefinedDataPointsException
public void optimizeAndFilter(double maxAllowedError, int maxIterations, int maxPlateauwidth, double damp, double maxMeanFactor) throws NotEnoughDataPointsException, IllDefinedDataPointsException
public void optimizeAndFilter(double maxAllowedError, int maxIterations, int maxPlateauwidth, double maxMeanFactor) throws NotEnoughDataPointsException, IllDefinedDataPointsException
public List<Tile<?>> preAlign() throws NotEnoughDataPointsException, IllDefinedDataPointsException
Tile
s by propagating the pairwise
models. This does not give a correct registration but a very good starting point
for the global optimization. This is necessary for models where the global optimization
is not guaranteed to converge like the HomographyModel2D
, RigidModel3D
, ...Tile
s that could not be pre-alignedNotEnoughDataPointsException
IllDefinedDataPointsException
public ArrayList<PointMatch> getConnectingPointMatches(Tile<?> targetTile, Tile<?> referenceTile)
ArrayList
of PointMatch
that connect the targetTile and the referenceTile. The order of the
PointMatch
is PointMatch.p1 = target, PointMatch.p2 = reference. A Model
.fit() will then solve the fit
so that target.p1.l is mapped to reference.p2.w.targetTile
- - the Tile
for which a Model
can fitreferenceTile
- - the Tile
to which target will mapArrayList
of all PointMatch
that target and reference shareCopyright © 2015–2021 Fiji. All rights reserved.