Creates a normalized histogram which represents the frequency of different visual words from the set of features. Both hard and soft assignment can be used. For hard assignment all the weight is given to the word which is the best fit to the feature. In soft the relative similarity between the words is used to assign values to the histogram.
With hard assignment a single word is selected. With soft a fraction is assigned to each word based on
a distance metric. See
AssignCluster for the details.
(AssignCluster<double> assignment, boolean hardAssignment)Assigns and configures internal algorithms.
assignment- Specifies the assignment algorithm
hardAssignment- true for hard assignment and false for soft assignment
resetpublic void reset()Description copied from interface:
addFeaturepublic void addFeature
(TupleDesc_F64 feature)Description copied from interface:
FeatureToWordHistogramAdds a feature to the histogram
processpublic void process()No more features are being added. Normalized the computed histogram.
getHistogrampublic double getHistogram()Histogram of word frequencies. Normalized such that the sum is equal to 1.
getTotalWordspublic int getTotalWords()The total number of words used to create this histogram