1STATS(3)                   Library Functions Manual                   STATS(3)
2
3
4

NAME

6       im_avg,  im_deviate,  im_min,  im_minpos,  im_max, im_maxpos - find the
7       mean, standard deviation, minimum and maximum of an image
8

SYNOPSIS

10       #include <vips/vips.h>
11
12       int im_avg(im, out)
13       IMAGE *im;
14       double *out;
15
16       int im_deviate(im, out)
17       IMAGE *im;
18       double *out;
19
20       int im_min(im, out)
21       IMAGE *im;
22       double *out;
23
24       int im_minpos(im, xpos, ypos, min)
25       IMAGE *im;
26       int *xpos, *ypos;
27       double *min;
28
29       int im_max(im, out)
30       IMAGE *im;
31       double *out;
32
33       int im_maxpos(im, xpos, ypos, max)
34       IMAGE *im;
35       int *xpos, *ypos;
36       double *max;
37
38

DESCRIPTION

40       These functions find the mean, standard deviation, minimum, maximum  of
41       an  image.  They operate on all bands of the input image.  All computa‐
42       tions are carried out in double  precision  arithmetic.   The  standard
43       deviation is calculated using the formula:
44
45        Var{E} = E{X^2} - (E{X})^2)
46        stdev{E} = sqrt(Var{E}).
47
48       im_avg(3)  finds the average of an image pointed by im.  Takes as input
49       any non-complex image format and  returns  a  double  at  the  location
50       pointed by out.
51
52       im_deviate(3)  finds  the standard deviation of an image pointed by im.
53       Takes as input any non-complex image format and returns a double at the
54       location pointed by out.
55
56       im_min(3)  finds  the  the minimum value of the image pointed by im and
57       returns it at the location pointed by out.  Takes as  input  any  image
58       format  and  returns a double at the location pointed by out.  If input
59       is complex the min square amplitude (re*re+im*im) is returned.
60
61       im_minpos(3) finds the the minimum value of the image pointed by im and
62       returns it at the location pointed by out.  The coordinates of the last
63       occurrence of min is returned at locations pointed by xpos,  ypos.   If
64       input is complex the min square amplitude (re*re+im*im) is returned.
65
66       im_max(3)  finds  the  the maximum value of the image pointed by im and
67       returns it at the location pointed by out.  If input is complex the min
68       square amplitude (re*re+im*im) is returned.
69
70       im_maxpos(3) finds the the maximum value of the image pointed by im and
71       returns it at the location pointed by max.  The coordinates of the last
72       occurrence  of  max is returned at locations pointed by xpos, ypos.  If
73       input is complex the max square amplitude (re*re+im*im)  and  its  last
74       occurrence is returned.
75

RETURN VALUE

77       All functions return 0 on success and -1 on error.
78

SEE ALSO

80       im_exptra(3), im_lintra(3), im_abs(3), im_stats(3).
81
83       N. Dessipris
84

AUTHOR

86       N. Dessipris - 24/04/1991
87       J. Cupitt - 21/7/93
88
89
90
91                                 24 April 1991                        STATS(3)
Impressum