Package boofcv.alg.bow
Class ClusterVisualWords
java.lang.Object
boofcv.alg.bow.ClusterVisualWords
Finds clusters of
TupleDesc_F64
which can be used to identify frequent features, a.k.a words.
Internally it uses ComputeClusters
and simply extracts the inner array
from the tuple.-
Constructor Summary
ConstructorDescriptionClusterVisualWords
(ComputeClusters<double[]> computeClusters, long randomSeed) Constructor which configures the cluster finder. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addReference
(TupleDesc_F64 feature) Add a feature to the list.AssignCluster<double[]>
Returns a transform from point to cluster.void
process
(int numberOfWords) Clusters the list of features into the specified number of words
-
Constructor Details
-
ClusterVisualWords
Constructor which configures the cluster finder.- Parameters:
computeClusters
- Cluster finding algorithmrandomSeed
- Seed for random number generator
-
-
Method Details
-
addReference
Add a feature to the list.- Parameters:
feature
- image feature. Reference to inner array is saved.
-
process
public void process(int numberOfWords) Clusters the list of features into the specified number of words- Parameters:
numberOfWords
- Number of words/clusters it should find
-
getAssignment
Returns a transform from point to cluster.
-