36#ifndef VP_STATISTICAL_TEST_MEAN_ADJUSTED_CUSUM_H
37#define VP_STATISTICAL_TEST_MEAN_ADJUSTED_CUSUM_H
39#include <visp3/core/vpConfig.h>
41#include <visp3/core/vpStatisticalTestAbstract.h>
207 void init(
const float &h,
const float &k,
const unsigned int &nbPtsForStats);
218 void init(
const float &delta,
const float &limitDown,
const float &limitUp,
const unsigned int &nbPtsForStats);
230 void init(
const float &h,
const float &k,
const float &mean,
const float &stdev);
241 void init(
const float &delta,
const float &limitDown,
const float &limitUp,
const float &mean,
const float &stdev);
260 inline void setLimits(
const float &limitDown,
const float &limitUp)
vpMeanDriftType
Enum that indicates if a drift of the mean occurred.
void init()
(Re)Initialize the algorithm.
vpStatisticalTestAbstract()
Construct a new vpStatisticalTestAbstract object.
virtual vpMeanDriftType detectDownwardMeanDrift()=0
Detects if a downward mean drift occurred.
float getTestSignalMinus() const
Get the latest value of the test signal for downward jumps of the mean.
float getTestSignalPlus() const
Get the latest value of the test signal for upward jumps of the mean.
virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE
Detects if a upward jump occurred on the mean.
float getH() const
Get the alarm factor.
vpStatisticalTestMeanAdjustedCUSUM(const float &h=4.f, const float &k=1.f, const unsigned int &nbPtsForStats=30)
Construct a new vpStatisticalTestMeanAdjustedCUSUM object.
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...
virtual void computeDeltaAndLimits()
Compute the upper and lower limits of the test signal.
void setDelta(const float &delta)
Set the slack of the CUSUM test, i.e. the minimum value of the jumps we want to detect.
void setLimits(const float &limitDown, const float &limitUp)
Set the upward and downward jump limits.
float getDelta() const
Get the slack of the CUSUM test, i.e. amplitude of mean shift we want to be able to detect.
float getK() const
Get the detection factor.
virtual void updateTestSignals(const float &signal) VP_OVERRIDE
Update the test signals.