7 #ifndef COLOR_FILTER_HISTOGRAM_H 8 #define COLOR_FILTER_HISTOGRAM_H 25 ColorFilterMode colorFilterMode,
27 const QRgb &rgbBackground)
const;
33 double histogramBins [],
34 ColorFilterMode colorFilterMode,
36 int &maxBinCount)
const;
43 ColorFilterMode colorFilterMode,
48 static int FIRST_NON_EMPTY_BIN_AT_START () {
return 1; }
52 #endif // COLOR_FILTER_HISTOGRAM_H Class for filtering image to remove unimportant information.
void generate(const ColorFilter &filter, double histogramBins [], ColorFilterMode colorFilterMode, const QImage &image, int &maxBinCount) const
Generate the histogram.
int binFromPixel(const ColorFilter &filter, ColorFilterMode colorFilterMode, const QColor &pixel, const QRgb &rgbBackground) const
Compute histogram bin number from pixel according to filter.
int valueFromBin(const ColorFilter &filter, ColorFilterMode colorFilterMode, int bin)
Inverse of binFromPixel.
ColorFilterHistogram()
Single constructor.
Class that generates a histogram according to the current filter.
static int HISTOGRAM_BINS()
Number of histogram bins.