VAT
3.0
Video Analysis Tool
Main Page
ToDo
Modules
Parameters
Classes
Files
File List
File Members
src
MathFunctions.h
1
#ifndef _MATHFUNCTIONS_H_
2
#define _MATHFUNCTIONS_H_
3
4
#include <opencv2/core.hpp>
5
6
#define NUMERIC_ERROR 1e-10
7
8
class
MathFunctions
{
9
public
:
10
11
static
double
ONE_DIV_SQRT_2PI;
12
13
static
int
square(
int
arg);
14
15
static
double
square(
double
arg);
16
17
/* A normal distribution is
18
* square(x-m)
19
* 1 - --------------
20
* y(x,m,s) = ------------ * e 2*square(s)
21
* sqrt(2*pi*s)
22
*
23
* This functions returns only
24
*
25
* square(x-m)
26
* - -----------
27
* y(x,m,s) = e 2*square(s)
28
*
29
* because we want that y(m,m,s) = 1. Remember that y(m+/-s,m,s) = 0.606
30
*/
31
32
static
double
gaussian(
double
i_mean,
double
i_sigma,
double
i_x);
33
34
//Returns the real one
35
static
double
normalised_gaussian(
double
i_mean,
double
i_sigma,
double
i_x);
36
37
static
int
roundInt(
double
i_value);
38
39
static
double
ceilOrFloor(
double
value);
40
41
static
bool
areEqual(
double
value1,
double
value2);
42
43
static
double
incrementalMean(
double
mean,
double
value,
double
Ncurrent);
44
static
double
incrementalSigma(
double
mean,
double
sigma,
double
value,
double
Ncurrent);
45
static
double
incrementalVariance(
double
mean,
double
var,
double
value,
double
Ncurrent);
46
47
static
int
Hamming(cv::Mat &d1, cv::Mat &d2);
48
49
};
50
51
#endif // _MATHFUNCTIONS_H_
MathFunctions
Definition:
MathFunctions.h:8
Generated on Fri Jan 15 2016 06:14:52 for VAT by
1.8.11