37 #ifndef _vpStatisticalTestShewhartTest_h_
38 #define _vpStatisticalTestShewhartTest_h_
42 #include <visp3/core/vpConfig.h>
43 #include <visp3/core/vpStatisticalTestSigma.h>
87 static std::string vpWecoRulesAlarmToString(
const vpWecoRulesAlarm &alarm);
89 static const bool CONST_ALL_WECO_ACTIVATED[COUNT_WECO - 1];
90 static const unsigned int NB_DATA_SIGNAL = 8;
94 float m_signal[NB_DATA_SIGNAL];
97 bool m_activatedWECOrules[COUNT_WECO - 1];
110 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
123 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
136 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
148 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
159 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
174 vpStatisticalTestShewhart(
const bool &activateWECOrules =
true,
const bool activatedRules[COUNT_WECO - 1] = CONST_ALL_WECO_ACTIVATED,
const unsigned int &nbSamplesForStats = 30);
186 vpStatisticalTestShewhart(
const bool &activateWECOrules,
const bool activatedRules[COUNT_WECO - 1],
const float &mean,
const float &stdev);
203 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
209 return m_signal[m_idCurrentData];
217 std::vector<float> getSignals()
const;
228 void init(
const bool &activateWECOrules,
const bool activatedRules[COUNT_WECO - 1] = CONST_ALL_WECO_ACTIVATED,
const unsigned int &nbSamplesForStats = 30);
240 void init(
const bool &activateWECOrules,
const bool activatedRules[COUNT_WECO - 1],
const float &mean,
const float &stdev);
vpMeanDriftType
Enum that indicates if a drift of the mean occurred.
void init()
(Re)Initialize the algorithm.
Class that permits a Shewhart's test.
vpWecoRulesAlarm getAlarm() const
Get the alarm raised by the last test due to the WECO's rules.
unsigned int m_nbDataInBuffer
virtual float getSignal() const override
Get the last value of the signal.
unsigned int m_idCurrentData
Class that permits a simple test comparing the current value to the standard deviation of the signal.
virtual float getSignal() const
Get the last value of the signal.
virtual vpMeanDriftType detectUpwardMeanDrift() override
Detects if an upward mean drift occurred on the mean.
virtual vpMeanDriftType detectDownwardMeanDrift() override
Detects if a downward mean drift occurred.
virtual bool updateStatistics(const float &signal) override
Update m_s and if enough values are available, compute the mean, the standard deviation and the limit...
virtual void computeLimits()
Compute the upper and lower limits of the test signal.
virtual void updateTestSignals(const float &signal) override
Update the test signals.