template <typename ColorT>

struct ColorHistogram

Defined at line 18 of file ../../src/ui/lib/escher/types/color_histogram.h

Counts the frequencies of each color in an image. Pixels of the image

are assumed to be tightly packed (i.e. no row padding).

Public Members

MapType values

Public Methods

void ColorHistogram<ColorT> (const ColorT * pixels, size_t pixel_count)

Defined at line 21 of file ../../src/ui/lib/escher/types/color_histogram.h

void ColorHistogram<ColorT> (const uint8_t * pixel_bytes, size_t pixel_count)

Defined at line 26 of file ../../src/ui/lib/escher/types/color_histogram.h

void ColorHistogram<ColorT> (const MapType & values_)

Defined at line 29 of file ../../src/ui/lib/escher/types/color_histogram.h

size_t operator[] (const ColorT & color)

Return the number of occurrences of |color| in the histogram.

Defined at line 32 of file ../../src/ui/lib/escher/types/color_histogram.h

size_t size ()

Return the number of distinct colors in the histogram.

Defined at line 41 of file ../../src/ui/lib/escher/types/color_histogram.h