1RELATIONAL(3) Library Functions Manual RELATIONAL(3)
2
3
4
6 im_equal, im_notequal, im_equalconst, im_equal_vec, im_notequalconst,
7 im_notequal_vec, im_less, im_lessconst, im_less_vec, im_more, im_more‐
8 const, im_more_vec, im_lesseq, im_lesseqconst, im_lesseq_vec,
9 im_moreeq, im_moreeqconst, im_moreeq_vec - relational tests on images.
10
12 #include <vips/vips.h>
13
14 int im_equal(a, b, out)
15 IMAGE *a, *b, *out;
16
17 int im_equalconst(a, out, c)
18 IMAGE *a, *out;
19 double c;
20
21 int im_equal_vec(a, out, n, v)
22 IMAGE *a, *out;
23 int n;
24 double *v;
25
26 int im_notequal(a, b, out)
27 IMAGE *a, *b, *out;
28
29 int im_notequalconst(a, out, c)
30 IMAGE *a, *out;
31 double c;
32
33 int im_notequal_vec(a, out, n, v)
34 IMAGE *a, *out;
35 int n;
36 double *v;
37
38 int im_less(a, b, out)
39 IMAGE *a, *b, *out;
40
41 int im_lessconst(a, out, c)
42 IMAGE *a, *out;
43 double c;
44
45 int im_less_vec(a, out, n, v)
46 IMAGE *a, *out;
47 int n;
48 double *v;
49
50 int im_more(a, b, out)
51 IMAGE *a, *b, *out;
52
53 int im_moreconst(a, out, c)
54 IMAGE *a, *out;
55 double c;
56
57 int im_more_vec(a, out, n, v)
58 IMAGE *a, *out;
59 int n;
60 double *v;
61
62 int im_lesseq(a, b, out)
63 IMAGE *a, *b, *out;
64
65 int im_lesseqconst(a, out, c)
66 IMAGE *a, *out;
67 double c;
68
69 int im_lesseq_vec(a, out, n)
70 IMAGE *a, *out;
71 int n;
72 double *v;
73
74 int im_moreeq(a, b, out)
75 IMAGE *a, *b, *out;
76
77 int im_moreeqconst(a, out, c)
78 IMAGE *a, *out;
79 double c;
80
81 int im_moreeq_vec(a, out, n, v)
82 IMAGE *a, *out;
83 int n;
84 double *v;
85
86
88 These functions perform a range of relational tests between images, or
89 between an image and a constant. Functions which take two images as
90 arguments require that the two images be the same size and have the
91 same number of bands. They can be of mixed type: you may compare an
92 unsigned char image with a double image.
93
94 All functions return an unsigned char image, with the same number of
95 bands as the input images, in which band elements have been set to 255
96 for true and 0 for false.
97
98 The logical functions (im_andimage(3), im_orimage(3), im_eorimage(3))
99 may be used to combine boolean images to make more complex tests. The
100 selection function im_ifthenelse(3) may be used to take action on the
101 result of a test.
102
103
105 All functions return 0 on success and -1 on error.
106
108 im_ifthenelse(3), im_andimage(3).
109
111 National Gallery, 1992
112
114 J. Cupitt
115
116
117
118 30 October 1992 RELATIONAL(3)