Visual Servoing Platform
version 3.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
vpStatisticalTestHinkley.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_HINKLEY_H
37
#define VP_STATISTICAL_TEST_HINKLEY_H
38
39
#include <visp3/core/vpConfig.h>
40
41
#include <visp3/core/vpStatisticalTestAbstract.h>
42
43
BEGIN_VISP_NAMESPACE
94
class
VISP_EXPORT
vpStatisticalTestHinkley
:
public
vpStatisticalTestAbstract
95
{
96
protected
:
97
float
m_dmin2
;
98
float
m_alpha
;
99
float
m_Sk
;
100
float
m_Mk
;
101
float
m_Tk
;
102
float
m_Nk
;
103
bool
m_computeDeltaAndAlpha
;
105
float
m_h
;
106
float
m_k
;
107
111
virtual
void
computeAlphaDelta
();
112
119
void
computeMean
(
double
signal);
120
126
void
computeSk
(
double
signal);
127
131
void
computeMk
();
132
138
void
computeTk
(
double
signal);
139
143
void
computeNk
();
144
150
virtual
vpMeanDriftType
detectDownwardMeanDrift
() VP_OVERRIDE;
151
159
virtual
vpMeanDriftType
detectUpwardMeanDrift
() VP_OVERRIDE;
160
167
virtual
bool
updateStatistics
(const
float
&signal) VP_OVERRIDE;
168
174
virtual
void
updateTestSignals
(const
float
&signal) VP_OVERRIDE;
175
176
public:
185
vpStatisticalTestHinkley
();
186
197
vpStatisticalTestHinkley
(const
float
&alpha, const
float
&delta, const
unsigned
int
&nbSamplesForInit = 30);
198
208
vpStatisticalTestHinkley
(const
float
&h, const
float
&k, const
bool
&computeAlphaDeltaFromStdev, const
unsigned
int
&nbSamplesForInit = 30);
209
219
vpStatisticalTestHinkley
(const
float
&h, const
float
&k, const
float
&mean, const
float
&stdev);
220
226
inline
float
getAlpha
()
const
{
return
m_alpha
; }
227
233
inline
float
getSk
()
const
{
return
m_Sk
; }
234
240
inline
float
getMk
()
const
{
return
m_Mk
; }
241
248
inline
float
getTk
()
const
{
return
m_Tk
; }
249
255
inline
float
getNk
()
const
{
return
m_Nk
; }
256
261
void
init
();
262
271
void
init
(
const
float
&alpha,
const
float
&delta,
const
unsigned
int
&nbSamplesForInit);
272
282
void
init
(
const
float
&h,
const
float
&k,
const
bool
&computeAlphaDeltaFromStdev,
const
unsigned
int
&nbSamplesForInit);
283
292
void
init
(
const
float
&alpha,
const
float
&delta,
const
float
&mean);
293
303
void
init
(
const
float
&h,
const
float
&k,
const
float
&mean,
const
float
&stdev);
304
310
void
setDelta(
const
float
&delta);
311
317
void
setAlpha(
const
float
&alpha);
318
};
319
END_VISP_NAMESPACE
320
#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.
vpStatisticalTestHinkley::m_dmin2
float m_dmin2
Definition
vpStatisticalTestHinkley.h:97
vpStatisticalTestHinkley::vpStatisticalTestHinkley
vpStatisticalTestHinkley()
Construct a new vpStatisticalTestHinkley object. Call init() to initialise the Hinkley's test and set...
Definition
vpStatisticalTestHinkley.cpp:49
vpStatisticalTestHinkley::m_h
float m_h
Definition
vpStatisticalTestHinkley.h:105
vpStatisticalTestHinkley::m_Sk
float m_Sk
Definition
vpStatisticalTestHinkley.h:99
vpStatisticalTestHinkley::m_Tk
float m_Tk
Definition
vpStatisticalTestHinkley.h:101
vpStatisticalTestHinkley::computeAlphaDelta
virtual void computeAlphaDelta()
Compute and from the standard deviation of the signal.
Definition
vpStatisticalTestHinkley.cpp:158
vpStatisticalTestHinkley::getAlpha
float getAlpha() const
Get the threshold indicating that a mean drift occurs.
Definition
vpStatisticalTestHinkley.h:226
vpStatisticalTestHinkley::getNk
float getNk() const
Get the minimum of the test signal for upward mean drift .
Definition
vpStatisticalTestHinkley.h:255
vpStatisticalTestHinkley::computeTk
void computeTk(double signal)
Compute .
Definition
vpStatisticalTestHinkley.cpp:191
vpStatisticalTestHinkley::computeMk
void computeMk()
Compute , the maximum value of .
Definition
vpStatisticalTestHinkley.cpp:184
vpStatisticalTestHinkley::detectUpwardMeanDrift
virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE
Detects if an upward mean drift occurred on the mean.
Definition
vpStatisticalTestHinkley.cpp:212
vpStatisticalTestHinkley::computeNk
void computeNk()
Compute , the minimum value of .
Definition
vpStatisticalTestHinkley.cpp:196
vpStatisticalTestHinkley::getTk
float getTk() const
Get the test signal for upward mean drift..
Definition
vpStatisticalTestHinkley.h:248
vpStatisticalTestHinkley::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
vpStatisticalTestHinkley.cpp:221
vpStatisticalTestHinkley::computeSk
void computeSk(double signal)
Compute .
Definition
vpStatisticalTestHinkley.cpp:179
vpStatisticalTestHinkley::computeMean
void computeMean(double signal)
Compute the mean value of the signal. The mean value must be computed before the mean drift is estim...
Definition
vpStatisticalTestHinkley.cpp:166
vpStatisticalTestHinkley::m_alpha
float m_alpha
Definition
vpStatisticalTestHinkley.h:98
vpStatisticalTestHinkley::getSk
float getSk() const
Get the test signal for downward mean drift.
Definition
vpStatisticalTestHinkley.h:233
vpStatisticalTestHinkley::updateTestSignals
virtual void updateTestSignals(const float &signal) VP_OVERRIDE
Update the test signals.
Definition
vpStatisticalTestHinkley.cpp:238
vpStatisticalTestHinkley::m_computeDeltaAndAlpha
bool m_computeDeltaAndAlpha
Definition
vpStatisticalTestHinkley.h:103
vpStatisticalTestHinkley::m_Mk
float m_Mk
Definition
vpStatisticalTestHinkley.h:100
vpStatisticalTestHinkley::getMk
float getMk() const
Get the maximum of the test signal for downward mean drift .
Definition
vpStatisticalTestHinkley.h:240
vpStatisticalTestHinkley::m_Nk
float m_Nk
Definition
vpStatisticalTestHinkley.h:102
vpStatisticalTestHinkley::m_k
float m_k
Definition
vpStatisticalTestHinkley.h:106
BEGIN_VISP_NAMESPACE
Definition
vpMbtDistanceCircle.cpp:55
modules
core
include
visp3
core
vpStatisticalTestHinkley.h
Generated by
1.17.0