Skip to content

Commit dc483a1

Browse files
committed
revise docs in morphology
1 parent dfffacc commit dc483a1

File tree

6 files changed

+33
-23
lines changed

6 files changed

+33
-23
lines changed

doc/rename.sed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ s/vips_\(error_thaw\)/apple_\1_apple/g
44
s/vips_\(error_buffer\)/apple_\1_apple/g
55
s/vips_\(image_new\)/apple_\1_apple/g
66
s/vips_\(target_new_to_memory\)/apple_\1_apple/g
7+
s/vips_\(vector_isenabled\)/apple_\1_apple/g
8+
s/vips_\(vector_set_enabled\)/apple_\1_apple/g
79
s/vips_\(.*\)_get_type/apple_\1_get_type_apple/g
810

911
s/See also: \([^.]\)/::: seealso\n * \1/g
@@ -489,6 +491,7 @@ s/#VIPS_OPERATION_ROUND_\([^ ,.]*\)/[enum@Vips.OperationRound.\1]/g
489491
s/#VIPS_OPERATION_COMPLEX_\([^ ,.]*\)/[enum@Vips.OperationComplex.\1]/g
490492
s/#VIPS_OPERATION_COMPLEX2_\([^ ,.]*\)/[enum@Vips.OperationComplex2.\1]/g
491493
s/#VIPS_OPERATION_COMPLEXGET_\([^ ,.]*\)/[enum@Vips.OperationComplexget.\1]/g
494+
s/#VIPS_OPERATION_MORPHOLOGY_\([^ ,.]*\)/[enum@Vips.OperationMorphology.\1]/g
492495
s/#VIPS_OPERATION_\([^ ,.]*\)/[flags@Vips.OperationFlags.\1]/g
493496
s/#VIPS_FORMAT_\([^ ,.]*\)/[enum@Vips.BandFormat.\1]/g
494497
s/#VIPS_PRECISION_\([^ ,.]*\)/[enum@Vips.Precision.\1]/g

libvips/morphology/countlines.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ vips_countlines_init(VipsCountlines *countlines)
169169
* Xsize or Ysize and returns the mean of the result
170170
* Input should be one band, 8-bit.
171171
*
172-
* See also: vips_morph(), vips_conv().
172+
* ::: seealso
173+
* [method@Image.morph], [method@Image.conv].
173174
*
174175
* Returns: 0 on success, -1 on error.
175176
*/

libvips/morphology/labelregions.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,26 +145,28 @@ vips_labelregions_init(VipsLabelregions *labelregions)
145145
* @mask: write labelled regions here
146146
* @...: %NULL-terminated list of optional named arguments
147147
*
148-
* Optional arguments:
149-
*
150-
* * @segments: return number of regions found here
148+
* Label regions of equal pixels in an image.
151149
*
152150
* Repeatedly scans @in for regions of 4-connected pixels
153151
* with the same pixel value. Every time a region is discovered, those
154152
* pixels are marked in @mask with a unique serial number. Once all pixels
155153
* have been labelled, the operation returns, setting @segments to the number
156154
* of discrete regions which were detected.
157155
*
158-
* @mask is always a 1-band #VIPS_FORMAT_INT image of the same dimensions as
159-
* @in.
156+
* @mask is always a 1-band [enum@Vips.BandFormat.INT] image of the same
157+
* dimensions as @in.
160158
*
161159
* This operation is useful for, for example, blob counting. You can use the
162160
* morphological operators to detect and isolate a series of objects, then use
163-
* vips_labelregions() to number them all.
161+
* [method@Image.labelregions] to number them all.
162+
*
163+
* Use [method@Image.hist_find_indexed] to (for example) find blob coordinates.
164164
*
165-
* Use vips_hist_find_indexed() to (for example) find blob coordinates.
165+
* ::: tip "Optional arguments"
166+
* * @segments: %gint, return number of regions found here
166167
*
167-
* See also: vips_hist_find_indexed().
168+
* ::: seealso
169+
* [method@Image.hist_find_indexed].
168170
*
169171
* Returns: 0 on success, -1 on error.
170172
*/

