forked from lucasw/vimjay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filter.h
96 lines (73 loc) · 1.64 KB
/
filter.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
#ifndef __FILTER_H__
#define __FILTER_H__
#include "nodes.h"
#include "modify.h"
//#include <iostream>
//#include <stdio.h>
namespace bm {
class FilterFIR : public Buffer
{
public:
/// filter coefficients
std::vector<float> xi;
FilterFIR(const std::string name);
void setup(const std::vector<float> new_xi);
virtual bool update();
virtual bool handleKey(int key);
};
class Sobel : public ImageNode
{
public:
Sobel(const std::string name);
virtual bool update();
};
class Laplacian : public ImageNode
{
public:
Laplacian(const std::string name);
virtual bool update();
};
class GaussianBlur : public ImageNode
{
public:
GaussianBlur(const std::string name);
virtual bool update();
};
class MedianBlur : public ImageNode
{
public:
MedianBlur(const std::string name);
virtual bool update();
};
class BilateralFilter : public ImageNode
{
public:
BilateralFilter(const std::string name);
virtual bool update();
};
class InPaint : public ImageNode
{
public:
InPaint(const std::string name);
virtual bool update();
};
class MorphologyEx : public ImageNode
{
public:
MorphologyEx(const std::string name);
virtual bool update();
};
class OpticalFlow : public Remap
{
// a CV_32F image, so not suitable for use in a signal/connector
cv::Mat flow;
cv::Mat flow_reverse;
public:
OpticalFlow(const std::string name);
virtual bool update();
};
// TBD an IIR could be generated from a FIR chained to another FIR with an add block at the end
// but it would be nice to be able to capture that inside a single Node- how to correctly handle
// hierarchical nodes?
} // namespace bm
#endif // __FILTER_H__