1mlib_ImageMoment2(3MLIB) mediaLib Library Functions mlib_ImageMoment2(3MLIB)
2
3
4
6 mlib_ImageMoment2 - second moment
7
9 cc [ flag... ] file... -lmlib [ library... ]
10 #include <mlib.h>
11
12 mlib_status mlib_ImageMoment2(mlib_d64 *moment, const mlib_image *img);
13
14
16 The mlib_ImageMoment2() function computes the second moment of each
17 channel in an image.
18
19
20 It uses the following equation:
21
22 1 w-1 h-1
23 moment[i] = ----- * SUM SUM img[x][y][i]**2
24 w*h x=0 y=0
25
26
28 The function takes the following arguments:
29
30 moment Pointer to moment array, where length is the number of chan‐
31 nels in the image.
32
33
34 img Pointer to an image.
35
36
38 The function returns MLIB_SUCCESS if successful. Otherwise it returns
39 MLIB_FAILURE.
40
42 See attributes(5) for descriptions of the following attributes:
43
44
45
46
47 ┌─────────────────────────────┬─────────────────────────────┐
48 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
49 ├─────────────────────────────┼─────────────────────────────┤
50 │Interface Stability │Committed │
51 ├─────────────────────────────┼─────────────────────────────┤
52 │MT-Level │MT-Safe │
53 └─────────────────────────────┴─────────────────────────────┘
54
56 mlib_ImageMoment2_Fp(3MLIB), attributes(5)
57
58
59
60SunOS 5.11 2 Mar 2007 mlib_ImageMoment2(3MLIB)