next up previous contents
Next: 2.3 Boolean Up: 2. VIPS packages Previous: 2.1 Arithmetic   Contents

2.2 Relational

See figure 2.2.

Relational functions compare images to other images or to constants. They accept any image or pair of images (provided they are the same size and have the same number of bands -- their types may differ) and produce a IM_BANDFMT_UCHAR image with the same number of bands as the input image, with 255 in every band element for which the condition is true and 0 elsewhere.

They may be combined with the boolean functions to form complex relational conditions. Use im_max() (or im_min()) to find out if a condition is true (or false) for a whole image.

Figure 2.2: Relational functions
\begin{figure}\begin{quote}
\begin{verbatim}john% vips -help relational
functi...
...otequalconst - image does not equal const\end{verbatim}
\end{quote}
\end{figure}



John Cupitt 2004-11-02