Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpStatisticalTestEWMA.h
1
/*
2
* ViSP, open source Visual Servoing Platform software.
3
* Copyright (C) 2005 - 2025 by Inria. All rights reserved.
4
*
5
* This software is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
* See the file LICENSE.txt at the root directory of this source
10
* distribution for additional information about the GNU GPL.
11
*
12
* For using ViSP with software that can not be combined with the GNU
13
* GPL, please contact Inria about acquiring a ViSP Professional
14
* Edition License.
15
*
16
* See https://visp.inria.fr for more information.
17
*
18
* This software was developed at:
19
* Inria Rennes - Bretagne Atlantique
20
* Campus Universitaire de Beaulieu
21
* 35042 Rennes Cedex
22
* France
23
*
24
* If you have questions regarding the use of this file, please contact
25
* Inria at visp@inria.fr
26
*
27
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29
*/
30
35
36
#ifndef VP_STATISTICAL_TEST_EWMA_H
37
#define VP_STATISTICAL_TEST_EWMA_H
38
39
#include <visp3/core/vpConfig.h>
40
41
#include <visp3/core/vpStatisticalTestAbstract.h>
42
43
BEGIN_VISP_NAMESPACE
77
class
VISP_EXPORT
vpStatisticalTestEWMA
:
public
vpStatisticalTestAbstract
78
{
79
protected
:
80
float
m_alpha
;
81
float
m_wt
;
82
float
m_wtprev
;
83
87
virtual
void
computeDeltaAndLimits
();
88
96
virtual
vpMeanDriftType
detectDownwardMeanDrift
() VP_OVERRIDE;
97
105
virtual
vpMeanDriftType
detectUpwardMeanDrift
() VP_OVERRIDE;
106
113
virtual
bool
updateStatistics
(const
float
&signal) VP_OVERRIDE;
114
120
virtual
void
updateTestSignals
(const
float
&signal) VP_OVERRIDE;
121
122
public:
128
vpStatisticalTestEWMA
(const
float
&alpha = 0.1f);
129
135
inline
float
getAlpha
()
const
136
{
137
return
m_alpha
;
138
}
139
145
inline
float
getWt
()
const
146
{
147
return
m_wt
;
148
}
149
155
void
init
(
const
float
&alpha);
156
164
void
init
(
const
float
&alpha,
const
float
&mean,
const
float
&stdev);
165
171
void
setAlpha(
const
float
&alpha);
172
};
173
END_VISP_NAMESPACE
174
#endif
vpStatisticalTestAbstract::vpMeanDriftType
vpMeanDriftType
Enum that indicates if a drift of the mean occurred.
Definition
vpStatisticalTestAbstract.h:70
vpStatisticalTestAbstract::init
void init()
(Re)Initialize the algorithm.
Definition
vpStatisticalTestAbstract.cpp:157
vpStatisticalTestAbstract::vpStatisticalTestAbstract
vpStatisticalTestAbstract()
Construct a new vpStatisticalTestAbstract object.
Definition
vpStatisticalTestAbstract.cpp:131
vpStatisticalTestAbstract::detectDownwardMeanDrift
virtual vpMeanDriftType detectDownwardMeanDrift()=0
Detects if a downward mean drift occurred.
vpStatisticalTestEWMA::m_wt
float m_wt
Definition
vpStatisticalTestEWMA.h:81
vpStatisticalTestEWMA::vpStatisticalTestEWMA
vpStatisticalTestEWMA(const float &alpha=0.1f)
Construct a new vpStatisticalTestEWMA object.
Definition
vpStatisticalTestEWMA.cpp:90
vpStatisticalTestEWMA::getWt
float getWt() const
Get the current value of the test signal.
Definition
vpStatisticalTestEWMA.h:145
vpStatisticalTestEWMA::updateTestSignals
virtual void updateTestSignals(const float &signal) VP_OVERRIDE
Update the test signals.
Definition
vpStatisticalTestEWMA.cpp:82
vpStatisticalTestEWMA::m_wtprev
float m_wtprev
Definition
vpStatisticalTestEWMA.h:82
vpStatisticalTestEWMA::getAlpha
float getAlpha() const
Get the forgetting factor of the algorithm.
Definition
vpStatisticalTestEWMA.h:135
vpStatisticalTestEWMA::updateStatistics
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...
Definition
vpStatisticalTestEWMA.cpp:69
vpStatisticalTestEWMA::computeDeltaAndLimits
virtual void computeDeltaAndLimits()
Compute the upper and lower limits of the test signal.
Definition
vpStatisticalTestEWMA.cpp:42
vpStatisticalTestEWMA::m_alpha
float m_alpha
Definition
vpStatisticalTestEWMA.h:80
vpStatisticalTestEWMA::detectUpwardMeanDrift
virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE
Detects if an upward mean drift occurred on the mean.
Definition
vpStatisticalTestEWMA.cpp:59
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
core
include
visp3
core
vpStatisticalTestEWMA.h
Generated by
1.17.0