-
Notifications
You must be signed in to change notification settings - Fork 5
/
filters.h
54 lines (44 loc) · 1.19 KB
/
filters.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
/*
* File: filters.h
* Author: cosmin
*
* Created on December 2, 2010, 1:09 PM
*/
#ifndef FILTERS_H
#define FILTERS_H
#ifdef __cplusplus
extern "C" {
#endif
//the constants that define the "names" of the filters"
#define F_IDENTITY_C 0
#define F_SMOOTH_C 1
#define F_BLUR_C 2
#define F_SHARPEN_C 3
#define F_MEAN_REMOVE_C 4
#define F_EMBOSS_C 5
//The factors and values (in close relation with the constants above).
int F_FACTORS[]={ 1, 9, 16, 3, 1, 1};
int F_OFFSETS[]={ 0, 0, 0, 0, 0, 127};
//The convolution matrices
int F_IDENTITY[]= { 0, 0, 0,\
0, 1, 0,\
0, 0, 0 };
int F_SMOOTH[]= { 1, 1, 1,\
1, 1, 1,\
1, 1, 1 };
int F_BLUR[]= { 1, 2, 1,\
2, 4, 2,\
1, 2, 1 };
int F_SHARPEN[]= { 0,-2, 0,\
-2,11,-2,\
0,-2, 0 };
int F_MEAN_REMOVE[]= {-1,-1,-1,\
-1, 9,-1,\
-1,-1,-1 };
int F_EMBOSS[]= {-1, 0,-1,\
0, 4, 0,\
-1, 0,-1 };
#ifdef __cplusplus
}
#endif
#endif /* FILTERS_H */