public static class PropagateSeeds.Contour extends PropagateSeeds
scaleMagn
and OutlineProcessor.shrinknl(double, double, double, double, double, double, double, double)
are related to each other. Larger stepSize
). Therefore large scaleMagn
will
move concave node too
fast because internally stepSize
is multiplied by factor returned by
OutlineProcessor.amplificationFactor(double, double, double)
that ranges 1.0 for
positive curvatures to scaleMagn
for negative with specified
scaleSigma
. Generally increasing scaleMagn
should be deceased.
To increase effect of shifting nodes with negative curvature, normals locally can be
adjusted according to node with lowest curvature. See
OutlineProcessor.shrinknl(double, double, double, double, double, double, double,
double)
For linear scaling set scaleMagn
to 1.0 and
averageNormalsDist
to 0.0.
PropagateSeeds_Contour
PropagateSeeds.Contour, PropagateSeeds.Dummy, PropagateSeeds.Morphological, PropagateSeeds.Propagators
Modifier and Type | Field and Description |
---|---|
double |
averageCurvDist
Distance to average curvature over.
|
double |
averageNormalsDist
Distance to set normals equal.
|
double |
scaleMagn
Scale magnification.
|
double |
scaleSigma
Sigma.
|
static double |
stepSize
Step size during object outline shrinking.
|
boolean |
useFiltering
Use or not extra filtering defined in
TrackOutline . |
colorScaling, darkBackground, seeds, STEPS, storeSeeds
Constructor and Description |
---|
Contour()
Default constructor without storing seed history.
|
Contour(boolean storeSeeds,
ij.process.AutoThresholder.Method trueBackground)
Allow to store seed history that can be later presented in form of composite image.
|
Contour(boolean storeSeeds,
ij.process.AutoThresholder.Method trueBackground,
double sigma,
double scaleMagn,
double averageCurvDist,
double averageNormalsDist)
Allow additionally to set power of shrinking curved parts of the outline and window for
equalising normals.
|
Modifier and Type | Method and Description |
---|---|
static Pair<List<Outline>,List<Color>> |
getOutlineAndColors(ij.process.ImageProcessor previous,
boolean filtering)
Convert mask to outline.
|
static List<Pair<Outline,Color>> |
getPairsOutlineAndColors(ij.process.ImageProcessor previous,
boolean filtering)
Convert mask to outline.
|
Seeds |
propagateSeed(ij.process.ImageProcessor previous,
ij.process.ImageProcessor org,
double shrinkPower,
double expandPower)
Generate seeds for next frame using provided mask.
|
getCompositeSeed, getPropagator, setTrueBackgroundProcessing
public double scaleMagn
PropagateSeeds.Contour
only.public double scaleSigma
PropagateSeeds.Contour
only.public double averageNormalsDist
PropagateSeeds.Contour
only.OutlineProcessor.shrinknl(double, double, double, double, double, double, double,
double)
,
Contour#Contour(boolean, ij.process.AutoThresholder.Method, double, double, double,
double)
public double averageCurvDist
OutlineProcessor.shrinknl(double, double, double, double, double, double, double,
double)
,
Contour#Contour(boolean, ij.process.AutoThresholder.Method, double, double, double,
double)
public boolean useFiltering
TrackOutline
.public static final double stepSize
public Contour()
public Contour(boolean storeSeeds, ij.process.AutoThresholder.Method trueBackground)
storeSeeds
- true to store seeds.trueBackground
- if not null, selected method will be used for estimating true
background - excluding bright objects from itPropagateSeeds.getCompositeSeed(ImagePlus, int)
public Contour(boolean storeSeeds, ij.process.AutoThresholder.Method trueBackground, double sigma, double scaleMagn, double averageCurvDist, double averageNormalsDist)
storeSeeds
- true to store seeds.trueBackground
- if not null, selected method will be used for estimating true
background - excluding bright objects from itsigma
- sigma of GaussianscaleMagn
- maximum amplification of scaling index (for curv<<0). 1.0 causes linear
shrink.averageCurvDist
- distance to average curvature over. At any case at least 3 nodes are
taken (current, previous and next). See OutlineProcessor
. This parameter plays
as multiplier of average node distance. Setting it to e.g. 5, likely 5 nodes will be
takes in total.averageNormalsDist
- distance to look along for node with smallest curvature (negative)
from current node (forward and backward). Set 0 to turn off this feature. See
OutlineProcessor
and description of previous parameter.Contour#Contour(boolean, ij.process.AutoThresholder.Method)
,
OutlineProcessor.shrinknl(double, double, double, double, double, double, double,
double)
public Seeds propagateSeed(ij.process.ImageProcessor previous, ij.process.ImageProcessor org, double shrinkPower, double expandPower)
The mask provided to this method is shrunk to get new seeds of object (that can move meanwhile). The same mask is expanded and subtracted from image forming the background.
Setting shrinkPower or expandPower to zero prevents contour modifications.
Algorithm can utilise object colour to process them in groups within one colour. Objects
in one group are processed separately, but then all are stored in the same Seeds
RandomWalkSegmentation.SeedTypes.FOREGROUNDS
map.
propagateSeed
in class PropagateSeeds
previous
- Previous result of segmentation. BW mask with white object on black
background.org
- original image that new seeds are computed for. Usually it is current imageshrinkPower
- Shrink size for objects in pixels.expandPower
- Expand size used to generate background (object is expanded and then
subtracted from background)PropagateSeeds.Morphological.propagateSeed(ImageProcessor, ImageProcessor, double,
double)
,
Outline.scaleOutline(double, double, double, double)
,
PropagateSeeds.getTrueBackground(ImageProcessor, ImageProcessor)
,
PropagateSeeds.setTrueBackgroundProcessing(ij.process.AutoThresholder.Method)
public static Pair<List<Outline>,List<Color>> getOutlineAndColors(ij.process.ImageProcessor previous, boolean filtering)
previous
- image to be converted outline. White object on black background.filtering
- if true enable default filtering from TrackOutline
classTrackOutline
,
getPairsOutlineAndColors(ImageProcessor, boolean)
public static List<Pair<Outline,Color>> getPairsOutlineAndColors(ij.process.ImageProcessor previous, boolean filtering)
previous
- image to be converted outline. White object on black background.filtering
- if true enable default filtering from TrackOutline
classTrackOutline
,
getOutlineAndColors(ImageProcessor, boolean)
Copyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.