|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Facemorph.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 Feature
featureIndex
- the point index
public double[] getFeatureVector(java.awt.geom.Point2D.Float p)
getFeatureVector
in interface Feature
p
- the point
public void setImage(java.awt.Image img)
setImage
in interface Feature
img
- the imagepublic void setFeatureCount(int count)
setFeatureCount
in interface Feature
count
- the number of featurespublic void addSample(int featureIndex, java.awt.geom.Point2D.Float p)
addSample
in interface Feature
featureIndex
- 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 Feature
st
- 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 Feature
out
- 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 |