-
Notifications
You must be signed in to change notification settings - Fork 2
/
texture_features.h
54 lines (40 loc) · 1.87 KB
/
texture_features.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
/* ############################################################################
Name : texture_features.h
Company : S. Vagionitis
Project : Finding Clones
Programmer : S. Vagionitis
Revisor : S. Vagionitis
Description : Header file for texture features.
Programmer Date Action
============== ============== =================================================
S. Vagionitis 08/07/2010 Creation
############################################################################ */
#ifndef __TEXTURE_FEATURES_H__
#define __TEXTURE_FEATURES_H__
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define SMALL_NUMBER 0.000000001
#define MIN(a,b) ((a)<=(b)?(a):(b))
#define MAX(a,b) ((a)>=(b)?(a):(b))
#define MIN3(a,b,c) ((a)<=(b) ? (a)<=(c)?(a):(c) : (b)<=(c)?(b):(c) )
#define MAX3(a,b,c) ((a)>=(b) ? (a)>=(c)?(a):(c) : (b)>=(c)?(b):(c) )
#define GREYSCALE(r, g, b) ((unsigned char)(0.2126 * (double)(r)) + \
(unsigned char)(0.7152 * (double)(g)) + \
(unsigned char)(0.0722 * (double)(b)))
int glcm(unsigned char, int **, int, int, int, unsigned char *, double ***);
int texture_feature_angular_second_moment(double ***, int, double *);
int texture_feature_contrast(double ***, int, double *);
int texture_feature_correlation(double ***, int, double *);
int texture_feature_variance(double ***, int, double *);
int texture_feature_inverse_diff_moment(double ***, int, double *);
int texture_feature_sum_average(double ***, int, double *);
int texture_feature_sum_entropy(double ***, int, double *);
int texture_feature_sum_variance(double ***, int, double *, double *);
int texture_feature_entropy(double ***, int, double *);
int texture_feature_difference_variance(double ***, int, double *);
int texture_feature_difference_entropy(double ***, int, double *);
#endif