boofcv.alg.scene
Interface FeatureToWordHistogram<Desc extends TupleDesc>
-
- All Known Implementing Classes:
- FeatureToWordHistogram_F64
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 leftprocess()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. Callreset()when the next image is ready.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddFeature(Desc feature)Adds a feature to the histogramdouble[]getHistogram()Histogram of word frequencies.intgetTotalWords()Number of elements in the histogram.voidprocess()No more features are being added.voidreset()Must be called beforeaddFeature(boofcv.struct.feature.TupleDesc)is called.
-
-
-
Method Detail
-
reset
void reset()
Must be called beforeaddFeature(boofcv.struct.feature.TupleDesc)is called.
-
addFeature
void addFeature(Desc feature)
Adds a feature to the histogram- Parameters:
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.- Returns:
- histogram
-
getTotalWords
int getTotalWords()
Number of elements in the histogram. Which is the number of words the features are assigned to.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG