- All Known Implementing Classes:
public interface FeatureToWordHistogram<Desc extends TupleDesc>
Used to construct a normalized histogram which represents the frequency of certain words in an image for use in a BOW based classifier. Features are added one at a time and internally placed in the histogram. When there are no more features left
process()is called and the histogram computed. The returned histogram will be normalized such that it sums up to one. This normalization makes it more tolerant to images of different sized and sampling frequency. Call
reset()when the next image is ready.
Modifier and Type Method Description
Desc feature)(Adds a feature to the histogram
()Histogram of word frequencies.
()Number of elements in the histogram.
()No more features are being added.
()Must be called before
resetvoid reset()Must be called before
addFeaturevoid addFeature(Desc feature)Adds a feature to the histogram
feature- A feature which is to be matched to words. Not modified.
processvoid process()No more features are being added. Normalized the computed histogram.
getHistogramdouble getHistogram()Histogram of word frequencies. Normalized such that the sum is equal to 1.
getTotalWordsint getTotalWords()Number of elements in the histogram. Which is the number of words the features are assigned to.