~ubuntu-branches/ubuntu/utopic/vips/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/reference/html/libvips-morphology.html

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2014-06-21 16:35:51 UTC
  • mfrom: (1.2.23)
  • Revision ID: package-import@ubuntu.com-20140621163551-l7mq3sjc5pkf94eu
Tags: 7.38.6-1
* New upstream version.
* Remove no-longer-needed dependency on gcc 4.7 for armhf. (Closes:
  #748006)
* Upstream version includes new German transltion. (Closes: #743613)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<title>morphology</title>
 
5
<title>VIPS Reference Manual: morphology</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="VIPS Reference Manual">
8
8
<link rel="up" href="ch02.html" title="VIPS operation API by section">
9
9
<link rel="prev" href="VipsInterpolate.html" title="VipsInterpolate">
10
10
<link rel="next" href="libvips-mosaicing.html" title="mosaicing">
11
 
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
 
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16
 
<tr valign="middle">
17
 
<td><a accesskey="p" href="VipsInterpolate.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
 
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
 
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
 
<th width="100%" align="center">VIPS Reference Manual</th>
21
 
<td><a accesskey="n" href="libvips-mosaicing.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22
 
</tr>
23
 
<tr><td colspan="5" class="shortcuts">
24
 
<a href="#libvips-morphology.synopsis" class="shortcut">Top</a>
25
 
                   | 
26
 
                  <a href="#libvips-morphology.description" class="shortcut">Description</a>
27
 
</td></tr>
28
 
</table>
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
 
16
<td width="100%" align="left" class="shortcuts">
 
17
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
 
18
                  <a href="#libvips-morphology.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
 
19
                  <a href="#libvips-morphology.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 
20
</td>
 
21
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 
22
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 
23
<td><a accesskey="p" href="VipsInterpolate.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 
24
<td><a accesskey="n" href="libvips-mosaicing.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 
25
</tr></table>
29
26
<div class="refentry">
30
27
<a name="libvips-morphology"></a><div class="titlepage"></div>
31
28
<div class="refnamediv"><table width="100%"><tr>
34
31
<p>morphology — morphological operators, rank filters and related image 
35
32
analysis</p>
36
33
</td>
37
 
<td valign="top" align="right"></td>
 
34
<td class="gallery_image" valign="top" align="right"></td>
38
35
</tr></table></div>
39
36
<div class="refsect1">
40
37
<a name="libvips-morphology.stability-level"></a><h2>Stability Level</h2>
41
38
Stable, unless otherwise indicated
42
39
</div>
43
 
<div class="refsynopsisdiv">
44
 
<a name="libvips-morphology.synopsis"></a><h2>Synopsis</h2>
45
 
<pre class="synopsis">
46
 
#include &lt;vips/vips.h&gt;
47
 
 
48
 
enum                <a class="link" href="libvips-morphology.html#VipsOperationMorphology" title="enum VipsOperationMorphology">VipsOperationMorphology</a>;
49
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-morphology.html#vips-morph" title="vips_morph ()">vips_morph</a>                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
50
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
51
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
52
 
                                                         <em class="parameter"><code><a class="link" href="libvips-morphology.html#VipsOperationMorphology" title="enum VipsOperationMorphology"><span class="type">VipsOperationMorphology</span></a> morph</code></em>,
53
 
                                                         <em class="parameter"><code>...</code></em>);
54
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-morphology.html#vips-rank" title="vips_rank ()">vips_rank</a>                           (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
55
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
56
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
57
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
58
 
                                                         <em class="parameter"><code><span class="type">int</span> index</code></em>,
59
 
                                                         <em class="parameter"><code>...</code></em>);
60
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-morphology.html#vips-countlines" title="vips_countlines ()">vips_countlines</a>                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
61
 
                                                         <em class="parameter"><code><span class="type">double</span> *nolines</code></em>,
62
 
                                                         <em class="parameter"><code><a class="link" href="libvips-conversion.html#VipsDirection" title="enum VipsDirection"><span class="type">VipsDirection</span></a> direction</code></em>,
63
 
                                                         <em class="parameter"><code>...</code></em>);
64
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-morphology.html#vips-median" title="vips_median ()">vips_median</a>                         (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
65
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
66
 
                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
67
 
                                                         <em class="parameter"><code>...</code></em>);
68
 
<span class="returnvalue">int</span>                 <a class="link" href="libvips-morphology.html#im-label-regions" title="im_label_regions ()">im_label_regions</a>                    (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *test</code></em>,
69
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
70
 
                                                         <em class="parameter"><code><span class="type">int</span> *segments</code></em>);
 
40
<div class="refsect1">
 
41
<a name="libvips-morphology.functions"></a><h2>Functions</h2>
 
42
<div class="informaltable"><table width="100%" border="0">
 
43
<colgroup>
 
44
<col width="150px" class="functions_return">
 
45
<col class="functions_name">
 
46
</colgroup>
 
47
<tbody>
 
48
<tr>
 
49
<td class="function_type">
 
50
<span class="returnvalue">int</span>
 
51
</td>
 
52
<td class="function_name">
 
53
<a class="link" href="libvips-morphology.html#vips-morph" title="vips_morph ()">vips_morph</a> <span class="c_punctuation">()</span>
 
54
</td>
 
55
</tr>
 
56
<tr>
 
57
<td class="function_type">
 
58
<span class="returnvalue">int</span>
 
59
</td>
 
60
<td class="function_name">
 
61
<a class="link" href="libvips-morphology.html#vips-rank" title="vips_rank ()">vips_rank</a> <span class="c_punctuation">()</span>
 
