blob: e953cda7a56e5d5192d8043ae62ff0f96777ac17 [file] [log] [blame]
.TH RELATIONAL 3 "30 October 1992"
.SH NAME
im_equal, im_notequal, im_equalconst, im_equal_vec, im_notequalconst,
im_notequal_vec, im_less, im_lessconst, im_less_vec,
im_more, im_moreconst, im_more_vec, im_lesseq, im_lesseqconst, im_lesseq_vec,
im_moreeq,
im_moreeqconst, im_moreeq_vec \- relational tests on images.
.SH SYNOPSIS
.B #include <vips/vips.h>
.B int im_equal(a, b, out)
.br
.B IMAGE *a, *b, *out;
.B int im_equalconst(a, out, c)
.br
.B IMAGE *a, *out;
.br
.B double c;
.B int im_equal_vec(a, out, n, v)
.br
.B IMAGE *a, *out;
.br
.B int n;
.br
.B double *v;
.B int im_notequal(a, b, out)
.br
.B IMAGE *a, *b, *out;
.B int im_notequalconst(a, out, c)
.br
.B IMAGE *a, *out;
.br
.B double c;
.B int im_notequal_vec(a, out, n, v)
.br
.B IMAGE *a, *out;
.br
.B int n;
.br
.B double *v;
.B int im_less(a, b, out)
.br
.B IMAGE *a, *b, *out;
.B int im_lessconst(a, out, c)
.br
.B IMAGE *a, *out;
.br
.B double c;
.B int im_less_vec(a, out, n, v)
.br
.B IMAGE *a, *out;
.br
.B int n;
.br
.B double *v;
.B int im_more(a, b, out)
.br
.B IMAGE *a, *b, *out;
.B int im_moreconst(a, out, c)
.br
.B IMAGE *a, *out;
.br
.B double c;
.B int im_more_vec(a, out, n, v)
.br
.B IMAGE *a, *out;
.br
.B int n;
.br
.B double *v;
.B int im_lesseq(a, b, out)
.br
.B IMAGE *a, *b, *out;
.B int im_lesseqconst(a, out, c)
.br
.B IMAGE *a, *out;
.br
.B double c;
.B int im_lesseq_vec(a, out, n)
.br
.B IMAGE *a, *out;
.br
.B int n;
.br
.B double *v;
.B int im_moreeq(a, b, out)
.br
.B IMAGE *a, *b, *out;
.B int im_moreeqconst(a, out, c)
.br
.B IMAGE *a, *out;
.br
.B double c;
.B int im_moreeq_vec(a, out, n, v)
.br
.B IMAGE *a, *out;
.br
.B int n;
.br
.B double *v;
.SH DESCRIPTION
These functions perform a range of relational tests between images, or between
an image and a constant. Functions which take two images as arguments require
that the two images be the same size and have the same number of bands. They
can be of mixed type: you may compare an unsigned char image with a double
image.
All functions return an unsigned char image, with the same number of bands as
the input images, in which band elements have been set to 255 for true and 0
for false.
The logical functions (im_andimage(3), im_orimage(3), im_eorimage(3)) may be
used to combine boolean images to make more complex tests. The selection
function im_ifthenelse(3) may be used to take action on the result of a test.
.SH RETURN VALUE
All functions return 0 on success and -1 on error.
.SH SEE ALSO
im_ifthenelse(3), im_andimage(3).
.SH COPYRIGHT
National Gallery, 1992
.SH AUTHOR
J. Cupitt