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

NAME

6       im_thresh, im_slice - threshold an image
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_thresh(in, out, threshold)
12       IMAGE *in, *out;
13       double threshold;
14
15       int im_slice(in, out, threshold1, threshold2)
16       IMAGE *in, *out;
17       double threshold1, threshold2;
18

DESCRIPTION

20       These  functions  have  been  replaced  with the relational and boolean
21       packages - see im_lessconst() and im_and()  for  much  better  ways  of
22       doing this.
23
24       These  functions operate on any non-complex input.  The output image is
25       a unsigned char image with the same sizes and the same number of  chan‐
26       nels as input.
27
28       im_slice()  thresholds the image held by image descriptor in and writes
29       the result on the image descriptor out.  Output is a  byte  image  with
30       values  less  than threshold1) set to 0, values in [threshold1, thresh‐
31       old2) set to 128 and values greater than threshold2 set to 255   (x  in
32       range [a,b) means a<=x<b).
33
34       im_threshold()  thresholds  the  image  held by image descriptor in and
35       writes the result on the image descriptor out.  Output is a byte  image
36       with  values  less than threshold set to 0, and values greater or equal
37       to threshold set to 255.
38

RETURN VALUE

40       The function returns 0 on success and -1 on error.
41

SEE ALSO

43       im_dilate(3), im_erode(3), im_lessconst(3), im_and(3).
44
46       N. Dessipris,
47

AUTHOR

49       N. Dessipris - 26/04/1991
50
51
52
53                                 26 April 1991                    IM_THRESH(3)
Impressum