62
</td>
 
63
</tr>
 
64
<tr>
 
65
<td class="function_type">
 
66
<span class="returnvalue">int</span>
 
67
</td>
 
68
<td class="function_name">
 
69
<a class="link" href="libvips-morphology.html#vips-countlines" title="vips_countlines ()">vips_countlines</a> <span class="c_punctuation">()</span>
 
70
</td>
 
71
</tr>
 
72
<tr>
 
73
<td class="function_type">
 
74
<span class="returnvalue">int</span>
 
75
</td>
 
76
<td class="function_name">
 
77
<a class="link" href="libvips-morphology.html#vips-median" title="vips_median ()">vips_median</a> <span class="c_punctuation">()</span>
 
78
</td>
 
79
</tr>
 
80
<tr>
 
81
<td class="function_type">
 
82
<span class="returnvalue">int</span>
 
83
</td>
 
84
<td class="function_name">
 
85
<a class="link" href="libvips-morphology.html#im-label-regions" title="im_label_regions ()">im_label_regions</a> <span class="c_punctuation">()</span>
 
86
</td>
 
87
</tr>
 
88
</tbody>
 
89
</table></div>
 
90
</div>
 
91
<div class="refsect1">
 
92
<a name="libvips-morphology.other"></a><h2>Types and Values</h2>
 
93
<div class="informaltable"><table width="100%" border="0">
 
94
<colgroup>
 
95
<col width="150px" class="name">
 
96
<col class="description">
 
97
</colgroup>
 
98
<tbody><tr>
 
99
<td class="datatype_keyword">enum</td>
 
100
<td class="function_name"><a class="link" href="libvips-morphology.html#VipsOperationMorphology" title="enum VipsOperationMorphology">VipsOperationMorphology</a></td>
 
101
</tr></tbody>
 
102
</table></div>
 
103
</div>
 
104
<div class="refsect1">
 
105
<a name="libvips-morphology.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
106
<pre class="screen">
 
107
</pre>
 
108
</div>
 
109
<div class="refsect1">
 
110
<a name="libvips-morphology.includes"></a><h2>Includes</h2>
 
111
<pre class="synopsis">#include &lt;vips/vips.h&gt;
71
112
</pre>
72
113
</div>
73
114
<div class="refsect1">
74
115
<a name="libvips-morphology.description"></a><h2>Description</h2>
75
 
<p>
76
 
The morphological functions search images
 
116
<p>The morphological functions search images
77
117
for particular patterns of pixels, specified with the mask argument,
78
118
either adding or removing pixels when they find a match. They are useful
79
119
for cleaning up images --- for example, you might threshold an image, and
80
120
then use one of the morphological functions to remove all single isolated
81
 
pixels from the result.
82
 
</p>
83
 
<p>
84
 
If you combine the morphological operators with the mask rotators
85
 
<a href="http://http://www.vips.ecs.soton.ac.uk/libvips-mask.html#im-rotate-imask45"><code class="function">im_rotate_imask45()</code></a>, for example) and apply them repeatedly, you
 
121
pixels from the result.</p>
 
122
<p>If you combine the morphological operators with the mask rotators
 
