|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.psm.PatchFeature
public class PatchFeature
A feature realised as a Gaussian patch
| Constructor Summary | |
|---|---|
PatchFeature()
|
|
| Method Summary | |
|---|---|
void |
addSample(int featureIndex,
java.awt.geom.Point2D.Float p)
Adds a sample point for training, image data taken from currently set image |
double[] |
getFeatureVector(java.awt.geom.Point2D.Float p)
Get the feature vector |
FloatImage |
getProbability(int featureIndex)
Get the feature probability |
void |
normalise()
Perform any normalisation at the end of training |
void |
read(java.io.StreamTokenizer st,
java.lang.String folder,
boolean url)
Read a patch feature |
void |
setFeatureCount(int count)
Sets the number of features for some initialisation |
void |
setImage(java.awt.Image img)
Sets the image to process |
void |
write(java.io.PrintStream out,
java.lang.String folder)
Write a patch feature |
void |
writeFeatureMeanImages(java.lang.String baseName)
Writes the set of mean feature images |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PatchFeature()
| Method Detail |
|---|
public FloatImage getProbability(int featureIndex)
getProbability in interface FeaturefeatureIndex - the point index
public double[] getFeatureVector(java.awt.geom.Point2D.Float p)
getFeatureVector in interface Featurep - the point
public void setImage(java.awt.Image img)
setImage in interface Featureimg - the imagepublic void setFeatureCount(int count)
setFeatureCount in interface Featurecount - the number of features
public void addSample(int featureIndex,
java.awt.geom.Point2D.Float p)
addSample in interface FeaturefeatureIndex - the number of the featurep - the point locationpublic void normalise()
normalise in interface Feature
public void read(java.io.StreamTokenizer st,
java.lang.String folder,
boolean url)
throws java.io.IOException
read in interface Featurest - the StreamTokenizer to read fromfolder - useful for writing parts in separate files (maybe?)url - is this a URL you're writing to
java.io.IOException
public void write(java.io.PrintStream out,
java.lang.String folder)
write in interface Featureout - the output stream to write tofolder - the folder to write (this and child nodes) topublic void writeFeatureMeanImages(java.lang.String baseName)
baseName - the base name, which is appended with the feature number + ".fimg"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||