The constructor
trainer = cv.BOWKMeansTrainer(dictionarySize)
[...] = cv.BOWKMeansTrainer(...,'OptionName', optionValue, ...)
Input
- dictionarySize Number of clusters.
Options
- Criteria The algorithm termination criteria, that is, the
maximum number of iterations and/or the desired accuracy. The
accuracy is specified as
Criteria.epsilon
. As soon as each
of the cluster centers moves by less than Criteria.epsilon
on some iteration, the algorithm stops. default
struct('type','Count+EPS', 'maxCount',100, 'epsilon',eps('float'))
- Attempts The number of times the algorithm is executed
using different initial labelings. The algorithm returns the
labels that yield the best compactness. default 3.
- Initialization Method to initialize seeds, default 'PP'.
One of the followings:
- Random Select random initial centers in each attempt.
- PP Use kmeans++ center initialization by
Arthur and Vassilvitskii [Arthur2007].