Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# ColorSpaceUsageCounter Class Reference

Contains a ColorSpaceUsageCounter which can count the frequency for every 16 * 16 * 16 cube in the 255 * 255 * 255 YUV color space. More...

`#include <ColorSpaceUsageCounter.h>`

List of all members.

## Public Member Functions
| ColorSpaceUsageCounter ()
| Constructor.
| ~ColorSpaceUsageCounter ()
| Destructor.
int | getCount (const unsigned char y, const unsigned char u, const unsigned char v) const
| Returns the count for the cube associated to the y,u,v values.
virtual void | generateImage (const Image &image, Image &resultImage) const
| Generates an image that visualizes the current ColorSpaceUsageCounter.
void | reset ()
| Sets the count of every 16x16x16 cube to 0.
void | addColor (unsigned char y, unsigned char u, unsigned char v)
void | addColor (unsigned char y, unsigned char u, unsigned char v, unsigned char range)
bool | isColorFrequent (unsigned char y, unsigned char u, unsigned char v, int threshold)
## Public Attributes
unsigned short int | count [16][16][16]
| Each element in the array contains the count for a 16x16x16 cube in the color space.
int | maxCount

## Detailed Description

Contains a ColorSpaceUsageCounter which can count the frequency for every 16 * 16 * 16 cube in the 255 * 255 * 255 YUV color space.

Author:
  Matthias Jüngel

Definition at line 22 of file ColorSpaceUsageCounter.h.

## Constructor & Destructor Documentation

ColorSpaceUsageCounter::ColorSpaceUsageCounter | ( |  | ) |

| Constructor. Definition at line 58 of file ColorSpaceUsageCounter.cpp. References reset().

Here is the call graph for this function:

ColorSpaceUsageCounter::~ColorSpaceUsageCounter | ( |  | ) |

| Destructor. Definition at line 54 of file ColorSpaceUsageCounter.cpp.

## Member Function Documentation

int ColorSpaceUsageCounter::getCount | ( | const unsigned char | y,
|  | const unsigned char | u,
|  | const unsigned char | v
| ) | const`[inline]`

  | Returns the count for the cube associated to the y,u,v values. Parameters:
  y | the y value of the pixel
  u | the u value of the pixel
  v | the v value of the pixel
Returns: the color class Definition at line 38 of file ColorSpaceUsageCounter.h.

void ColorSpaceUsageCounter::generateImage | ( | const Image & | image,
|  | Image & | resultImage
| ) | const`[virtual]`

  | Generates an image that visualizes the current ColorSpaceUsageCounter. Parameters:
  image | A reference to the original image.
  resultImage | A reference to the resulting image.
Definition at line 12 of file ColorSpaceUsageCounter.cpp.

void ColorSpaceUsageCounter::reset | ( |  | ) |

| Sets the count of every 16x16x16 cube to 0. Definition at line 120 of file ColorSpaceUsageCounter.cpp. References maxCount. Referenced by ColorSpaceUsageCounter().

void ColorSpaceUsageCounter::addColor | ( | unsigned char | y,
|  | unsigned char | u,
|  | unsigned char | v
| ) |

| Definition at line 64 of file ColorSpaceUsageCounter.cpp.

void ColorSpaceUsageCounter::addColor | ( | unsigned char | y,
|  | unsigned char | u,
|  | unsigned char | v,
|  | unsigned char | range
| ) |

| Definition at line 77 of file ColorSpaceUsageCounter.cpp.

bool ColorSpaceUsageCounter::isColorFrequent | ( | unsigned char | y,
|  | unsigned char | u,
|  | unsigned char | v,
|  | int | threshold
| ) |

| Definition at line 108 of file ColorSpaceUsageCounter.cpp.

## Member Data Documentation

unsigned short int ColorSpaceUsageCounter::count[16][16][16]

| Each element in the array contains the count for a 16x16x16 cube in the color space. Definition at line 56 of file ColorSpaceUsageCounter.h.

int ColorSpaceUsageCounter::maxCount

| Definition at line 69 of file ColorSpaceUsageCounter.h. Referenced by reset().

The documentation for this class was generated from the following files:

- Modules/ImageProcessor/ImageProcessorTools/ColorSpaceUsageCounter.h
- Modules/ImageProcessor/ImageProcessorTools/ColorSpaceUsageCounter.cpp