|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Feature
A generic PSM feature interface
Method Summary | |
---|---|
void |
addSample(int featureIndex,
java.awt.geom.Point2D.Float p)
Add a sample when training the patches |
double[] |
getFeatureVector(java.awt.geom.Point2D.Float p)
Get the feature vector at the location specified |
FloatImage |
getProbability(int featureIndex)
Get the probability image for a particular feature |
void |
normalise()
Normalise the feature models if needed at the end of training |
void |
read(java.io.StreamTokenizer st,
java.lang.String folder,
boolean url)
Read a feature from a file or url |
void |
setFeatureCount(int count)
Sets the number of features |
void |
setImage(java.awt.Image img)
Set the image to use |
void |
write(java.io.PrintStream out,
java.lang.String folder)
Write teh feature to a PrintStream |
Method Detail |
---|
FloatImage getProbability(int featureIndex)
featureIndex
- the feature number
double[] getFeatureVector(java.awt.geom.Point2D.Float p)
p
- the point to sample
void setImage(java.awt.Image img)
img
- the image to usevoid setFeatureCount(int count)
count
- the number of featuresvoid addSample(int featureIndex, java.awt.geom.Point2D.Float p)
featureIndex
- p
- void normalise()
void read(java.io.StreamTokenizer st, java.lang.String folder, boolean url) throws java.io.IOException
st
- the StreamTokenizer to usefolder
- useful for writing parts in separate files (maybe?)url
- is this a URL you're writing to
java.io.IOException
void write(java.io.PrintStream out, java.lang.String folder)
out
- the output streamfolder
- the folder to write (this and child nodes) to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |