Interface FeatureToWordHistogram<Desc extends TupleDesc>

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.
  • Method Details

    • reset

      void reset()
      Must be called before addFeature(boofcv.struct.feature.TupleDesc) is called.
    • addFeature

      void addFeature​(Desc feature)
      Adds a feature to the histogram
      feature - A feature which is to be matched to words. Not modified.
    • process

      void process()
      No more features are being added. Normalized the computed histogram.
    • getHistogram

      double[] getHistogram()
      Histogram of word frequencies. Normalized such that the sum is equal to 1.
    • getTotalWords

      int getTotalWords()
      Number of elements in the histogram. Which is the number of words the features are assigned to.