I
- Concrete type of Image
@Reference(author={"Cootes, T. F.","Taylor, C. J."},title="Statistical Models of Appearance for Computer Vision",type=Unpublished,month="October",year="2001",url="http://isbe.man.ac.uk/~bim/Models/app_model.ps.gz") @Reference(type=Inproceedings,author={"T. F. Cootes","C. J. Taylor"},title="Active Shape Models",year="1992",booktitle="in Proceedings of the British Machine Vision Conference") public class ActiveShapeModel<I extends Image<?,I>> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ActiveShapeModel.IterationResult
Class to hold the response of a single iteration of model fitting.
|
Constructor and Description |
---|
ActiveShapeModel(PointDistributionModel pdm,
LandmarkModel<I>[] landmarkModels)
|
Modifier and Type | Method and Description |
---|---|
ActiveShapeModel.IterationResult |
fit(I image,
PointList initialShape)
Iteratively apply
performIteration(Image, PointList) until the
maximum number of iterations is exceeded, or the number of points that
moved less than 0.5 of their maximum distance in an iteration is less
than the target inlier percentage. |
double |
getInlierPercentage() |
LandmarkModel<I>[] |
getLandmarkModels() |
int |
getMaxIterations() |
PointDistributionModel |
getPDM() |
ActiveShapeModel.IterationResult |
performIteration(I image,
PointList currentShape)
Perform a single iteration of model fitting.
|
void |
setInlierPercentage(double inlierPercentage)
Set the target percentage of the number of points that move less than 0.5
of their total possible distance within an iteration to stop fitting.
|
void |
setMaxIterations(int maxIter)
Set the maximum allowed number of iterations in fitting the model
|
static <I extends Image<?,I>> |
trainModel(PrincipalComponentAnalysis.ComponentSelector selector,
List<IndependentPair<PointList,I>> data,
PointDistributionModel.Constraint constraint,
LandmarkModelFactory<I> factory)
Train a new
ActiveShapeModel using the given data and parameters. |
public ActiveShapeModel(PointDistributionModel pdm, LandmarkModel<I>[] landmarkModels)
pdm
- the PointDistributionModel
.landmarkModels
- the LandmarkModel
s.public static <I extends Image<?,I>> ActiveShapeModel<I> trainModel(PrincipalComponentAnalysis.ComponentSelector selector, List<IndependentPair<PointList,I>> data, PointDistributionModel.Constraint constraint, LandmarkModelFactory<I> factory)
ActiveShapeModel
using the given data and parameters.I
- The concrete image type.selector
- the selector for choosing the number of principal components /
modes of the model.data
- the data to train the model fromconstraint
- the constraint to apply to restrict the model to plausible
shapes.factory
- the LandmarkModelFactory
for learning local appearance
modelsActiveShapeModel
.public ActiveShapeModel.IterationResult performIteration(I image, PointList currentShape)
image
- the image to fit tocurrentShape
- the starting shape in image coordinatespublic ActiveShapeModel.IterationResult fit(I image, PointList initialShape)
performIteration(Image, PointList)
until the
maximum number of iterations is exceeded, or the number of points that
moved less than 0.5 of their maximum distance in an iteration is less
than the target inlier percentage.image
- the image to fit the shape toinitialShape
- the initial shape in image coordinatessetInlierPercentage(double)
,
setMaxIterations(int)
public int getMaxIterations()
public void setMaxIterations(int maxIter)
maxIter
- the maxIter to setpublic double getInlierPercentage()
public void setInlierPercentage(double inlierPercentage)
inlierPercentage
- the inlierPercentage to setpublic PointDistributionModel getPDM()
PointDistributionModel
public LandmarkModel<I>[] getLandmarkModels()