File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 80
80
* mask must have odd length sides --- the origin of the mask is taken to be
81
81
* the centre value. For example, the mask:
82
82
*
83
- * 3 3
84
- * 128 255 128
85
- * 255 0 255
86
- * 128 255 128
83
+ * VipsImage *mask = vips_image_new_matrixv( 3, 3,
84
+ * 128.0, 255.0, 128.0,
85
+ * 255.0, 255.0, 255.0,
86
+ * 128.0, 255.0, 128.0 );
87
87
*
88
- * applied to an image with vips_morph() #VIPS_OPERATION_MORPHOLOGY_ERODE, will
89
- * find all black pixels
90
- * 4-way connected with white pixels. Essentially, dilate
91
- * sets pixels in the output if any part of the mask matches, whereas
88
+ * applied to an image with vips_morph() #VIPS_OPERATION_MORPHOLOGY_DILATE will
89
+ * do a 4-connected dilation.
90
+ *
91
+ * Dilate sets pixels in the output if any part of the mask matches, whereas
92
92
* erode sets pixels only if all of the mask matches.
93
93
*
94
94
* See vips_andimage(), vips_orimage() and vips_eorimage()
95
95
* for analogues of the usual set difference and set union operations.
96
+ *
97
+ * Use vips_image_new_matrixv() to create a mask in source, vips_matrixload()
98
+ * to load a mask from a simple text file, vips_mask_ideal() and friends to
99
+ * create squarem circular and ring masks of specific sizes.
96
100
*/
97
101
98
102
G_DEFINE_ABSTRACT_TYPE ( VipsMorphology , vips_morphology ,
You can’t perform that action at this time.
0 commit comments