Visual Servoing Platform  version 3.6.1 under development (2025-02-17)
vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics Struct Reference

#include <visp3/rbt/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 ()
 
void computeStddev ()
 

Public Attributes

vpRGBf mean
 
vpRGBf variance
 
vpRGBf standardDev
 

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 102 of file vpRBProbabilistic3DDriftDetector.h.

Constructor & Destructor Documentation

◆ ColorStatistics()

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

Member Function Documentation

◆ computeStddev()

void vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::computeStddev ( )
inline

Definition at line 152 of file vpRBProbabilistic3DDriftDetector.h.

◆ init()

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

Definition at line 106 of file vpRBProbabilistic3DDriftDetector.h.

◆ 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 134 of file vpRBProbabilistic3DDriftDetector.h.

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

◆ trace()

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

Definition at line 147 of file vpRBProbabilistic3DDriftDetector.h.

◆ 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 119 of file vpRBProbabilistic3DDriftDetector.h.

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

Member Data Documentation

◆ mean

vpRGBf vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::mean

Definition at line 159 of file vpRBProbabilistic3DDriftDetector.h.

◆ standardDev

vpRGBf vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::standardDev

Definition at line 161 of file vpRBProbabilistic3DDriftDetector.h.

◆ variance

vpRGBf vpRBProbabilistic3DDriftDetector::vpStored3DSurfaceColorPoint::ColorStatistics::variance

Definition at line 160 of file vpRBProbabilistic3DDriftDetector.h.