|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Facemorph.aam.CLMSVM
public class CLMSVM
Constrained local model with SVM based patch detectors
Constructor Summary | |
---|---|
CLMSVM()
|
Method Summary | |
---|---|
void |
build(java.lang.String file,
HaarReader haar)
Builds an SVM based CLM model |
Template |
delineate(java.awt.image.BufferedImage bimg,
HaarReader haar,
Template template,
ImageZoomPanel izp)
Delineate am image using this CLMSVM using the convex quadratic fitting (CQF) method |
FloatImage[] |
getStrip(Template tem,
FloatImage fimg,
java.awt.Rectangle rect,
int minOffset,
int maxOffset)
Gets the patches from all points arranged in a strip |
static void |
main(java.lang.String[] args)
Main method used for generating a random split of the data |
boolean |
processPatches(java.util.ArrayList<FloatImage[]> patches,
java.util.ArrayList<FloatImage[]> negativePatches,
boolean doCV)
Build the SVM model from the patches |
void |
read(java.lang.String file)
Reads PCI data from a directory |
void |
write(java.lang.String file)
Writes CLMSVM data to a directory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CLMSVM()
Method Detail |
---|
public void build(java.lang.String file, HaarReader haar) throws java.io.FileNotFoundException, java.io.IOException
file
- the name of the file listing the training imageshaar
- the face detector
java.io.FileNotFoundException
java.io.IOException
public Template delineate(java.awt.image.BufferedImage bimg, HaarReader haar, Template template, ImageZoomPanel izp) throws PowellException
bimg
- the image to delineatehaar
- the face detectortemplate
- used to initialise if not nullizp
- the image zoom panel to use if animating the searcg
PowellException
public FloatImage[] getStrip(Template tem, FloatImage fimg, java.awt.Rectangle rect, int minOffset, int maxOffset)
tem
- the current templatefimg
- the image to sample the patches fromrect
- the face detection rectangle, if not null this indicates that the priors should be updatedminOffset
- the minimum offset used when building an enriched training setmaxOffset
- the maximum offset used when building an enriched training set
public boolean processPatches(java.util.ArrayList<FloatImage[]> patches, java.util.ArrayList<FloatImage[]> negativePatches, boolean doCV) throws java.io.IOException
patches
- the positive example patchesnegativePatches
- the negative example patchesdoCV
- perform grid based cross validation
java.io.IOException
public void read(java.lang.String file) throws java.io.IOException
file
- The text file containing the names of the image component files and their variance
java.io.IOException
- if the file can't be readpublic void write(java.lang.String file) throws java.io.IOException
file
- The text file containing the names of the image component files and their variance
java.io.IOException
- throws IOException if problem writing filepublic static void main(java.lang.String[] args) throws java.io.FileNotFoundException, java.io.IOException
args
- args[0] = name of file to read, args[1] = fraction to put in file1, args[2] = output file1, args[3] = output file2
java.io.FileNotFoundException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |