Public Member Functions | Private Member Functions | Private Attributes
HistogramUV Class Reference

Fast UV histogram supporting back projection. More...

#include <HistogramUV.h>

List of all members.

Public Member Functions

void add (const HistogramUV &other)
void addImage (ColorImageUV8 &imageUV, GrayLevelImage8 &graimageY, Box2D< int > bBox, unsigned minY=1, unsigned maxY=254)
 Add the values of an image within the bounding box to the histogram.
void addImage (ColorImageUV8 &imageUV, GrayLevelImage8 &graimageY, unsigned minY=1, unsigned maxY=254)
 Add the values of an image to the histogram.
void applyThreshold (float thresholdFactor=1.0, float dilationRadius=0.0)
 Sets all entries below thresholdFactor*meanValue to zero and applies a dilation filter.
void clear ()
 Set all histogram values to 0.
void clearCenter (unsigned int range)
 Erase the center of the histogram with the given range.
EntryT distance (HistogramUV &other) const
 Compares two histogram and return the mean squared difference.
void divideBy (const HistogramUV &divident)
 Entry-wise division by the values of divident.
unsigned getBinSize () const
const EntryTgetData () const
float getDeviation ()
void getImage (ColorImageRGB8 &imageRGB, float exponent=0.5) const
 Calculates an RGB image representing the histogram values.
ImageMaskgetMask (ColorImageUV8 &imageUV, GrayLevelImage8 &imageY, unsigned minY=20, unsigned maxY=235) const
 Calculate a binary image mask. If the color of the pixel is contained in the histogram, the mask is set to 255, 0 otherwise.
const Matrix< EntryT > & getMatrix () const
EntryT getMaxValue () const
EntryT getMeanValue () const
 HistogramUV (unsigned binSize)
 The constructor.
 HistogramUV ()
 HistogramUV (const HistogramUV &other)
 Copy constructor.
void normalizeMax ()
 Normalize the histogram to max=1.
HistogramUVoperator= (const HistogramUV &other)
 Assign operator.
void printOn (std::ostream &strm)
 Deserialize from stream.
void substract (float value)
 Substract a constant value, clipping at 0.
 ~HistogramUV ()
 The destructor.

Private Member Functions

bool checkInit () const
int correct (int val, int y) const

Private Attributes

unsigned m_BinSize
 Size of one bin.
EntryTm_Data
 Pointer to the raw data of m_Matrix.
unsigned m_DataLength
 Byte length of the histogram data.
Matrix< EntryTm_Matrix
 Holds the histogram data.
unsigned m_NumBins
 Number of bins per channel.

Detailed Description

Fast UV histogram supporting back projection.

Note:
Representation of colors by U/Y and V/Y quotients for luminance independency
Author:
Patric Lambrecht (RX), David Gossow (RX)

Definition at line 39 of file HistogramUV.h.


Constructor & Destructor Documentation

HistogramUV::HistogramUV ( unsigned  binSize)

The constructor.

Parameters:
binSizedetermines how much neighbored u and v values are treated as identical

Copy constructor.

The destructor.


Member Function Documentation

void HistogramUV::add ( const HistogramUV other)
void HistogramUV::addImage ( ColorImageUV8 imageUV,
GrayLevelImage8 graimageY,
Box2D< int >  bBox,
unsigned  minY = 1,
unsigned  maxY = 254 
)

Add the values of an image within the bounding box to the histogram.

Parameters:
imageUV,imageYimages to be added
minY,maxYrange of valid Luminance values. Pixels with an Y value outside of these boundaries are ignored.
bBoxbounding box in the image
void HistogramUV::addImage ( ColorImageUV8 imageUV,
GrayLevelImage8 graimageY,
unsigned  minY = 1,
unsigned  maxY = 254 
)

Add the values of an image to the histogram.

See also:
addImage (above)
void HistogramUV::applyThreshold ( float  thresholdFactor = 1.0,
float  dilationRadius = 0.0 
)

Sets all entries below thresholdFactor*meanValue to zero and applies a dilation filter.

bool HistogramUV::checkInit ( ) const [private]

Set all histogram values to 0.

void HistogramUV::clearCenter ( unsigned int  range)

Erase the center of the histogram with the given range.

int HistogramUV::correct ( int  val,
int  y 
) const [inline, private]

Convert to internal u/v representation

Compares two histogram and return the mean squared difference.

void HistogramUV::divideBy ( const HistogramUV divident)

Entry-wise division by the values of divident.

unsigned HistogramUV::getBinSize ( ) const [inline]

Definition at line 122 of file HistogramUV.h.

const EntryT* HistogramUV::getData ( ) const [inline]
Returns:
matrix containing the histogram data

Definition at line 120 of file HistogramUV.h.

Returns:
A relative range for erasing the histogram center
void HistogramUV::getImage ( ColorImageRGB8 imageRGB,
float  exponent = 0.5 
) const

Calculates an RGB image representing the histogram values.

Parameters:
imageRGBoutput image
exponentif not 1, perform non-linear value scaling
ImageMask* HistogramUV::getMask ( ColorImageUV8 imageUV,
GrayLevelImage8 imageY,
unsigned  minY = 20,
unsigned  maxY = 235 
) const

Calculate a binary image mask. If the color of the pixel is contained in the histogram, the mask is set to 255, 0 otherwise.

const Matrix<EntryT>& HistogramUV::getMatrix ( ) const [inline]
Returns:
matrix containing the histogram data

Definition at line 117 of file HistogramUV.h.

Returns:
the maximal value
Returns:
the mean value

Normalize the histogram to max=1.

HistogramUV& HistogramUV::operator= ( const HistogramUV other)

Assign operator.

void HistogramUV::printOn ( std::ostream &  strm)

Deserialize from stream.

Serialize to stream Print object information

void HistogramUV::substract ( float  value)

Substract a constant value, clipping at 0.


Member Data Documentation

unsigned HistogramUV::m_BinSize [private]

Size of one bin.

See also:
constructor

Definition at line 144 of file HistogramUV.h.

Pointer to the raw data of m_Matrix.

Definition at line 153 of file HistogramUV.h.

unsigned HistogramUV::m_DataLength [private]

Byte length of the histogram data.

Definition at line 156 of file HistogramUV.h.

Holds the histogram data.

Definition at line 150 of file HistogramUV.h.

unsigned HistogramUV::m_NumBins [private]

Number of bins per channel.

Definition at line 147 of file HistogramUV.h.


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


obj_rec_gui
Author(s): AGAS/agas@uni-koblenz.de
autogenerated on Mon Oct 6 2014 02:53:43