Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics Struct Reference

#include <vpRBProbabilistic3DDriftDetector.h>

Public Member Functions

 ColorStatistics ()=default
void init (const vpRGBf &c, const vpRGBf &var)
void update (const vpRGBf &c, float weight)
double probability (const vpRGBf &c)
double trace ()
double covarianceScaleFactor () const

Public Attributes

vpRGBf mean
vpRGBf variance
vpRGBf initVariance

Detailed Description

Online estimation of a Gaussian color distribution $\mathcal{N}(\mathbf{\bar c}, \mathbf{\Sigma_c^2})$, Where $\mathbf{\Sigma_c^2}$ is a diagonal variance matrix $diag(\sigma_r^2, \sigma_g^2, \sigma_b^2)$.

This class uses exponential moving average and variance estimation to approximage the distribution of the different RGB color components.

It does not estimate the full covariance matrix, but rather the variance of the individual RGB components.

Definition at line 116 of file vpRBProbabilistic3DDriftDetector.h.

Constructor & Destructor Documentation

◆ ColorStatistics()

vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::ColorStatistics ( )
default

Member Function Documentation

◆ covarianceScaleFactor()

double vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::covarianceScaleFactor ( ) const
inline

Definition at line 186 of file vpRBProbabilistic3DDriftDetector.h.

References variance.

◆ init()

void vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::init ( const vpRGBf & c,
const vpRGBf & var )
inline

◆ probability()

double vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::probability ( const vpRGBf & c)
inline

Computes the probability that the input color was sampled from the estimated distribution.

Parameters
c
Returns
the probability $ p(\mathbf{c} | \mathcal{N}(\mathbf{\bar c}, \mathbf{\Sigma_c})) $

Definition at line 150 of file vpRBProbabilistic3DDriftDetector.h.

References vpRGBf::B, vpRGBf::G, initVariance, mean, and vpRGBf::R.

◆ trace()

double vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::trace ( )
inline

Definition at line 174 of file vpRBProbabilistic3DDriftDetector.h.

References variance.

◆ update()

void vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::update ( const vpRGBf & c,
float weight )
inline

Update the color distribution with a new sample c.

Parameters
c
weightThe importance of c (between 0 and 1) in the distribution update (see Exponential moving average). A high value prioritizes the last seen values.

Definition at line 135 of file vpRBProbabilistic3DDriftDetector.h.

References vpRGBf::B, vpRGBf::G, mean, vpRGBf::R, and variance.

Member Data Documentation

◆ initVariance

vpRGBf vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::initVariance

Definition at line 196 of file vpRBProbabilistic3DDriftDetector.h.

Referenced by init(), and probability().

◆ mean

vpRGBf vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::mean

Definition at line 194 of file vpRBProbabilistic3DDriftDetector.h.

Referenced by init(), probability(), and update().

◆ variance

vpRGBf vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::variance

Definition at line 195 of file vpRBProbabilistic3DDriftDetector.h.

Referenced by covarianceScaleFactor(), init(), trace(), and update().