<!-- manual page source format generated by PolyglotMan v3.2, --> <!-- available at http://polyglotman.sourceforge.net/ --> <html> <head> <title>IM_DILATE(3) manual page</title> </head> <body bgcolor='white'> <a href='#toc'>Table of Contents</a><p> <h2><a name='sect0' href='#toc0'>Name</a></h2> im_dilate, im_dilate_raw, im_erode, im_erode_raw - perform morphological operations on a white object against a black background <h2><a name='sect1' href='#toc1'>Synopsis</a></h2> <b>#include <vips/vips.h></b> <p> <b>int im_dilate(in, out, m)</b> <br> <b>IMAGE *in, *out;</b> <br> <b>INTMASK *m;</b> <p> <b>int im_erode(in, out, m)</b> <br> <b>IMAGE *in, *out;</b> <br> <b>INTMASK *m;</b> <p> <b>int im_dilate_raw(in, out, m)</b> <br> <b>IMAGE *in, *out;</b> <br> <b>INTMASK *m;</b> <p> <b>int im_erode_raw(in, out, m)</b> <br> <b>IMAGE *in, *out;</b> <br> <b>INTMASK *m;</b> <p> <h2><a name='sect2' href='#toc2'>Description</a></h2> The above functions are applications of morphological operations on one channel binary images ie. images with pixels that are either 0 (black) or 255 (white). All functions assume that input images contain white objects against a black background. <p> Mask coefficients can be either 0 (for object) or 255 (for background) or 128 (for do not care). <p> The mask should have odd length sides and the origin of the mask is at location (m->xsize/2,m->ysize/2) integer division. All algorithms have been based on the book "Fundamentals of Digital Image Processing" by A. Jain, pp 384-388, Prentice-Hall, 1989. Essentially, <a href='im_dilate.3.html'><b>im_dilate(3)</a> </b> sets pixels in the output if *any* part of the mask matches, whereas <a href='im_erode.3.html'><b>im_erode(3)</a> </b> sets pixels only if *all* of the mask matches. <p> <a href='im_dilate.3.html'><b>im_dilate(3)</b></a> dilates the image pointed by in, according to the mask pointed by m and writes the result in the location pointed by the IMAGE descriptor out. The output image is the same size as the input, in the manner of <a href='im_conv.3.html'><b>im_conv(3)</a> .</b> <p> <a href='im_dilate_raw.3.html'><b>im_dilate_raw(3)</b></a> works as <a href='im_dilate.3.html'>im_dilate(3)</a> , but does not expand the input. <p> <a href='im_erode.3.html'><b>im_erode(3)</b></a> erodes the image pointed by in, according to the mask pointed by m and writes the result in the location pointed by the IMAGE descriptor out. Again, the output image is forced to have the same size as the input. <p> <a href='im_erode_raw.3.html'><b>im_erode_raw(3)</b></a> works as <a href='im_erode.3.html'>im_erode(3)</a> , but does not expand the input. <p> See the boolean operations <a href='im_andimage.3.html'><b>im_andimage(3)</a> , </b> <a href='im_orimage.3.html'><b>im_orimage(3)</a> </b> and <a href='im_eorimage.3.html'><b>im_eorimage(3)</a> </b> for analogues of the usual set difference and set union operations. <p> <h2><a name='sect3' href='#toc3'>Return Value</a></h2> All functions returns 0 on success and -1 on error. <h2><a name='sect4' href='#toc4'>See Also</a></h2> <a href='im_read_imask.3.html'>im_read_imask(3)</a> , <a href='im_conv.3.html'>im_conv(3)</a> , <a href='im_andimage.3.html'>im_andimage(3)</a> , <a href='im_rotate_imask.3.html'>im_rotate_imask(3)</a> . <h2><a name='sect5' href='#toc5'>Copyright</a></h2> 1991-1995, Birkbeck College and the National Gallery <p> <hr><p> <a name='toc'><b>Table of Contents</b></a><p> <ul> <li><a name='toc0' href='#sect0'>Name</a></li> <li><a name='toc1' href='#sect1'>Synopsis</a></li> <li><a name='toc2' href='#sect2'>Description</a></li> <li><a name='toc3' href='#sect3'>Return Value</a></li> <li><a name='toc4' href='#sect4'>See Also</a></li> <li><a name='toc5' href='#sect5'>Copyright</a></li> </ul> </body> </html>