1IM_SGLDS_MATRIX(3) Library Functions Manual IM_SGLDS_MATRIX(3)
2
3
4
6 im_glds_matrix, im_glds_asm, im_glds_contrast, im_glds_mean,
7 im_glds_entropy - calculate the spatial grey level difference matrix
8 and features on it
9
11 #include <vips/vips.h>
12
13 int im_glds_matrix(im, m, xp, yp, xs, ys, dx, dy)
14 IMAGE *im, *m;
15 int xp, yp, xs, ys;
16 int dx, dy;
17
18 int im_glds_asm(m, asmoment)
19 IMAGE *m;
20 double *asmoment;
21
22 int im_glds_contrast(m, contrast)
23 IMAGE *m;
24 double *contrast;
25
26 int im_glds_entropy(m, entropy)
27 IMAGE *m;
28 double *entropy;
29
30 int im_glds_mean(m, mean)
31 IMAGE *m;
32 double *mean;
33
34
36 im_glds_matrix() creates a 256 by 1 one channel spatial grey level dif‐
37 ference matrix (sglds) of the box determined by the parameters (xp, yp;
38 xs, ys) within the image pointed by the IMAGE descriptor im. The
39 matrix is written onto the IMAGE descriptor m. The displacement vector
40 is determined by (dx, dy). The user must ensure that there is enough
41 border pixels around the box within im dictated by the displacement
42 vector (dx,dy) or else the program fails. im should be one-band
43 unsigned char.
44
45 All entries of the sgld matrix are double normalised to the number of
46 pairs involved. This function is a direct implementation of the paper:
47 Haralick R. M., Shanmugan K. and Dinstein I., 'Textural features for
48 image classification', IEEE Transactions on Systems, Man, and Cybernet‐
49 ics, Vol. SMC-3, No 6, Nov. 1973, pp 610-621.
50
51 im_glds_asm() calculates the angular second moment of the co-occurrence
52 matrix held by m. The result is returned into the location pointed by
53 asmoment.
54
55 im_glds_contrast() calculates the contrast of the sglds matrix held by
56 m. The result is returned into the location pointed by contrast.
57
58 im_glds_entropy() calculates the entropy of the sglds matrix held by m.
59 The result is returned into the location pointed by entropy.
60
61 im_glds_mean() calculates the mean of the sglds matrix held by m. The
62 result is returned into the location pointed by mean.
63
65 All functions returns 0 on success and -1 on error.
66
68 im_cooc_matrix(3)
69
71 N. Dessipris
72
74 N. Dessipris - 10/05/1991
75
76
77
78 10 May 1991 IM_SGLDS_MATRIX(3)