libvips/morphology/morph.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ typedef struct {
114114
*
115115
* More like hit-miss, really.
116116
*
117-
* See also: vips_morph().
117+
* ::: seealso
118+
* [method@Image.morph].
118119
*/
119120

120121
typedef struct {
@@ -1007,21 +1008,21 @@ vips_morph_init(VipsMorph *morph)
10071008
* based on the book "Fundamentals of Digital Image Processing" by A. Jain,
10081009
* pp 384-388, Prentice-Hall, 1989.
10091010
*
1010-
* For #VIPS_OPERATION_MORPHOLOGY_ERODE,
1011+
* For [enum@Vips.OperationMorphology.ERODE],
10111012
* the whole mask must match for the output pixel to be
10121013
* set, that is, the result is the logical AND of the selected input pixels.
10131014
*
1014-
* For #VIPS_OPERATION_MORPHOLOGY_DILATE,
1015+
* For [enum@Vips.OperationMorphology.DILATE],
10151016
* the output pixel is set if any part of the mask
10161017
* matches, that is, the result is the logical OR of the selected input pixels.
10171018
*
1018-
* See the boolean operations vips_andimage(), vips_orimage() and
1019-
* vips_eorimage()
1019+
* See the boolean operations [method@Image.andimage], [method@Image.orimage]
1020+
* and [method@Image.eorimage]
10201021
* for analogues of the usual set difference and set union operations.
10211022
*
10221023
* Operations are performed using the processor's vector unit,
10231024
* if possible. Disable this with `--vips-novector` or `VIPS_NOVECTOR` or
1024-
* vips_vector_set_enabled()
1025+
* [func@vector_set_enabled].
10251026
*
10261027
* Returns: 0 on success, -1 on error
10271028
*/

libvips/morphology/nearest.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,6 @@ vips_fill_nearest_init(VipsFillNearest *nearest)
329329
* @out: image with zero pixels filled with the nearest non-zero pixel
330330
* @...: %NULL-terminated list of optional named arguments
331331
*
332-
* Optional arguments:
333-
*
334-
* * @distance: output image of distance to nearest non-zero pixel
335-
*
336332
* Fill outwards from every non-zero pixel in @in, setting pixels in @distance
337333
* and @value.
338334
*
@@ -343,7 +339,12 @@ vips_fill_nearest_init(VipsFillNearest *nearest)
343339
* @distance is a one-band float image. @value has the same number of bands and
344340
* format as @in.
345341
*
346-
* See also: vips_hist_find_indexed().
342+
* ::: tip "Optional arguments"
343+
* * @distance: [class@Image], output image of distance to nearest
344+
* non-zero pixel
345+
*
346+
* ::: seealso
347+
* [method@Image.hist_find_indexed].
347348
*
348349
* Returns: 0 on success, -1 on error.
349350
*/

libvips/morphology/rank.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ vips_rank_init(VipsRank *rank)
605605
* @index: select pixel
606606
* @...: %NULL-terminated list of optional named arguments
607607
*
608-
* vips_rank() does rank filtering on an image. A window of size @width by
608+
* [method@Image.rank] does rank filtering on an image. A window of size @width by
609609
* @height is passed over the image. At each position, the pixels inside the
610610
* window are sorted into ascending order and the pixel at position @index is
611611
* output. @index numbers from 0.
@@ -622,7 +622,8 @@ vips_rank_init(VipsRank *rank)
622622
* The special cases n == 0 and n == m * m - 1 are useful dilate and
623623
* expand operators.
624624
*
625-
* See also: vips_conv(), vips_median(), vips_spcor().
625+
* ::: seealso
626+
* [method@Image.conv], [method@Image.median], [method@Image.spcor].
626627
*
627628
* Returns: 0 on success, -1 on error
628629
*/
@@ -651,7 +652,8 @@ vips_rank(VipsImage *in, VipsImage **out,
651652
*
652653
* vips_rank(in, out, size, size, (size * size) / 2);
653654
*
654-
* See also: vips_rank().
655+
* ::: seealso
656+
* [method@Image.rank].
655657
*
656658
* Returns: 0 on success, -1 on error
657659
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy