|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Facemorph.Powell Facemorph.aam.CAAMPowell
public class CAAMPowell
Correlated Active Appearance Model optimised using Powell's method (therefore slow, for comparison with fast method, not for general use)
Field Summary |
---|
Fields inherited from class Facemorph.Powell |
---|
TINY |
Constructor Summary | |
---|---|
CAAMPowell(Mask mask,
PCA pca,
PCI pci,
java.awt.Image subject,
Template template)
Constructor for CAAMPowell |
Method Summary | |
---|---|
float[] |
convertParams(double[] params)
Convert parameters for better behaviour in an optimsation routine |
double |
func(double[] params)
Func should be overrided to calculate the error given the parameters params |
static void |
main(java.lang.String[] args)
Main method for testing |
void |
onIteration(double[] params)
onIteration is called once per complete itrations to show the best current guess. |
double[] |
reconvertParams(float[] fparams)
Reconvert the parameters |
Template |
solve(int maxAppIts,
int maxits,
double converged)
Estimate the template iteratively |
Template |
solveSingle(int maxits,
double converged)
A single iteration of the detection process |
static void |
test(java.lang.String listFile,
java.lang.String resFile,
PCI pci,
PCA pca,
Mask mask)
Test method |
void |
updateAppearance()
Update the appearance model parameters |
Methods inherited from class Facemorph.Powell |
---|
linmin, optimiseGA, powell, powell, spsa, spsa2 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CAAMPowell(Mask mask, PCA pca, PCI pci, java.awt.Image subject, Template template)
mask
- mask to usepca
- shape pca modelpci
- image pca modelsubject
- subject imagetemplate
- templateMethod Detail |
---|
public void updateAppearance()
public float[] convertParams(double[] params)
params
- the parameters
public double[] reconvertParams(float[] fparams)
fparams
- the parameters to reconvert
public double func(double[] params)
Powell
func
in class Powell
params
- the parameters to evaluate
public void onIteration(double[] params)
Powell
onIteration
in class Powell
params
- the current params of the modelpublic Template solveSingle(int maxits, double converged)
maxits
- the maximum iterations to useconverged
- converged when change in error is less than this, or maxits exceeded
public Template solve(int maxAppIts, int maxits, double converged)
maxAppIts
- the maximum appearance iterationsmaxits
- the maximum shape iterationsconverged
- converged when change in error is less than converged, or maxAPpIts exceeded
public static void main(java.lang.String[] args)
args
- args[0] = PCI, args[1]=PCA, args[2]=mask, args[3] list file, args[4] results filepublic static void test(java.lang.String listFile, java.lang.String resFile, PCI pci, PCA pca, Mask mask)
listFile
- list fileresFile
- results filepci
- image PCA datapca
- shape PCA datamask
- mask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |