test_math_erodeAndGaussianBlurCommandTest.h 1.24 KB
Newer Older
Ahmed's avatar
Ahmed committed
1
2
3
4
5
6
#ifndef TEST_MATH_ERODEANDGAUSSIANBLURCOMMANDTEST
#define TEST_MATH_ERODEANDGAUSSIANBLURCOMMANDTEST
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include "armadillo"
Ahmed's avatar
Ahmed committed
7
8
9
#include "test_math_erodeAndGaussianBlurCommandTest_gaussBlur.h"
#include "test_math_erodeAndGaussianBlurCommandTest_arm.h"
#include "test_math_erodeAndGaussianBlurCommandTest_cvtColor.h"
Ahmed's avatar
Ahmed committed
10
11
12
using namespace arma;
class test_math_erodeAndGaussianBlurCommandTest{
public:
Ahmed's avatar
Ahmed committed
13
14
15
16
17
18
19
20
21
22
Cube<unsigned char> imageIn;
int sizeXIn;
int sizeYIn;
double sigmaXIn;
double sigmaYIn;
int colorConversionIn;
Cube<unsigned char> modImageOut;
test_math_erodeAndGaussianBlurCommandTest_gaussBlur gaussBlur;
test_math_erodeAndGaussianBlurCommandTest_arm arm;
test_math_erodeAndGaussianBlurCommandTest_cvtColor cvtColor;
Ahmed's avatar
Ahmed committed
23
24
void init()
{
Ahmed's avatar
Ahmed committed
25
26
27
28
29
imageIn = Cube<unsigned char>(960, 720, 3);
modImageOut = Cube<unsigned char>(960, 720, 3);
gaussBlur.init();
arm.init();
cvtColor.init();
Ahmed's avatar
Ahmed committed
30
}
Ahmed's avatar
Ahmed committed
31
32
void execute()
{
Ahmed's avatar
Ahmed committed
33
34
35
36
37
38
39
40
41
42
43
44
gaussBlur.src = imageIn;
gaussBlur.sizeX = sizeXIn;
gaussBlur.sizeY = sizeYIn;
gaussBlur.sigmaX = sigmaXIn;
gaussBlur.sigmaY = sigmaYIn;
gaussBlur.execute();
arm.src = gaussBlur.dst;
arm.execute();
cvtColor.src = arm.dst;
cvtColor.colorConversion = colorConversionIn;
cvtColor.execute();
modImageOut = cvtColor.dst;
Ahmed's avatar
Ahmed committed
45
46
47
48
}

};
#endif