123
<code class="function">im_rotate_imask45()</code>, for example) and apply them repeatedly, you
86
124
can achieve very complicated effects: you can thin, prune, fill, open edges,
87
125
close gaps, and many others. For example, see `Fundamentals  of  Digital
88
126
Image Processing' by A.  Jain, pp 384-388, Prentice-Hall, 1989 for more 
89
 
ideas.
90
 
</p>
91
 
<p>
92
 
Beware that VIPS reverses the usual image processing convention, by 
 
127
ideas.</p>
 
128
<p>Beware that VIPS reverses the usual image processing convention, by 
93
129
assuming white objects (non-zero pixels) on a black background (zero
94
 
pixels).
95
 
</p>
96
 
<p>
97
 
The mask you give to the morphological functions should contain only the
 
130
pixels).</p>
 
131
<p>The mask you give to the morphological functions should contain only the
98
132
values 0 (for background), 128 (for don't care) and 255 (for object). The
99
133
mask must have odd length sides --- the origin of the mask is taken to be
100
 
the centre value. For example, the mask:
101
 
</p>
102
 
<p>
103
 
  3 3 
 
134
the centre value. For example, the mask:</p>
 
135
<p>  3 3 
104
136
  128 255 128
105
137
  255 0   255
106
 
  128 255 128
107
 
</p>
108
 
<p>
109
 
applied to an image with <a href="http://http://www.vips.ecs.soton.ac.uk/libvips-morphology.html#im-erode"><code class="function">im_erode()</code></a>, will find all black pixels
110
 
4-way connected with white pixels. Essentially, <a href="http://http://www.vips.ecs.soton.ac.uk/libvips-morphology.html#im-dilate"><code class="function">im_dilate()</code></a>
 
138
  128 255 128</p>
 
139
<p>applied to an image with <code class="function">im_erode()</code>, will find all black pixels
 
140
4-way connected with white pixels. Essentially, <code class="function">im_dilate()</code>
111
141
sets pixels in the output if any part of the mask matches, whereas
112
 
<a href="http://http://www.vips.ecs.soton.ac.uk/libvips-morphology.html#im-erode"><code class="function">im_erode()</code></a> sets pixels only if all of the mask matches.
113
 
</p>
114
 
<p>
115
 
See <code class="function">im_andimage()</code>, <code class="function">im_orimage()</code> and <code class="function">im_eorimage()</code>
116
 
for analogues of the usual set difference and set union operations.
117
 
</p>
 
142
<code class="function">im_erode()</code> sets pixels only if all of the mask matches.</p>
 
143
<p>See <code class="function">im_andimage()</code>, <code class="function">im_orimage()</code> and <code class="function">im_eorimage()</code>
 
144
for analogues of the usual set difference and set union operations.</p>
118
145
</div>
119
146
<div class="refsect1">
120
 
<a name="libvips-morphology.details"></a><h2>Details</h2>
121
 
<div class="refsect2">
122
 
<a name="VipsOperationMorphology"></a><h3>enum VipsOperationMorphology</h3>
123
 
<pre class="programlisting">typedef enum {
124
 
        VIPS_OPERATION_MORPHOLOGY_ERODE,
125
 
        VIPS_OPERATION_MORPHOLOGY_DILATE,
126
 
        VIPS_OPERATION_MORPHOLOGY_LAST
127
 
} VipsOperationMorphology;
128
 
</pre>
129
 
<p>
130
 
More like hit-miss, really. 
131
 
</p>
132
 
<p>
133
 
See also: <a class="link" href="libvips-morphology.html#vips-morph" title="vips_morph ()"><code class="function">vips_morph()</code></a>.
134
 
</p>
135
 
<div class="variablelist"><table border="0" class="variablelist">
136
 
<colgroup>
137
 
<col align="left" valign="top">
138
 
<col>
139
 
</colgroup>
140
 
<tbody>
141
 
<tr>
142
 
<td><p><a name="VIPS-OPERATION-MORPHOLOGY-ERODE:CAPS"></a><span class="term"><code class="literal">VIPS_OPERATION_MORPHOLOGY_ERODE</code></span></p></td>
143
 
<td>true if all set
144
 
</td>
145
 
</tr>
146
 
<tr>
147
 
<td><p><a name="VIPS-OPERATION-MORPHOLOGY-DILATE:CAPS"></a><span class="term"><code class="literal">VIPS_OPERATION_MORPHOLOGY_DILATE</code></span></p></td>
148
 
<td>true if one set
149
 
</td>
150
 
</tr>
151
 
<tr>
152
 
<td><p><a name="VIPS-OPERATION-MORPHOLOGY-LAST:CAPS"></a><span class="term"><code class="literal">VIPS_OPERATION_MORPHOLOGY_LAST</code></span></p></td>
153
 
<td>
154
 
</td>
155
 
</tr>
156
 
</tbody>
157
 
</table></div>
158
 
</div>
159
 
<hr>
160
 
<div class="refsect2">
161
 
<a name="vips-morph"></a><h3>vips_morph ()</h3>
162
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_morph                          (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
163
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
164
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
165
 
                                                         <em class="parameter"><code><a class="link" href="libvips-morphology.html#VipsOperationMorphology" title="enum VipsOperationMorphology"><span class="type">VipsOperationMorphology</span></a> morph</code></em>,
166
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
167
 
<p>
168
 
Performs a morphological operation on <em class="parameter"><code>in</code></em> using <em class="parameter"><code>mask</code></em> as a
169
 
structuring element. 
170
 
</p>
171
 
<p>
172
 
The image should have 0 (black) for no object and 255
 
147
<a name="libvips-morphology.functions_details"></a><h2>Functions</h2>
 
148
<div class="refsect2">
 
149
<a name="vips-morph"></a><h3>vips_morph ()</h3>
 
150
<pre class="programlisting"><span class="returnvalue">int</span>
 
151
vips_morph (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
 
152
            <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
 
153
            <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
 
154
            <em class="parameter"><code><a class="link" href="libvips-morphology.html#VipsOperationMorphology" title="enum VipsOperationMorphology"><span class="type">VipsOperationMorphology</span></a> morph</code></em>,
 
155
            <em class="parameter"><code>...</code></em>);</pre>
 
156
<p>Performs a morphological operation on <em class="parameter"><code>in</code></em>
 
157
 using <em class="parameter"><code>mask</code></em>
 
158
 as a
 
159
structuring element. </p>
 
160
<p>The image should have 0 (black) for no object and 255
173
161
(non-zero) for an object. Note that this is the reverse of the usual
174
162
convention for these operations, but more convenient when combined with the
175
163
boolean operators. The output image is the same
176
164
size as the input image: edge pxels are made by expanding the input image
177
 
as necessary.
178
 
</p>
179
 
<p>
180
 
Mask coefficients can be either 0 (for object) or 255 (for background) 
 
165
as necessary.</p>
 
166
<p>Mask coefficients can be either 0 (for object) or 255 (for background) 
181
167
or 128 (for do not care).  The origin of the mask is at location
182
168
(m.xsize / 2, m.ysize / 2), integer division.  All algorithms have been 
183
169
based on the book "Fundamentals of Digital Image Processing" by A. Jain, 
184
 
pp 384-388, Prentice-Hall, 1989. 
185
 
</p>
186
 
<p>
187
 
For <span class="type">VIPS_OPERATION_MOPHOLOGY_ERODE</span>, 
 
170
pp 384-388, Prentice-Hall, 1989. </p>
 
171
<p>For <span class="type">VIPS_OPERATION_MOPHOLOGY_ERODE</span>, 
188
172
the whole mask must match for the output pixel to be
189
 
set, that is, the result is the logical AND of the selected input pixels.
190
 
</p>
191
 
<p>
192
 
For <span class="type">VIPS_OPERATION_MOPHOLOGY_DILATE</span>, 
 
173
set, that is, the result is the logical AND of the selected input pixels.</p>
 
174
<p>For <span class="type">VIPS_OPERATION_MOPHOLOGY_DILATE</span>, 
193
175
the output pixel is set if any part of the mask 
194
 
matches, that is, the result is the logical OR of the selected input pixels.
195
 
</p>
196
 
<p>
197
 
See the boolean operations <a class="link" href="libvips-arithmetic.html#vips-andimage" title="vips_andimage ()"><code class="function">vips_andimage()</code></a>, <a class="link" href="libvips-arithmetic.html#vips-orimage" title="vips_orimage ()"><code class="function">vips_orimage()</code></a> and 
198
 
<a class="link" href="libvips-arithmetic.html#vips-eorimage" title="vips_eorimage ()"><code class="function">vips_eorimage()</code></a> 
199
 
for analogues of the usual set difference and set union operations.
200
 
</p>
201
 
<p>
202
 
Operations are performed using the processor's vector unit,
203
 
if possible. Disable this with --vips-novector or IM_NOVECTOR.
204
 
</p>
205
 
<div class="variablelist"><table border="0" class="variablelist">
 
176
matches, that is, the result is the logical OR of the selected input pixels.</p>
 
177
<p>See the boolean operations <a class="link" href="libvips-arithmetic.html#vips-andimage" title="vips_andimage ()"><code class="function">vips_andimage()</code></a>, <a class="link" href="libvips-arithmetic.html#vips-orimage" title="vips_orimage ()"><code class="function">vips_orimage()</code></a> and 
 
178
<a class="link" href="libvips-arithmetic.html#vips-eorimage" title="vips_eorimage ()"><code class="function">vips_eorimage()</code></a> 
 
179
for analogues of the usual set difference and set union operations.</p>
 
180
<p>Operations are performed using the processor's vector unit,
 
181
if possible. Disable this with --vips-novector or IM_NOVECTOR.</p>
 
182
<div class="refsect3">
 
183
<a name="id-1.3.11.9.2.11"></a><h4>Parameters</h4>
 
184
<div class="informaltable"><table width="100%" border="0">
206
185
<colgroup>
207
 
<col align="left" valign="top">
208
 
<col>
 
186
<col width="150px" class="parameters_name">
 
187
<col class="parameters_description">
 
188
<col width="200px" class="parameters_annotations">
209
189
</colgroup>
210
190
<tbody>
211
191
<tr>
212
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
213
 
<td>input image</td>
214
 
</tr>
215
 
<tr>
216
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
217
 
<td>output image</td>
218
 
</tr>
219
 
<tr>
220
 
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
221
 
<td>morphology with this mask</td>
222
 
</tr>
223
 
<tr>
224
 
<td><p><span class="term"><em class="parameter"><code>morph</code></em> :</span></p></td>
225
 
<td>operation to perform</td>
226
 
</tr>
227
 
<tr>
228
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
229
 
<td>
230
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
231
 
</tr>
232
 
<tr>
233
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
234
 
<td>0 on success, -1 on error</td>
 
192
<td class="parameter_name"><p>in</p></td>
 
193
<td class="parameter_description"><p>input image</p></td>
 
194
<td class="parameter_annotations"> </td>
 
195
</tr>
 
196
<tr>
 
197
<td class="parameter_name"><p>out</p></td>
 
198
<td class="parameter_description"><p>output image</p></td>
 
199
<td class="parameter_annotations"> </td>
 
200
</tr>
 
201
<tr>
 
202
<td class="parameter_name"><p>mask</p></td>
 
203
<td class="parameter_description"><p>morphology with this mask</p></td>
 
204
<td class="parameter_annotations"> </td>
 
205
</tr>
 
206
<tr>
 
207
<td class="parameter_name"><p>morph</p></td>
 
208
<td class="parameter_description"><p>operation to perform</p></td>
 
209
<td class="parameter_annotations"> </td>
 
210
</tr>
 
211
<tr>
 
212
<td class="parameter_name"><p>...</p></td>
 
213
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of optional named arguments</p></td>
 
214
<td class="parameter_annotations"> </td>
235
215
</tr>
236
216
</tbody>
237
217
</table></div>
238
218
</div>
 
219
<div class="refsect3">
 
220
<a name="id-1.3.11.9.2.12"></a><h4>Returns</h4>
 
221
<p> 0 on success, -1 on error</p>
 
222
<p></p>
 
223
</div>
 
224
</div>
239
225
<hr>
240
226
<div class="refsect2">
241
 
<a name="vips-rank"></a><h3>vips_rank ()</h3>
242
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_rank                           (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
243
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
244
 
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
245
 
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
246
 
                                                         <em class="parameter"><code><span class="type">int</span> index</code></em>,
247
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
248
 
<p>
249
 
<a class="link" href="libvips-morphology.html#vips-rank" title="vips_rank ()"><code class="function">vips_rank()</code></a> does rank filtering on an image. A window of size <em class="parameter"><code>width</code></em> by
250
 
<em class="parameter"><code>height</code></em> is passed over the image. At each position, the pixels inside the 
251
 
window are sorted into ascending order and the pixel at position <em class="parameter"><code>index</code></em> is 
252
 
output. <em class="parameter"><code>index</code></em> numbers from 0.
253
 
</p>
254
 
<p>
255
 
It works for any non-complex image type, with any number of bands. 
 
227
<a name="vips-rank"></a><h3>vips_rank ()</h3>
 
228
<pre class="programlisting"><span class="returnvalue">int</span>
 
229
vips_rank (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
 
230
           <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
 
231
           <em class="parameter"><code><span class="type">int</span> width</code></em>,
 
232
           <em class="parameter"><code><span class="type">int</span> height</code></em>,
 
233
           <em class="parameter"><code><span class="type">int</span> index</code></em>,
 
234
           <em class="parameter"><code>...</code></em>);</pre>
 
235
<p>vips_rank() does rank filtering on an image. A window of size <em class="parameter"><code>width</code></em>
 
236
 by
 
237
<em class="parameter"><code>height</code></em>
 
238
 is passed over the image. At each position, the pixels inside the 
 
239
window are sorted into ascending order and the pixel at position <em class="parameter"><code>index</code></em>
 
240
 is 
 
241
output. <em class="parameter"><code>index</code></em>
 
242
 numbers from 0.</p>
 
243
<p>It works for any non-complex image type, with any number of bands. 
256
244
The input is expanded by copying edge pixels before performing the 
257
245
operation so that the output image has the same size as the input. 
258
 
Edge pixels in the output image are therefore only approximate.
259
 
</p>
260
 
<p>
261
 
For a median filter with mask size m (3 for 3x3, 5 for 5x5, etc.) use
262
 
</p>
263
 
<p>
264
 
 vips_rank( in, out, m, m, m * m / 2 );
265
 
</p>
266
 
<p>
267
 
The special cases n == 0 and n == m * m - 1 are useful dilate and 
268
 
expand operators.
269
 
</p>
270
 
<p>
271
 
See also: <a class="link" href="libvips-convolution.html#vips-conv" title="vips_conv ()"><code class="function">vips_conv()</code></a>, <a class="link" href="libvips-morphology.html#vips-median" title="vips_median ()"><code class="function">vips_median()</code></a>, <code class="function">vips_spcor()</code>.
272
 
</p>
273
 
<div class="variablelist"><table border="0" class="variablelist">
 
246
Edge pixels in the output image are therefore only approximate.</p>
 
247
<p>For a median filter with mask size m (3 for 3x3, 5 for 5x5, etc.) use</p>
 
248
<p> vips_rank( in, out, m, m, m * m / 2 );</p>
 
249
<p>The special cases n == 0 and n == m * m - 1 are useful dilate and 
 
250
expand operators.</p>
 
251
<p>See also: <a class="link" href="libvips-convolution.html#vips-conv" title="vips_conv ()"><code class="function">vips_conv()</code></a>, <a class="link" href="libvips-morphology.html#vips-median" title="vips_median ()"><code class="function">vips_median()</code></a>, <code class="function">vips_spcor()</code>.</p>
 
252
<div class="refsect3">
 
253
<a name="id-1.3.11.9.3.10"></a><h4>Parameters</h4>
 
254
<div class="informaltable"><table width="100%" border="0">
274
255
<colgroup>
275
 
<col align="left" valign="top">
276
 
<col>
 
256
<col width="150px" class="parameters_name">
 
257
<col class="parameters_description">
 
258
<col width="200px" class="parameters_annotations">
277
259
</colgroup>
278
260
<tbody>
279
261
<tr>
280
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
281
 
<td>input image</td>
282
 
</tr>
283
 
<tr>
284
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
285
 
<td>output image</td>
286
 
</tr>
287
 
<tr>
288
 
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
289
 
<td>width of region</td>
290
 
</tr>
291
 
<tr>
292
 
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
293
 
<td>height of region</td>
294
 
</tr>
295
 
<tr>
296
 
<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
297
 
<td>select pixel</td>
298
 
</tr>
299
 
<tr>
300
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
301
 
<td>
302
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
303
 
</tr>
304
 
<tr>
305
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
306
 
<td>0 on success, -1 on error</td>
 
262
<td class="parameter_name"><p>in</p></td>
 
263
<td class="parameter_description"><p>input image</p></td>
 
264
<td class="parameter_annotations"> </td>
 
265
</tr>
 
266
<tr>
 
267
<td class="parameter_name"><p>out</p></td>
 
268
<td class="parameter_description"><p>output image</p></td>
 
269
<td class="parameter_annotations"> </td>
 
270
</tr>
 
271
<tr>
 
272
<td class="parameter_name"><p>width</p></td>
 
273
<td class="parameter_description"><p>width of region</p></td>
 
274
<td class="parameter_annotations"> </td>
 
275
</tr>
 
276
<tr>
 
277
<td class="parameter_name"><p>height</p></td>
 
278
<td class="parameter_description"><p>height of region</p></td>
 
279
<td class="parameter_annotations"> </td>
 
280
</tr>
 
281
<tr>
 
282
<td class="parameter_name"><p>index</p></td>
 
283
<td class="parameter_description"><p>select pixel</p></td>
 
284
<td class="parameter_annotations"> </td>
 
285
</tr>
 
286
<tr>
 
287
<td class="parameter_name"><p>...</p></td>
 
288
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of optional named arguments</p></td>
 
289
<td class="parameter_annotations"> </td>
307
290
</tr>
308
291
</tbody>
309
292
</table></div>
310
293
</div>
 
294
<div class="refsect3">
 
295
<a name="id-1.3.11.9.3.11"></a><h4>Returns</h4>
 
296
<p> 0 on success, -1 on error</p>
 
297
<p></p>
 
298
</div>
 
299
</div>
311
300
<hr>
312
301
<div class="refsect2">
313
 
<a name="vips-countlines"></a><h3>vips_countlines ()</h3>
314
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_countlines                     (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
315
 
                                                         <em class="parameter"><code><span class="type">double</span> *nolines</code></em>,
316
 
                                                         <em class="parameter"><code><a class="link" href="libvips-conversion.html#VipsDirection" title="enum VipsDirection"><span class="type">VipsDirection</span></a> direction</code></em>,
317
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
318
 
<p>
319
 
Function which calculates the number of transitions
 
302
<a name="vips-countlines"></a><h3>vips_countlines ()</h3>
 
303
<pre class="programlisting"><span class="returnvalue">int</span>
 
304
vips_countlines (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
 
305
                 <em class="parameter"><code><span class="type">double</span> *nolines</code></em>,
 
306
                 <em class="parameter"><code><a class="link" href="libvips-conversion.html#VipsDirection" title="enum VipsDirection"><span class="type">VipsDirection</span></a> direction</code></em>,
 
307
                 <em class="parameter"><code>...</code></em>);</pre>
 
308
<p>Function which calculates the number of transitions
320
309
between black and white for the horizontal or the vertical
321
310
direction of an image.  black&lt;128 , white&gt;=128
322
311
The function calculates the number of transitions for all
323
312
Xsize or Ysize and returns the mean of the result
324
 
Input should be one band, 8-bit.
325
 
</p>
326
 
<p>
327
 
See also: <a class="link" href="libvips-morphology.html#vips-morph" title="vips_morph ()"><code class="function">vips_morph()</code></a>, <code class="function">vips_zerox()</code>, <a class="link" href="libvips-convolution.html#vips-conv" title="vips_conv ()"><code class="function">vips_conv()</code></a>.
328
 
</p>
329
 
<div class="variablelist"><table border="0" class="variablelist">
330
 
<colgroup>
331
 
<col align="left" valign="top">
332
 
<col>
333
 
</colgroup>
334
 
<tbody>
335
 
<tr>
336
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
337
 
<td>input image</td>
338
 
</tr>
339
 
<tr>
340
 
<td><p><span class="term"><em class="parameter"><code>nolines</code></em> :</span></p></td>
341
 
<td>output average number of lines</td>
342
 
</tr>
343
 
<tr>
344
 
<td><p><span class="term"><em class="parameter"><code>direction</code></em> :</span></p></td>
345
 
<td>count lines horizontally or vertically</td>
346
 
</tr>
347
 
<tr>
348
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
349
 
<td>
350
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
351
 
</tr>
352
 
<tr>
353
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
354
 
<td>0 on success, -1 on error.</td>
355
 
</tr>
356
 
</tbody>
357
 
</table></div>
358
 
</div>
359
 
<hr>
360
 
<div class="refsect2">
361
 
<a name="vips-median"></a><h3>vips_median ()</h3>
362
 
<pre class="programlisting"><span class="returnvalue">int</span>                 vips_median                         (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
363
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
364
 
                                                         <em class="parameter"><code><span class="type">int</span> size</code></em>,
365
 
                                                         <em class="parameter"><code>...</code></em>);</pre>
366
 
<p>
367
 
A convenience function equivalent to:
368
 
</p>
369
 
<p>
370
 
 vips_rank( in, out, size, size, (size * size) / 2 );
371
 
</p>
372
 
<p>
373
 
See also: <a class="link" href="libvips-morphology.html#vips-rank" title="vips_rank ()"><code class="function">vips_rank()</code></a>.
374
 
</p>
375
 
<div class="variablelist"><table border="0" class="variablelist">
376
 
<colgroup>
377
 
<col align="left" valign="top">
378
 
<col>
379
 
</colgroup>
380
 
<tbody>
381
 
<tr>
382
 
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
383
 
<td>input image</td>
384
 
</tr>
385
 
<tr>
386
 
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
387
 
<td>output image</td>
388
 
</tr>
389
 
<tr>
390
 
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
391
 
<td>size of region</td>
392
 
</tr>
393
 
<tr>
394
 
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
395
 
<td>
396
 
<code class="literal">NULL</code>-terminated list of optional named arguments</td>
397
 
</tr>
398
 
<tr>
399
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
400
 
<td>0 on success, -1 on error</td>
401
 
</tr>
402
 
</tbody>
403
 
</table></div>
404
 
</div>
405
 
<hr>
406
 
<div class="refsect2">
407
 
<a name="im-label-regions"></a><h3>im_label_regions ()</h3>
408
 
<pre class="programlisting"><span class="returnvalue">int</span>                 im_label_regions                    (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *test</code></em>,
409
 
                                                         <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
410
 
                                                         <em class="parameter"><code><span class="type">int</span> *segments</code></em>);</pre>
411
 
<p>
412
 
<a class="link" href="libvips-morphology.html#im-label-regions" title="im_label_regions ()"><code class="function">im_label_regions()</code></a> repeatedly scans <em class="parameter"><code>test</code></em> for regions of 4-connected pixels
 
313
Input should be one band, 8-bit.</p>
 
314
<p>See also: <a class="link" href="libvips-morphology.html#vips-morph" title="vips_morph ()"><code class="function">vips_morph()</code></a>, <code class="function">vips_zerox()</code>, <a class="link" href="libvips-convolution.html#vips-conv" title="vips_conv ()"><code class="function">vips_conv()</code></a>.</p>
 
315
<div class="refsect3">
 
316
<a name="id-1.3.11.9.4.6"></a><h4>Parameters</h4>
 
317
<div class="informaltable"><table width="100%" border="0">
 
318
<colgroup>
 
319
<col width="150px" class="parameters_name">
 
320
<col class="parameters_description">
 
321
<col width="200px" class="parameters_annotations">
 
322
</colgroup>
 
323
<tbody>
 
324
<tr>
 
325
<td class="parameter_name"><p>in</p></td>
 
326
<td class="parameter_description"><p>input image</p></td>
 
327
<td class="parameter_annotations"> </td>
 
328
</tr>
 
329
<tr>
 
330
<td class="parameter_name"><p>nolines</p></td>
 
331
<td class="parameter_description"><p>output average number of lines</p></td>
 
332
<td class="parameter_annotations"> </td>
 
333
</tr>
 
334
<tr>
 
335
<td class="parameter_name"><p>direction</p></td>
 
336
<td class="parameter_description"><p>count lines horizontally or vertically</p></td>
 
337
<td class="parameter_annotations"> </td>
 
338
</tr>
 
339
<tr>
 
340
<td class="parameter_name"><p>...</p></td>
 
341
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of optional named arguments</p></td>
 
342
<td class="parameter_annotations"> </td>
 
343
</tr>
 
344
</tbody>
 
345
</table></div>
 
346
</div>
 
347
<div class="refsect3">
 
348
<a name="id-1.3.11.9.4.7"></a><h4>Returns</h4>
 
349
<p> 0 on success, -1 on error.</p>
 
350
<p></p>
 
351
</div>
 
352
</div>
 
353
<hr>
 
354
<div class="refsect2">
 
355
<a name="vips-median"></a><h3>vips_median ()</h3>
 
356
<pre class="programlisting"><span class="returnvalue">int</span>
 
357
vips_median (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
 
358
             <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
 
359
             <em class="parameter"><code><span class="type">int</span> size</code></em>,
 
360
             <em class="parameter"><code>...</code></em>);</pre>
 
361
<p>A convenience function equivalent to:</p>
 
362
<p> vips_rank( in, out, size, size, (size * size) / 2 );</p>
 
363
<p>See also: <a class="link" href="libvips-morphology.html#vips-rank" title="vips_rank ()"><code class="function">vips_rank()</code></a>.</p>
 
364
<div class="refsect3">
 
365
<a name="id-1.3.11.9.5.7"></a><h4>Parameters</h4>
 
366
<div class="informaltable"><table width="100%" border="0">
 
367
<colgroup>
 
368
<col width="150px" class="parameters_name">
 
369
<col class="parameters_description">
 
370
<col width="200px" class="parameters_annotations">
 
371
</colgroup>
 
372
<tbody>
 
373
<tr>
 
374
<td class="parameter_name"><p>in</p></td>
 
375
<td class="parameter_description"><p>input image</p></td>
 
376
<td class="parameter_annotations"> </td>
 
377
</tr>
 
378
<tr>
 
379
<td class="parameter_name"><p>out</p></td>
 
380
<td class="parameter_description"><p>output image</p></td>
 
381
<td class="parameter_annotations"> </td>
 
382
</tr>
 
383
<tr>
 
384
<td class="parameter_name"><p>size</p></td>
 
385
<td class="parameter_description"><p>size of region</p></td>
 
386
<td class="parameter_annotations"> </td>
 
387
</tr>
 
388
<tr>
 
389
<td class="parameter_name"><p>...</p></td>
 
390
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of optional named arguments</p></td>
 
391
<td class="parameter_annotations"> </td>
 
392
</tr>
 
393
</tbody>
 
394
</table></div>
 
395
</div>
 
396
<div class="refsect3">
 
397
<a name="id-1.3.11.9.5.8"></a><h4>Returns</h4>
 
398
<p> 0 on success, -1 on error</p>
 
399
<p></p>
 
400
</div>
 
401
</div>
 
402
<hr>
 
403
<div class="refsect2">
 
404
<a name="im-label-regions"></a><h3>im_label_regions ()</h3>
 
405
<pre class="programlisting"><span class="returnvalue">int</span>
 
406
im_label_regions (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *test</code></em>,
 
407
                  <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *mask</code></em>,
 
408
                  <em class="parameter"><code><span class="type">int</span> *segments</code></em>);</pre>
 
409
<p>im_label_regions() repeatedly scans <em class="parameter"><code>test</code></em>
 
410
 for regions of 4-connected pixels
413
411
with the same pixel value. Every time a region is discovered, those
414
 
pixels are marked in <em class="parameter"><code>mask</code></em> with a unique serial number. Once all pixels
415
 
have been labelled, the operation returns, setting <em class="parameter"><code>segments</code></em> to the number
416
 
of discrete regions which were detected.
417
 
</p>
418
 
<p>
419
 
<em class="parameter"><code>mask</code></em> is always a 1-band <code class="literal">IM_BANDFMT_UINT</code> image of the same dimensions as
420
 
<em class="parameter"><code>test</code></em>.
421
 
</p>
422
 
<p>
423
 
This operation is useful for, for example, blob counting. You can use the
 
412
pixels are marked in <em class="parameter"><code>mask</code></em>
 
413
 with a unique serial number. Once all pixels
 
414
have been labelled, the operation returns, setting <em class="parameter"><code>segments</code></em>
 
415
 to the number
 
416
of discrete regions which were detected.</p>
 
417
<p><em class="parameter"><code>mask</code></em>
 
418
 is always a 1-band <code class="literal">IM_BANDFMT_UINT</code> image of the same dimensions as
 
419
<em class="parameter"><code>test</code></em>
 
420
.</p>
 
421
<p>This operation is useful for, for example, blob counting. You can use the
424
422
morphological operators to detect and isolate a series of objects, then use
425
 
<a class="link" href="libvips-morphology.html#im-label-regions" title="im_label_regions ()"><code class="function">im_label_regions()</code></a> to number them all.
426
 
</p>
427
 
<p>
428
 
Use <code class="function">im_histindexed()</code> to (for example) find blob coordinates.
429
 
</p>
430
 
<p>
431
 
See also: <code class="function">im_histindexed()</code>
432
 
</p>
433
 
<div class="variablelist"><table border="0" class="variablelist">
434
 
<colgroup>
435
 
<col align="left" valign="top">
436
 
<col>
437
 
</colgroup>
438
 
<tbody>
439
 
<tr>
440
 
<td><p><span class="term"><em class="parameter"><code>test</code></em> :</span></p></td>
441
 
<td>image to test</td>
442
 
</tr>
443
 
<tr>
444
 
<td><p><span class="term"><em class="parameter"><code>mask</code></em> :</span></p></td>
445
 
<td>write labelled regions here</td>
446
 
</tr>
447
 
<tr>
448
 
<td><p><span class="term"><em class="parameter"><code>segments</code></em> :</span></p></td>
449
 
<td>return number of regions here</td>
450
 
</tr>
451
 
<tr>
452
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
453
 
<td>0 on success, -1 on error.</td>
454
 
</tr>
455
 
</tbody>
456
 
</table></div>
 
423
<a class="link" href="libvips-morphology.html#im-label-regions" title="im_label_regions ()"><code class="function">im_label_regions()</code></a> to number them all.</p>
 
424
<p>Use <code class="function">im_histindexed()</code> to (for example) find blob coordinates.</p>
 
425
<p>See also: <code class="function">im_histindexed()</code></p>
 
426
<div class="refsect3">
 
427
<a name="id-1.3.11.9.6.9"></a><h4>Parameters</h4>
 
428
<div class="informaltable"><table width="100%" border="0">
 
429
<colgroup>
 
430
<col width="150px" class="parameters_name">
 
431
<col class="parameters_description">
 
432
<col width="200px" class="parameters_annotations">
 
433
</colgroup>
 
434
<tbody>
 
435
<tr>
 
436
<td class="parameter_name"><p>test</p></td>
 
437
<td class="parameter_description"><p>image to test</p></td>
 
438
<td class="parameter_annotations"> </td>
 
439
</tr>
 
440
<tr>
 
441
<td class="parameter_name"><p>mask</p></td>
 
442
<td class="parameter_description"><p>write labelled regions here</p></td>
 
443
<td class="parameter_annotations"> </td>
 
444
</tr>
 
445
<tr>
 
446
<td class="parameter_name"><p>segments</p></td>
 
447
<td class="parameter_description"><p>return number of regions here</p></td>
 
448
<td class="parameter_annotations"> </td>
 
449
</tr>
 
450
</tbody>
 
451
</table></div>
 
452
</div>
 
453
<div class="refsect3">
 
454
<a name="id-1.3.11.9.6.10"></a><h4>Returns</h4>
 
455
<p> 0 on success, -1 on error.</p>
 
456
<p></p>
 
457
</div>
 
458
</div>
 
459
</div>
 
460
<div class="refsect1">
 
461
<a name="libvips-morphology.other_details"></a><h2>Types and Values</h2>
 
462
<div class="refsect2">
 
463
<a name="VipsOperationMorphology"></a><h3>enum VipsOperationMorphology</h3>
 
464
<p>More like hit-miss, really. </p>
 
465
<p>See also: <a class="link" href="libvips-morphology.html#vips-morph" title="vips_morph ()"><code class="function">vips_morph()</code></a>.</p>
 
466
<div class="refsect3">
 
467
<a name="id-1.3.11.10.2.5"></a><h4>Members</h4>
 
468
<div class="informaltable"><table width="100%" border="0">
 
469
<colgroup>
 
470
<col width="300px" class="enum_members_name">
 
471
<col class="enum_members_description">
 
472
<col width="200px" class="enum_members_annotations">
 
473
</colgroup>
 
474
<tbody>
 
475
<tr>
 
476
<td class="enum_member_name"><p><a name="VIPS-OPERATION-MORPHOLOGY-ERODE:CAPS"></a>VIPS_OPERATION_MORPHOLOGY_ERODE</p></td>
 
477
<td class="enum_member_description">
 
478
<p>true if all set</p>
 
479
</td>
 
480
<td class="enum_member_annotations"> </td>
 
481
</tr>
 
482
<tr>
 
483
<td class="enum_member_name"><p><a name="VIPS-OPERATION-MORPHOLOGY-DILATE:CAPS"></a>VIPS_OPERATION_MORPHOLOGY_DILATE</p></td>
 
484
<td class="enum_member_description">
 
485
<p>true if one set</p>
 
486
</td>
 
487
<td class="enum_member_annotations"> </td>
 
488
</tr>
 
489
<tr>
 
490
<td class="enum_member_name"><p><a name="VIPS-OPERATION-MORPHOLOGY-LAST:CAPS"></a>VIPS_OPERATION_MORPHOLOGY_LAST</p></td>
 
491
<td class="enum_member_description"> </td>
 
492
<td class="enum_member_annotations"> </td>
 
493
</tr>
 
494
</tbody>
 
495
</table></div>
 
496
</div>
457
497
</div>
458
498
</div>
459
499
<div class="refsect1">
463
503
</div>
464
504
<div class="footer">
465
505
<hr>
466
 
          Generated by GTK-Doc V1.19</div>
 
506
          Generated by GTK-Doc V1.20</div>
467
507
</body>
468
508
</html>
 
 
b'\\ No newline at end of file'