protected class KNNCharacterClassifier.ImageTrainer extends Object implements FontSimulator.FontSimListener<FImage>
FontSimulator.FontSimListenerimplementation that receives each character as an image in some randomised font. When it receives an image, it creates the feature vector by calling
KNNCharacterClassifier.getImageVector(FImage)and stores that into a double array that can be used as input to the nearest neighbour classifier for training. That array can be retrieved using
|Constructor and Description|
Constructor that takes the size of the output vector (that is the total number of training instances).
|Modifier and Type||Method and Description|
Retrieve the set of training data as a double array.
Implementation of the
public ImageTrainer(int n)
n- The number of training instances
public void imageCreated(FImage img)
public double getVector()