-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGaussianBlur.cpp
46 lines (45 loc) · 1.25 KB
/
GaussianBlur.cpp
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
#include "GaussianBlur.h"
using namespace std;
namespace cvImagePipeline {
namespace Filter {
///////////////////////////////////////////////////////////////////////////
// class GaussianBlur
IMPLEMENT_CVFILTER(GaussianBlur);
GaussianBlur::GaussianBlur()
: kernelWidth("kernelWidth", 5),
kernelHeight("kernelHeight", 5),
sigmaX("sigmaX", 1.0),
sigmaY("sigmaY", 0.0),
borderType("borderType", cv::BORDER_DEFAULT)
{
defParam(this->kernelWidth);
defParam(this->kernelHeight);
defParam(this->sigmaX);
defParam(this->sigmaY);
defParam(this->borderType);
}
GaussianBlur::GaussianBlur(
int kernelWidth, int kernelHeight,
double sigmaX, double sigmaY,
int borderType)
: kernelWidth("kernelWidth", kernelWidth),
kernelHeight("kernelHeight", kernelHeight),
sigmaX("sigmaX", sigmaX),
sigmaY("sigmaY", sigmaY),
borderType("borderType", borderType)
{
defParam(this->kernelWidth);
defParam(this->kernelHeight);
defParam(this->sigmaX);
defParam(this->sigmaY);
defParam(this->borderType);
}
void GaussianBlur::execute() {
const cv::Mat& inputMat = getInputMat();
cv::GaussianBlur(
inputMat, refOutputMat(),
cv::Size(kernelWidth, kernelHeight),
sigmaX, sigmaY, borderType);
}
}
}