1IM_MPERCENT(3) Library Functions Manual IM_MPERCENT(3)
2
3
4
6 im_mpercent - find threshold corresponding to a percentage of an image
7 values
8
10 #include <vips/vips.h>
11
12 int im_mpercent( in, percent, thresh )
13 IMAGE *in;
14 int percent;
15 int *thresh;
16
17
19 im_mpercent() returns (through the thresh parameter) the threshold
20 above which there are percent values of the input image. If for example
21 percent=.1, the number of pels of the input image with values greater
22 than the returned int will correspond to 10% of all pels of the image.
23
24 The function is applied on one band FMTUCHAR images only. It can be
25 used in order to threshold the scaled result of a filtering operation.
26
28 The function returns 0 on success and -1 on error.
29
31 im_conv(3), im_zerox(3).
32
34 N. Dessipris
35
37 N. Dessipris - 14/05/1991
38
39
40
41 14 May 1991 IM_MPERCENT(3)