-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathStatisticalFunctions.h
133 lines (99 loc) · 2.82 KB
/
StatisticalFunctions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#ifndef StatisticalFunctions_H
#define StatisticalFunctions_H
#include "StandardHeaders.h"
#include "sorting.h"
namespace IITkgp_functions {
/**
* Input single Channel 8 bit Data
* Output vector of float of size 256
*
*/
vector<float> FindHist(Mat Data);
/**
* @function FindMedian
* @param input vector of data
* @brief Calculate Median of Given data array
* @return median(double) of the given array
*/
template <typename T>
double FindMedian(vector<T> data);
void initializemedian();
/**
* @function FindMean
* @param input Single Channel Mat data
* @brief Calculate Mean of Given data array
* @return mean(double) of the given array
*/
double FindMean(Mat data);
/**
* @function FindVar
* @param input Single Channel Mat data
* @brief Calculate variance of Given data array
* @return Variance(double) of the given array
*/
double FindVar(Mat data);
/**
* @function FindStdDev
* @param input Single Channel Mat data
* @brief Calculate Standard Deviation of Given data array
* @return Standard Deviation(double) of the given array
*/
double FindStdDev(Mat data);
/**
* @function FindSkew
* @param input Single Channel Mat data
* @brief Calculate Skewness of Given data array
* @return Skewness(double) of the given array
*/
double FindSkew(Mat data);
/**
* @function FindMinElementPosi
* @param input Single Channel Mat data and pointer to min element and its position
* @brief Calculate Min value of Given data array and its position
*
*/
void FindMinElementPosi(Mat data, double *value, int *posi);
/**
* @function FindMaxElement
* @param input Single Channel Mat data and pointer to max element and pointer to position
* @brief Calculate Max value of Given data array and its position
*
*/
void FindMaxElementPosi(Mat data, double *value, int *posi);
/**
* @function FindMode
* @param input Single Channel Mat data
* @brief Calculate Mode of Given data array
* @return mean(double) of the given array
*/
double FindMode(Mat data);
/**
* @function FindVarMode
* @param input Single Channel Mat data
* @brief Calculate variance of Given data array
* @return Variance(double) of the given array
*/
double FindVarMode(Mat data);
/**
* @function FindStdDevMode
* @param input Single Channel Mat data
* @brief Calculate Standard Deviation of Given data array based on Mode of the data
* @return Standard Deviation(double) of the given array
*/
double FindStdDevMode(Mat data);
/**
* @function FindHistogram
* @param input Single Channel Mat data
* @brief Calculate Histogram of the data
* @return Histogram data of the element
*/
Mat FindHistogram(Mat data);
/**
* @function DrawHistogram
* @param input Single Channel Mat data
* @brief Calculate Histogram of the data and Draw it
*
*/
void DrawHistogram(Mat data);
}
#endif