Color model class. More...
#include <fgbgsegment.h>
Public Member Functions | |
ColorModel (FgBgSegment &segm) | |
Constructor. | |
ColorModel (const ColorModel &model) | |
Copy Constructor. | |
float | CreateHistogram (Image< float > &probabilities, bool allPoints) |
Creates the disparity histogram. | |
void | CreateHistogram (Image< uint8_t > &mask, bool allPoints) |
Creates the colour histograms. | |
void | NormalizeHist (float *const histogram, float *const cost, int size) |
ColorModel & | operator= (const ColorModel &model) |
Copy color and cost histograms to destination color model. | |
void | SmoothAndNormalizeHist (float const *hist, float const *phist, int size, float *const histogram, float *const cost) |
Normalises histograms. | |
virtual void | Update () |
Updates the histograms. | |
~ColorModel () | |
Public Attributes | |
float | colorcost [hist_size *hist_size] |
float | greycost [hist_size] |
float | greyhist [hist_size] |
float | histogram [hist_size *hist_size] |
ColorModel * | prior |
Prior Color model. | |
Static Public Attributes | |
static const float | weight = 0.01 |
Protected Attributes | |
FgBgSegment & | segm |
Segmentation object. |
Color model class.
Definition at line 117 of file fgbgsegment.h.
FgBgSegment::ColorModel::ColorModel | ( | const ColorModel & | model | ) |
Definition at line 118 of file fgbgsegment.cpp.
float FgBgSegment::ColorModel::CreateHistogram | ( | Image< float > & | probabilities, |
bool | allPoints | ||
) |
Creates the disparity histogram.
probabilities | Probabilities of each pixel to belong to that specific model. |
allPoints | If true all pixels are included. If false only those pixels with a disparity value within the range are considered. |
Definition at line 920 of file fgbgsegment.cpp.
void FgBgSegment::ColorModel::CreateHistogram | ( | Image< uint8_t > & | mask, |
bool | allPoints | ||
) |
Creates the colour histograms.
mask | Binary segmentation mask of which all inside the segmentation is considered for the histogram |
Definition at line 1057 of file fgbgsegment.cpp.
void FgBgSegment::ColorModel::NormalizeHist | ( | float *const | histogram, |
float *const | cost, | ||
int | size | ||
) |
Definition at line 1043 of file fgbgsegment.cpp.
FgBgSegment::ColorModel & FgBgSegment::ColorModel::operator= | ( | const ColorModel & | model | ) |
Copy color and cost histograms to destination color model.
Definition at line 109 of file fgbgsegment.cpp.
void FgBgSegment::ColorModel::SmoothAndNormalizeHist | ( | float const * | hist, |
float const * | phist, | ||
int | size, | ||
float *const | histogram, | ||
float *const | cost | ||
) |
Normalises histograms.
Definition at line 1004 of file fgbgsegment.cpp.
virtual void FgBgSegment::ColorModel::Update | ( | ) | [inline, virtual] |
Updates the histograms.
Reimplemented in FgBgSegment::Background, FgBgSegment::Foreground, and FgBgSegment::FlatSurface.
Definition at line 157 of file fgbgsegment.h.
Definition at line 127 of file fgbgsegment.h.
Definition at line 128 of file fgbgsegment.h.
Definition at line 126 of file fgbgsegment.h.
Definition at line 125 of file fgbgsegment.h.
Prior Color model.
Definition at line 130 of file fgbgsegment.h.
FgBgSegment& FgBgSegment::ColorModel::segm [protected] |
Segmentation object.
Definition at line 120 of file fgbgsegment.h.
const float FgBgSegment::ColorModel::weight = 0.01 [static] |
Definition at line 123 of file fgbgsegment.h.