VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Gr::Histogram Class Reference

A class that does histogram equalisation for eight-bit samples. More...

#include <grhistogram.h>

Public Types

enum  { N = 256 }
 
typedef unsigned long sum_type
 
typedef unsigned char value_type
 

Public Member Functions

 G_STATIC_ASSERT (sizeof(value_type)==1)
 
 Histogram ()
 Constructor. More...
 
 Histogram (bool active)
 Constructor, optionally for an unusable, zero-cost object.
 
void clear ()
 Clears the map.
 
void add (value_type)
 Adds a pixel to the histogram. More...
 
void compute ()
 Computes the equalisation map once all the pixels have been add()ed. More...
 
value_type map (value_type) const
 Does the equalisation mapping.
 
bool active () const
 Returns true if constructed as active.
 

Detailed Description

A class that does histogram equalisation for eight-bit samples.

The implementation goes for speed over space by holding a complete map of pixel values rather than just the pixel values that appear in the image.

Definition at line 41 of file grhistogram.h.

Constructor & Destructor Documentation

Gr::Histogram::Histogram ( )
inline

Constructor.

Postcondition: active()

Definition at line 104 of file grhistogram.h.

Member Function Documentation

void Gr::Histogram::add ( value_type  n)
inline

Adds a pixel to the histogram.

Precondition: active()

Definition at line 117 of file grhistogram.h.

void Gr::Histogram::compute ( )
inline

Computes the equalisation map once all the pixels have been add()ed.

Definition at line 129 of file grhistogram.h.


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