#include <ColorPercentile.h>
Inheritance diagram for prapi::color::ColorPercentile:

The name may be somewhat misleading because percentiles are actually calculated from single-channel integer matrices. Typically, however, the input matrices are color channels extracted from multi-channel color images, hence the name.
Color percentiles are calculated from the probability integral of an image histogram. Percentiles can be calculated for values in the range [0,1], and the value for percentile x is the index of the histogram bin at which the probability integral exceeds (or equals) x.
Public Methods | |
| ColorPercentile () | |
| Create a color percentile extractor with the percentiles intialized to {0.1, 0.2, ..., 0.9, 1.0}. | |
| ColorPercentile (const List< double > &percentiles) | |
| Create a color percentile extractor with the given percentiles. | |
| List< int > | getFeatureVector (const Matrix< int > &mat) throw (FeatureExtractionException&) |
| Calculate the currently active color percentiles for an matrix. | |
| void | setPercentiles (const List< double > &percentiles) |
| Set the percentiles to extract. | |
| List< double > | getPercentiles () const |
| Get the currently active percentiles. | |
| List< double > & | percentiles () |
| Get the currently active percentiles. | |
| const List< double > & | percentiles () const |
| Get the currently active percentiles. | |
Static Public Methods | |
| int | getPercentile (double percentile, List< int > histogram, int total=-1) |
| Calculate a single color percentile. | |
|
|
Create a color percentile extractor with the given percentiles.
|
|
|
Calculate the currently active color percentiles for an matrix. The length of the returned vector is equal to the number of percentiles given in the constructor or set by the setPercentiles method. Implements prapi::FeatureExtractor< int, Matrix< int > >. |
|
||||||||||||||||
|
Calculate a single color percentile.
|