39 #include <visp3/core/vpStatisticalTestHinkley.h>
40 #include <visp3/core/vpMath.h>
57 , m_computeDeltaAndAlpha(false)
66 , m_dmin2(delta_val / 2.f)
72 , m_computeDeltaAndAlpha(false)
76 init(alpha, delta_val, nbSamplesForInit);
82 init(h, k, computeAlphaDeltaFromStdev, nbSamplesForInit);
88 init(h, k, mean, stdev);
127 if (!computeAlphaDeltaFromStdev) {
error that can be emitted by ViSP classes.
@ badValue
Used to indicate that a value is not in the allowed range.
static Type maximum(const Type &a, const Type &b)
Base class for methods detecting the drift of the mean of a process.
vpMeanDriftType
Enum that indicates if a drift of the mean occurred.
void init()
(Re)Initialize the algorithm.
virtual bool updateStatistics(const float &signal)
Update m_s and if enough values are available, compute the mean, the standard deviation and the limit...
void setNbSamplesForStat(const unsigned int &nbSamples)
Set the number of samples required to compute the mean and standard deviation of the signal and alloc...
bool m_areStatisticsComputed
vpStatisticalTestHinkley()
Construct a new vpStatisticalTestHinkley object. Call init() to initialise the Hinkley's test and set...
void setAlpha(const float &alpha)
The threshold indicating that a mean drift occurs.
virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE
Detects if a downward mean drift occurred.
virtual ~vpStatisticalTestHinkley()
Destroy the vpStatisticalTestHinkley object.
virtual void computeAlphaDelta()
Compute and from the standard deviation of the signal.
void setDelta(const float &delta)
Set the drift minimal magnitude that we want to detect.
void computeTk(double signal)
Compute .
void computeMk()
Compute , the maximum value of .
virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE
Detects if an upward mean drift occurred on the mean.
void computeNk()
Compute , the minimum value of .
virtual bool updateStatistics(const float &signal) VP_OVERRIDE
Update m_s and if enough values are available, compute the mean, the standard deviation and the limit...
void computeSk(double signal)
Compute .
void init()
Initialise the Hinkley's test by setting the mean signal value to zero as well as .
void computeMean(double signal)
Compute the mean value of the signal. The mean value must be computed before the mean drift is estim...
virtual void updateTestSignals(const float &signal) VP_OVERRIDE
Update the test signals.
bool m_computeDeltaAndAlpha