ColorSpaceUsageCounter Class Reference

#include <ColorSpaceUsageCounter.h>

List of all members.

Public Member Functions

 ColorSpaceUsageCounter ()
 ~ColorSpaceUsageCounter ()
int getCount (const unsigned char y, const unsigned char u, const unsigned char v) const
virtual void generateImage (const Image &image, Image &resultImage) const
void reset ()
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]
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().

ColorSpaceUsageCounter::~ColorSpaceUsageCounter (  ) 

Destructor

Definition at line 54 of file ColorSpaceUsageCounter.cpp.


Member Function Documentation

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

Definition at line 77 of file ColorSpaceUsageCounter.cpp.

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

Definition at line 64 of file ColorSpaceUsageCounter.cpp.

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.

References Image::image, and image.

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.

References count.

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

Definition at line 108 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 count, and maxCount.

Referenced by ColorSpaceUsageCounter().


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.

Referenced by getCount(), and reset().

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:
Generated on Thu Dec 7 01:23:04 2006 for DT2005.panorama by  doxygen 1.4.7