1mlib_ImageMean(3MLIB)     mediaLib Library Functions     mlib_ImageMean(3MLIB)
2
3
4

NAME

6       mlib_ImageMean - image mean
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageMean(mlib_d64 *mean, const mlib_image *img);
13
14

DESCRIPTION

16       The mlib_ImageMean() function computes the mean value of all the pixels
17       in the image.
18
19
20       It uses the following equation:
21
22                     1     w-1 h-1
23         mean[i] = ----- * SUM SUM img[x][y][i]
24                    w*h    x=0 y=0
25
26

PARAMETERS

28       The function takes the following arguments:
29
30       mean    Pointer to mean array, where length is the number  of  channels
31               in the image. mean[i] contains the mean of channel i.
32
33
34       img     Pointer to an image.
35
36

RETURN VALUES

38       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
39       MLIB_FAILURE.
40

ATTRIBUTES

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

SEE ALSO

56       mlib_ImageMean_Fp(3MLIB),    mlib_ImageStdDev(3MLIB),    mlib_ImageStd‐
57       Dev_Fp(3MLIB), attributes(5)
58
59
60
61SunOS 5.11                        2 Mar 2007             mlib_ImageMean(3MLIB)
Impressum