-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinary.html
1090 lines (1086 loc) · 103 KB
/
binary.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Filtering » Binary image filters module | DIPlib | a library for quantitative image analysis</title>
<link rel="stylesheet" href="m-dip+documentation.compiled.css" />
<link rel="icon" href="DIPlib_logo_32.png" type="image/png" />
<link rel="search" type="application/opensearchdescription+xml" href="opensearch.xml" title="Search DIPlib documentation" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#ffffff" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
<a href="https://diplib.org"><img src="DIPlib_logo.svg" alt="" />DIPlib</a><span class="m-breadcrumb">┃</span><a href="index.html" class="m-thin">a library for quantitative image analysis</a><span class="m-breadcrumb">┃</span><a href="https://github.com/DIPlib/diplib/releases/tag/3.5.2" class="m-thin">version 3.5.2</a> </span>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
<li><a href="pages.html">Pages</a></li>
<li><a href="modules.html">Modules</a></li>
</ol>
<ol class="m-col-t-6 m-col-m-none" start="3">
<li><a href="classes.html">Classes</a></li>
<li><a href="files.html">Files</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
<span class="m-breadcrumb"><a href="filtering.html">Filtering</a> »</span>
Binary image filters <span class="m-thin">module</span> <div class="m-doc-include m-code m-thin m-text-right">#include <a href="file--diplib--binary-h.html">"diplib/binary.h"</a></div>
</h1>
<p>Processing binary images, including binary mathematical morphology.</p>
<div class="m-block m-default">
<h3>Contents</h3>
<ul>
<li>
Reference
<ul>
<li><a href="#nested-classes">Classes</a></li>
<li><a href="#alias-members">Aliases</a></li>
<li><a href="#function-members">Functions</a></li>
</ul>
</li>
</ul>
</div>
<section id="nested-classes">
<h2>Classes</h2>
<dl class="m-doc">
<dt>
class <a href="dip-Interval.html" class="m-doc">dip::<wbr />Interval</a>
</dt>
<dd>Represents the shape of an interval for inf-generating and sup-generating operators.</dd>
</dl>
</section>
<section id="alias-members">
<h2>Aliases</h2>
<dl class="m-doc">
<dt>
using <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::<wbr />IntervalArray</a> = std::vector<Interval>
</dt>
<dd>An array of intervals.</dd>
</dl>
</section>
<section id="function-members">
<h2>Functions</h2>
<dl class="m-doc">
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-BinaryDilation-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc">dip::<wbr />BinaryDilation</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Binary morphological dilation operation. <a href="#dip-BinaryDilation-Image-CL-Image-L-dip-sint--dip-uint--String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-BinaryErosion-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc">dip::<wbr />BinaryErosion</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::OBJECT)</span>
</dt>
<dd>Binary morphological erosion operation. <a href="#dip-BinaryErosion-Image-CL-Image-L-dip-sint--dip-uint--String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-BinaryClosing-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc">dip::<wbr />BinaryClosing</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::SPECIAL)</span>
</dt>
<dd>Binary morphological closing operation. <a href="#dip-BinaryClosing-Image-CL-Image-L-dip-sint--dip-uint--String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-BinaryOpening-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc">dip::<wbr />BinaryOpening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::SPECIAL)</span>
</dt>
<dd>Binary morphological opening operation. <a href="#dip-BinaryOpening-Image-CL-Image-L-dip-sint--dip-uint--String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-IsotropicDilation-Image-CL-Image-L-dfloat-" class="m-doc">dip::<wbr />IsotropicDilation</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span>
</dt>
<dd>Isotropic dilation of binary image. <a href="#dip-IsotropicDilation-Image-CL-Image-L-dfloat-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-IsotropicErosion-Image-CL-Image-L-dfloat-" class="m-doc">dip::<wbr />IsotropicErosion</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span>
</dt>
<dd>Isotropic erosion of binary image. <a href="#dip-IsotropicErosion-Image-CL-Image-L-dfloat-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-IsotropicClosing-Image-CL-Image-L-dfloat-" class="m-doc">dip::<wbr />IsotropicClosing</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span>
</dt>
<dd>Isotropic closing of binary image. <a href="#dip-IsotropicClosing-Image-CL-Image-L-dfloat-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-IsotropicOpening-Image-CL-Image-L-dfloat-" class="m-doc">dip::<wbr />IsotropicOpening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span>
</dt>
<dd>Isotropic opening of binary image. <a href="#dip-IsotropicOpening-Image-CL-Image-L-dfloat-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-BinaryPropagation-Image-CL-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc">dip::<wbr />BinaryPropagation</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& inSeed,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& inMask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = 1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Morphological propagation of binary objects. <a href="#dip-BinaryPropagation-Image-CL-Image-CL-Image-L-dip-sint--dip-uint--String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-EdgeObjectsRemove-Image-CL-Image-L-dip-uint-" class="m-doc">dip::<wbr />EdgeObjectsRemove</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& c_in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 1)</span>
</dt>
<dd>Remove edge objects from a binary or labeled image. <a href="#dip-EdgeObjectsRemove-Image-CL-Image-L-dip-uint-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-FillHoles-Image-CL-Image-L-dip-uint-" class="m-doc">dip::<wbr />FillHoles</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 1)</span>
</dt>
<dd>Fill holes in binary image. <a href="#dip-FillHoles-Image-CL-Image-L-dip-uint-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-ConditionalThickening2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL" class="m-doc">dip::<wbr />ConditionalThickening2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& c_in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& c_mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& endPixelCondition = S::LOSE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Thickens the image <code>in</code> conditioned on the mask (2D only). <a href="#dip-ConditionalThickening2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-ConditionalThinning2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL" class="m-doc">dip::<wbr />ConditionalThinning2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& endPixelCondition = S::LOSE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Thins the image <code>in</code> conditioned on the mask (2D only). <a href="#dip-ConditionalThinning2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-BinaryAreaOpening-Image-CL-Image-L-dip-uint--dip-uint--String-CL" class="m-doc">dip::<wbr />BinaryAreaOpening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> filterSize,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Computes the area opening of a binary image <a href="#dip-BinaryAreaOpening-Image-CL-Image-L-dip-uint--dip-uint--String-CL">more...</a></dd>
<dt id="dip-BinaryAreaClosing-Image-CL-Image-L-dip-uint--dip-uint--String-CL">
<span class="m-doc-wrap-bumper">void <a href="#dip-BinaryAreaClosing-Image-CL-Image-L-dip-uint--dip-uint--String-CL" class="m-doc-self">dip::<wbr />BinaryAreaClosing</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> filterSize,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& s_edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Computes the area closing of a binary image, by calling <a href="binary.html#dip-BinaryAreaOpening-Image-CL-Image-L-dip-uint--dip-uint--String-CL"><code>dip::BinaryAreaOpening</code></a> on the inverse
of the input image.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL" class="m-doc">dip::<wbr />EuclideanSkeleton</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& endPixelCondition = S::NATURAL,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Accurate binary skeleton (2D and 3D only). <a href="#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL" class="m-doc">dip::<wbr />CountNeighbors</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& mode = S::FOREGROUND,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Counts the number of set neighbors for each pixel in the binary image <code>in</code>. <a href="#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-MajorityVote-Image-CL-Image-L-dip-uint--dip-String-CL" class="m-doc">dip::<wbr />MajorityVote</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Filters the binary image by setting each pixel to the phase with more pixels in the neighborhood. <a href="#dip-MajorityVote-Image-CL-Image-L-dip-uint--dip-String-CL">more...</a></dd>
<dt id="dip-GetSinglePixels-Image-CL-Image-L-dip-uint--dip-String-CL">
<span class="m-doc-wrap-bumper">void <a href="#dip-GetSinglePixels-Image-CL-Image-L-dip-uint--dip-String-CL" class="m-doc-self">dip::<wbr />GetSinglePixels</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Returns the isolated pixels in the binary image <code>in</code>. That is, the set pixels with zero neighbors. See <a href="binary.html#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL"><code>dip::CountNeighbors</code></a>.</dd>
<dt id="dip-GetEndPixels-Image-CL-Image-L-dip-uint--dip-String-CL">
<span class="m-doc-wrap-bumper">void <a href="#dip-GetEndPixels-Image-CL-Image-L-dip-uint--dip-String-CL" class="m-doc-self">dip::<wbr />GetEndPixels</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Returns the end pixels in the skeleton image <code>in</code>. That is, the set pixels with one neighbor. See <a href="binary.html#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL"><code>dip::CountNeighbors</code></a>.</dd>
<dt id="dip-GetLinkPixels-Image-CL-Image-L-dip-uint--dip-String-CL">
<span class="m-doc-wrap-bumper">void <a href="#dip-GetLinkPixels-Image-CL-Image-L-dip-uint--dip-String-CL" class="m-doc-self">dip::<wbr />GetLinkPixels</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Returns the link pixels in the skeleton image <code>in</code>. That is, the set pixels with two neighbors. See <a href="binary.html#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL"><code>dip::CountNeighbors</code></a>.</dd>
<dt id="dip-GetBranchPixels-Image-CL-Image-L-dip-uint--dip-String-CL">
<span class="m-doc-wrap-bumper">void <a href="#dip-GetBranchPixels-Image-CL-Image-L-dip-uint--dip-String-CL" class="m-doc-self">dip::<wbr />GetBranchPixels</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span>
</dt>
<dd>Returns the branch pixels in the skeleton image <code>in</code>. That is, the set pixels with more than two neighbors. See <a href="binary.html#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL"><code>dip::CountNeighbors</code></a>.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="dip-Interval.html#dip-Invert-IntervalArray-L" class="m-doc">dip::<wbr />Invert</a>(</span><span class="m-doc-wrap"><a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a>& array)</span>
</dt>
<dd>Inverts the intervals in the array, swapping foreground and background pixels. Works correctly
if intervals in the array share data. However, this function could also affect other intervals not in
the array, if data is shared.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-SupGenerating-Image-CL-Image-L-Interval-CL-String-CL" class="m-doc">dip::<wbr />SupGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Sup-generating operator, also known as hit-miss operator. <a href="#dip-SupGenerating-Image-CL-Image-L-Interval-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-InfGenerating-Image-CL-Image-L-Interval-CL-String-CL" class="m-doc">dip::<wbr />InfGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Inf-generating operator, the dual of the hit-miss operator. <a href="#dip-InfGenerating-Image-CL-Image-L-Interval-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-UnionSupGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL" class="m-doc">dip::<wbr />UnionSupGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Union of sup-generating operators. <a href="#dip-UnionSupGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-UnionSupGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL" class="m-doc">dip::<wbr />UnionSupGenerating2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Union of sup-generating operators. <a href="#dip-UnionSupGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-IntersectionInfGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL" class="m-doc">dip::<wbr />IntersectionInfGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Intersection of inf-generating operators. <a href="#dip-IntersectionInfGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-IntersectionInfGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL" class="m-doc">dip::<wbr />IntersectionInfGenerating2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Intersection of inf-generating operators. <a href="#dip-IntersectionInfGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-Thickening-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL" class="m-doc">dip::<wbr />Thickening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Applies the thickening operator, optionally constrained by a mask, to an image. <a href="#dip-Thickening-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-Thickening2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL" class="m-doc">dip::<wbr />Thickening2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Applies the thickening operator, optionally constrained by a mask, to an image. <a href="#dip-Thickening2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-Thinning-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL" class="m-doc">dip::<wbr />Thinning</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Applies the thinning operator, optionally constrained by a mask, to an image. <a href="#dip-Thinning-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#dip-Thinning2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL" class="m-doc">dip::<wbr />Thinning2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span>
</dt>
<dd>Applies the thinning operator, optionally constrained by a mask, to an image. <a href="#dip-Thinning2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-HomotopicThinningInterval2D-dip-uint-" class="m-doc">dip::<wbr />HomotopicThinningInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2) -> <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a></span>
</dt>
<dd>Returns a 2D interval array for homotopic thinning. <a href="#dip-HomotopicThinningInterval2D-dip-uint-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-HomotopicThickeningInterval2D-dip-uint-" class="m-doc">dip::<wbr />HomotopicThickeningInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2) -> <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a></span>
</dt>
<dd>Returns a 2D interval array for homotopic thickening. <a href="#dip-HomotopicThickeningInterval2D-dip-uint-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-EndPixelInterval2D-dip-uint-" class="m-doc">dip::<wbr />EndPixelInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2) -> <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a></span>
</dt>
<dd>Returns an interval array for detecting end pixels. Includes isolated pixels. <a href="#dip-EndPixelInterval2D-dip-uint-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-HomotopicEndPixelInterval2D-dip-uint-" class="m-doc">dip::<wbr />HomotopicEndPixelInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2) -> <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a></span>
</dt>
<dd>Returns an interval array for detecting end pixels. Excludes isolated pixels <a href="#dip-HomotopicEndPixelInterval2D-dip-uint-">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-HomotopicInverseEndPixelInterval2D-dip-uint-" class="m-doc">dip::<wbr />HomotopicInverseEndPixelInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2) -> <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a></span>
</dt>
<dd>Returns an interval array for detecting end background pixels. Excludes isolated pixels. <a href="#dip-HomotopicInverseEndPixelInterval2D-dip-uint-">more...</a></dd>
<dt id="dip-SinglePixelInterval-dip-uint-">
<span class="m-doc-wrap-bumper">auto <a href="#dip-SinglePixelInterval-dip-uint-" class="m-doc-self">dip::<wbr />SinglePixelInterval</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> nDims = 2) -> <a href="dip-Interval.html" class="m-doc">dip::Interval</a></span>
</dt>
<dd>Returns an interval for detecting single pixels. Use with <a href="binary.html#dip-SupGenerating-Image-CL-Image-L-Interval-CL-String-CL"><code>dip::SupGenerating</code></a> to detect isolated
pixels. Note that <a href="binary.html#dip-GetSinglePixels-Image-CL-Image-L-dip-uint--dip-String-CL"><code>dip::GetSinglePixels</code></a> is more efficient.</dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-BranchPixelInterval2D" class="m-doc">dip::<wbr />BranchPixelInterval2D</a>(</span><span class="m-doc-wrap">) -> <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a></span>
</dt>
<dd>Returns a 2D interval array for detecting branch pixels. <a href="#dip-BranchPixelInterval2D">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-BoundaryPixelInterval2D" class="m-doc">dip::<wbr />BoundaryPixelInterval2D</a>(</span><span class="m-doc-wrap">) -> <a href="dip-Interval.html" class="m-doc">dip::Interval</a></span>
</dt>
<dd>Returns a 2D interval for detecting boundary pixels. <a href="#dip-BoundaryPixelInterval2D">more...</a></dd>
<dt>
<span class="m-doc-wrap-bumper">auto <a href="#dip-ConvexHullInterval2D" class="m-doc">dip::<wbr />ConvexHullInterval2D</a>(</span><span class="m-doc-wrap">) -> <a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a></span>
</dt>
<dd>Returns a 2D interval array to thicken to a convex hull. <a href="#dip-ConvexHullInterval2D">more...</a></dd>
</dl>
</section>
<section>
<h2>Function documentation</h2>
<section class="m-doc-details" id="dip-BinaryDilation-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-BinaryDilation-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc-self">dip::<wbr />BinaryDilation</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Binary morphological dilation operation.</p>
<p>The <code>connectivity</code> parameter defines the metric, that is, the shape of
the structuring element (see <a href="concepts.html#connectivity">Connectivity</a>). Alternating connectivity
is only implemented for 2D and 3D images.</p>
<p>The <code>edgeCondition</code> parameter specifies whether pixels past the border of the image should be
treated as object (by passing <code>"object"</code>) or as background (by passing <code>"background"</code>).</p>
<p>For dilations with arbitrary structuring elements, see <a href="morphology.html#dip-Dilation-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Dilation</code></a>, for dilations with an isotropic (disk)
structuring element, see <a href="binary.html#dip-IsotropicDilation-Image-CL-Image-L-dfloat-"><code>dip::IsotropicDilation</code></a>.</p>
<aside class="m-note m-info">
<h4>Attention</h4>
<p>This algorithm exists for historical reasons. <a href="morphology.html#dip-Dilation-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Dilation</code></a> with a diamond, square or octagonal
structuring element is always faster.</p>
</aside>
</div></section>
<section class="m-doc-details" id="dip-BinaryErosion-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-BinaryErosion-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc-self">dip::<wbr />BinaryErosion</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::OBJECT)</span></span>
</h3>
<p>Binary morphological erosion operation.</p>
<p>The <code>connectivity</code> parameter defines the metric, that is, the shape of
the structuring element (see <a href="concepts.html#connectivity">Connectivity</a>). Alternating connectivity
is only implemented for 2D and 3D images.</p>
<p>The <code>edgeCondition</code> parameter specifies whether pixels past the border of the image should be
treated as object (by passing <code>"object"</code>) or as background (by passing <code>"background"</code>).</p>
<p>For erosions with arbitrary structuring elements, see <a href="morphology.html#dip-Erosion-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Erosion</code></a>, for erosions with an isotropic (disk)
structuring element, see <a href="binary.html#dip-IsotropicDilation-Image-CL-Image-L-dfloat-"><code>dip::IsotropicDilation</code></a>.</p>
<aside class="m-note m-info">
<h4>Attention</h4>
<p>This algorithm exists for historical reasons. <a href="morphology.html#dip-Erosion-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Erosion</code></a> with a diamond, square or octagonal
structuring element is always faster.</p>
</aside>
</div></section>
<section class="m-doc-details" id="dip-BinaryClosing-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-BinaryClosing-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc-self">dip::<wbr />BinaryClosing</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::SPECIAL)</span></span>
</h3>
<p>Binary morphological closing operation.</p>
<p>The <code>connectivity</code> parameter defines the metric, that is, the shape of
the structuring element (see <a href="concepts.html#connectivity">Connectivity</a>). Alternating connectivity
is only implemented for 2D and 3D images.</p>
<p>The <code>edgeCondition</code> parameter specifies whether pixels past the border of the image should be
treated as object (by passing <code>"object"</code>) or as background (by passing <code>"background"</code>).
Additionally, you can set it to <code>"special"</code> for special handling:
<code>"background"</code> for the dilation, <code>"object"</code> for the erosion; this avoids the border
effect you can get in the corners of the image in some cases.</p>
<p>For closings with arbitrary structuring elements, see <a href="morphology.html#dip-Closing-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Closing</code></a>.</p>
<aside class="m-note m-info">
<h4>Attention</h4>
<p>This algorithm exists for historical reasons. <a href="morphology.html#dip-Closing-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Closing</code></a> with a diamond, square or octagonal
structuring element is always faster.</p>
</aside>
</div></section>
<section class="m-doc-details" id="dip-BinaryOpening-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-BinaryOpening-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc-self">dip::<wbr />BinaryOpening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = -1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 3,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::SPECIAL)</span></span>
</h3>
<p>Binary morphological opening operation.</p>
<p>The <code>connectivity</code> parameter defines the metric, that is, the shape of
the structuring element (see <a href="concepts.html#connectivity">Connectivity</a>). Alternating connectivity
is only implemented for 2D and 3D images.</p>
<p>The <code>edgeCondition</code> parameter specifies whether pixels past the border of the image should be
treated as object (by passing <code>"object"</code>) or as background (by passing <code>"background"</code>).
Additionally, you can set it to <code>"special"</code> for special handling:
<code>"object"</code> for the erosion, <code>"background"</code> for the dilation; this avoids the border
effect you can get in the corners of the image in some cases.</p>
<p>For openings with arbitrary structuring elements, see <a href="morphology.html#dip-Opening-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Opening</code></a>.</p>
<aside class="m-note m-info">
<h4>Attention</h4>
<p>This algorithm exists for historical reasons. <a href="morphology.html#dip-Opening-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Opening</code></a> with a diamond, square or octagonal
structuring element is always faster.</p>
</aside>
</div></section>
<section class="m-doc-details" id="dip-IsotropicDilation-Image-CL-Image-L-dfloat-"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-IsotropicDilation-Image-CL-Image-L-dfloat-" class="m-doc-self">dip::<wbr />IsotropicDilation</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span></span>
</h3>
<p>Isotropic dilation of binary image.</p>
<p>Does a threshold of the <a href="distance.html#dip-EuclideanDistanceTransform-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanDistanceTransform</code></a> of the background of <code>in</code>.
This is much faster than applying <a href="morphology.html#dip-Dilation-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Dilation</code></a> with a disk structuring element of diameter <code>2 * distance</code>,
for larger sizes.</p>
<p>For other structuring element shapes, or for gray-scale images, use <a href="morphology.html#dip-Dilation-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Dilation</code></a>. See also <a href="binary.html#dip-BinaryDilation-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><code>dip::BinaryDilation</code></a>.</p>
</div></section>
<section class="m-doc-details" id="dip-IsotropicErosion-Image-CL-Image-L-dfloat-"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-IsotropicErosion-Image-CL-Image-L-dfloat-" class="m-doc-self">dip::<wbr />IsotropicErosion</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span></span>
</h3>
<p>Isotropic erosion of binary image.</p>
<p>Does a threshold of the <a href="distance.html#dip-EuclideanDistanceTransform-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanDistanceTransform</code></a> of <code>in</code>.
This is much faster than applying <a href="morphology.html#dip-Erosion-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Erosion</code></a> with a disk structuring element of diameter <code>2 * distance</code>,
for larger sizes.</p>
<p>For other structuring element shapes, or for gray-scale images, use <a href="morphology.html#dip-Erosion-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Erosion</code></a>. See also <a href="binary.html#dip-BinaryErosion-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><code>dip::BinaryErosion</code></a>.</p>
</div></section>
<section class="m-doc-details" id="dip-IsotropicClosing-Image-CL-Image-L-dfloat-"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-IsotropicClosing-Image-CL-Image-L-dfloat-" class="m-doc-self">dip::<wbr />IsotropicClosing</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span></span>
</h3>
<p>Isotropic closing of binary image.</p>
<p>Composition of <a href="binary.html#dip-IsotropicDilation-Image-CL-Image-L-dfloat-"><code>dip::IsotropicDilation</code></a> and <a href="binary.html#dip-IsotropicErosion-Image-CL-Image-L-dfloat-"><code>dip::IsotropicErosion</code></a>.</p>
<p>For other structuring element shapes, or for gray-scale images, use <a href="morphology.html#dip-Closing-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Closing</code></a>. See also <a href="binary.html#dip-BinaryClosing-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><code>dip::BinaryClosing</code></a>.</p>
</div></section>
<section class="m-doc-details" id="dip-IsotropicOpening-Image-CL-Image-L-dfloat-"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-IsotropicOpening-Image-CL-Image-L-dfloat-" class="m-doc-self">dip::<wbr />IsotropicOpening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="pixeltypes.html#dip-dfloat" class="m-doc">dip::dfloat</a> distance)</span></span>
</h3>
<p>Isotropic opening of binary image.</p>
<p>Composition of <a href="binary.html#dip-IsotropicErosion-Image-CL-Image-L-dfloat-"><code>dip::IsotropicErosion</code></a> and <a href="binary.html#dip-IsotropicDilation-Image-CL-Image-L-dfloat-"><code>dip::IsotropicDilation</code></a>.</p>
<p>For other structuring element shapes, or for gray-scale images, use <a href="morphology.html#dip-Opening-Image-CL-Image-L-StructuringElement-CL-StringArray-CL"><code>dip::Opening</code></a>. See also <a href="binary.html#dip-BinaryOpening-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><code>dip::BinaryOpening</code></a>.</p>
</div></section>
<section class="m-doc-details" id="dip-BinaryPropagation-Image-CL-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-BinaryPropagation-Image-CL-Image-CL-Image-L-dip-sint--dip-uint--String-CL" class="m-doc-self">dip::<wbr />BinaryPropagation</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& inSeed,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& inMask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-sint" class="m-doc">dip::sint</a> connectivity = 1,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Morphological propagation of binary objects.</p>
<p><code>inSeed</code> contains the seeds to propagate. To use no seeds, simply pass a raw image, i.e. <code>dip::Image()</code>.
<code>inMask</code> contains the mask in which propagation is allowed.</p>
<p>The <code>connectivity</code> parameter defines the metric, that is, the shape of
the structuring element (see <a href="concepts.html#connectivity">Connectivity</a>). Alternating connectivity
is only implemented for 2D and 3D images.</p>
<p>The <code>edgeCondition</code> parameter specifies whether pixels past the border of the image should be
treated as object (by passing <code>"object"</code>) or as background (by passing <code>"background"</code>).</p>
<p>The algorithm is repeated <code>iterations</code> times. Pass 0 to continue until propagation is completed. With
<code>iterations==0</code>, a faster algorithm is used.</p>
<p>See also <a href="morphology.html#dip-MorphologicalReconstruction-Image-CL-Image-CL-Image-L-dip-uint--String-CL"><code>dip::MorphologicalReconstruction</code></a>, which is less flexible but works for gray-scale images.</p>
</div></section>
<section class="m-doc-details" id="dip-EdgeObjectsRemove-Image-CL-Image-L-dip-uint-"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-EdgeObjectsRemove-Image-CL-Image-L-dip-uint-" class="m-doc-self">dip::<wbr />EdgeObjectsRemove</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& c_in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 1)</span></span>
</h3>
<p>Remove edge objects from a binary or labeled image.</p>
<p>Removes those objects from <code>in</code> that are connected to the edges of the image.</p>
<p>If the input image is binary. this function calls <a href="binary.html#dip-BinaryPropagation-Image-CL-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><code>dip::BinaryPropagation</code></a> with no seed image
and <code>edgeCondition</code> set to <code>"object"</code>. The result of the propagation is xor-ed with the input image.
In this case, the <code>connectivity</code> parameter defines the metric, that is, the shape of the structuring
element (see <a href="concepts.html#connectivity">Connectivity</a>).</p>
<p>If the input image is labeled, this function erases the labels that touch the image edge.
In this case, <code>connectivity</code> is ignored. Note that a labeled image must be of an unsigned integer type.</p>
</div></section>
<section class="m-doc-details" id="dip-FillHoles-Image-CL-Image-L-dip-uint-"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-FillHoles-Image-CL-Image-L-dip-uint-" class="m-doc-self">dip::<wbr />FillHoles</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 1)</span></span>
</h3>
<p>Fill holes in binary image.</p>
<p>Removes holes in binary objects in <code>in</code> that are not connected to the edges of the image.
This function calls <a href="binary.html#dip-BinaryPropagation-Image-CL-Image-CL-Image-L-dip-sint--dip-uint--String-CL"><code>dip::BinaryPropagation</code></a> using the inverted <code>in</code>, with no seed image, and
<code>edgeCondition</code> set to <code>"object"</code>. This finds the background connected to the edge, which is
the only background to be preserved.</p>
<p>The <code>connectivity</code> parameter defines the metric, that is, the shape of
the structuring element (see <a href="concepts.html#connectivity">Connectivity</a>).</p>
</div></section>
<section class="m-doc-details" id="dip-ConditionalThickening2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-ConditionalThickening2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL" class="m-doc-self">dip::<wbr />ConditionalThickening2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& c_in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& c_mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& endPixelCondition = S::LOSE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Thickens the image <code>in</code> conditioned on the mask (2D only).</p>
<p>A thickening is a dilation that preserves topology. If no <code>mask</code> is given (i.e. the image is raw),
it will produce an inverse skeleton of the background (given sufficient iterations).
If a <code>mask</code> is given, the dilation will not propagate outside of the set pixels in <code>mask</code>.</p>
<p>The dilation always uses the unit 4-connected neighborhood. That is, it iteratively propagates using
a connectivity of 1. The topology preserved is that of the 8-connected background. <code>iterations</code> iterations
are applied. If <code>iterations</code> is 0, the algorithm iterates until idempotency.</p>
<p><code>endPixelCondition</code> determines if background branches are kept. The string <code>"keep"</code> is equivalent to the
<code>"natural"</code> end pixel condition in <a href="binary.html#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanSkeleton</code></a>, and <code>"lose"</code> causes branches to not be kept
(meaning that only single background pixels and loops in background are kept).</p>
<p>The <code>edgeCondition</code> parameter specifies whether the border of the image should be treated as object (<code>"object"</code>)
or as background (<code>"background"</code>). Note that the algorithm doesn’t propagate into the pixels around the edge
of the image. The <code>edgeCondition</code> is used to modify the input image before the iterative process starts.</p>
</div></section>
<section class="m-doc-details" id="dip-ConditionalThinning2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-ConditionalThinning2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL" class="m-doc-self">dip::<wbr />ConditionalThinning2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& endPixelCondition = S::LOSE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Thins the image <code>in</code> conditioned on the mask (2D only).</p>
<p>A thinning is an erosion that preserves topology. If no <code>mask</code> is given (i.e. the image is raw),
it will produce a skeleton of the object (given sufficient iterations).
If a <code>mask</code> is given, the erosion will not propagate outside of the set pixels in <code>mask</code>.
Note that <a href="binary.html#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanSkeleton</code></a> produces a better skeleton.</p>
<p>The erosion always uses the unit 4-connected neighborhood. That is, it iteratively propagates using
a connectivity of 1. The topology preserved is that of the 8-connected foreground. <code>iterations</code> iterations
are applied. If <code>iterations</code> is 0, the algorithm iterates until idempotency.</p>
<p><code>endPixelCondition</code> determines if background branches are kept. The string <code>"keep"</code> is equivalent to the
<code>"natural"</code> end pixel condition in <a href="binary.html#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanSkeleton</code></a>, and <code>"lose"</code> causes branches to not be kept
(meaning that only single background pixels and loops in background are kept).</p>
<p>The <code>edgeCondition</code> parameter specifies whether the border of the image should be treated as object (<code>"object"</code>)
or as background (<code>"background"</code>). Note that the algorithm doesn’t propagate into the pixels around the edge
of the image. The <code>edgeCondition</code> is used to modify the input image before the iterative process starts.</p>
</div></section>
<section class="m-doc-details" id="dip-BinaryAreaOpening-Image-CL-Image-L-dip-uint--dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-BinaryAreaOpening-Image-CL-Image-L-dip-uint--dip-uint--String-CL" class="m-doc-self">dip::<wbr />BinaryAreaOpening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> filterSize,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Computes the area opening of a binary image</p>
<p>The area opening removes all connected components that have an area smaller than the given parameter <code>filterSize</code>,
and is equivalent to the supremum of openings with all possible connected structuring elements of that area.</p>
<p><code>connectivity</code> determines what a connected component is. See <a href="concepts.html#connectivity">Connectivity</a> for information on the
connectivity parameter.</p>
<p>The <code>edgeCondition</code> parameter specifies whether pixels past the border of the image should be
treated as object (by passing <code>"object"</code>) or as background (by passing <code>"background"</code>).</p>
<p>The operation is implemented through <a href="graphs.html#dip-Label-Graph-CL"><code>dip::Label</code></a>.</p>
<aside class="m-note m-default">
<h4>See also</h4>
<p><a href="morphology.html#dip-AreaOpening-Image-CL-Image-CL-Image-L-dip-uint--dip-uint--String-CL"><code>dip::AreaOpening</code></a>, <a href="morphology.html#dip-AreaClosing-Image-CL-Image-CL-Image-L-dip-uint--dip-uint-"><code>dip::AreaClosing</code></a></p>
</aside>
</div></section>
<section class="m-doc-details" id="dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL" class="m-doc-self">dip::<wbr />EuclideanSkeleton</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& endPixelCondition = S::NATURAL,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Accurate binary skeleton (2D and 3D only).</p>
<p>This algorithm computes quasi-Euclidean distances and tests Hilditch conditions to preserve topology. In 2D,
integer distances to neighbors are as follows:</p>
<table class="m-table">
<thead>
<tr>
<th>neighbors</th>
<th>distance</th>
</tr>
</thead>
<tbody>
<tr>
<td>4-connected</td>
<td>5</td>
</tr>
<tr>
<td>8-connected</td>
<td>7</td>
</tr>
<tr>
<td>knight’s move</td>
<td>11</td>
</tr>
</tbody>
</table>
<p>and in 3D as follows:</p>
<table class="m-table">
<thead>
<tr>
<th>neighbors</th>
<th>distance</th>
</tr>
</thead>
<tbody>
<tr>
<td>6-connected neighbors</td>
<td>4</td>
</tr>
<tr>
<td>18-connected neighbors</td>
<td>6</td>
</tr>
<tr>
<td>26-connected neighbors</td>
<td>7</td>
</tr>
<tr>
<td>knight’s move</td>
<td>9</td>
</tr>
<tr>
<td>(2,1,1) neighbors</td>
<td>10</td>
</tr>
<tr>
<td>(2,2,1) neighbors</td>
<td>12</td>
</tr>
</tbody>
</table>
<p>The <code>endPixelCondition</code> parameter determines what is considered an “end pixel” in the skeleton, and thus affects
how many branches are generated. It is one of the following strings:</p>
<ul>
<li><code>"loose ends away"</code>: Loose ends are eaten away (nothing is considered an end point).</li>
<li><code>"natural"</code>: “natural” end pixel condition of this algorithm.</li>
<li><code>"one neighbor"</code>: Keep endpoint if it has one neighbor.</li>
<li><code>"two neighbors"</code>: Keep endpoint if it has two neighbors.</li>
<li><code>"three neighbors"</code>: Keep endpoint if it has three neighbors.</li>
</ul>
<p>The <code>edgeCondition</code> parameter specifies whether the border of the image should be treated as object (<code>"object"</code>)
or as background (<code>"background"</code>).</p>
<aside class="m-note m-warning">
<h4>Warning</h4>
<p>Pixels in a 2-pixel border around the edge are not processed. If this is an issue, consider adding 2 pixels
on each side of your image.</p>
</aside>
<aside class="m-note m-danger">
<h4>Bug</h4>
<p>Results in 3D are not always correct: <code>"loose ends away"</code>, <code>"one neighbor"</code> and <code>"three neighbors"</code> produce the
same results, and sometimes planes in the skeleton are not thinned to a single pixel thickness.</p>
</aside>
<aside class="m-note m-default">
<h4>Literature</h4>
<ul>
<li>B.J.H. Verwer, “Improved metrics in image processing applied to the Hilditch skeleton”, 9<sup>th</sup> ICPR, 1988.</li>
</ul>
</aside>
</div></section>
<section class="m-doc-details" id="dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL" class="m-doc-self">dip::<wbr />CountNeighbors</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& mode = S::FOREGROUND,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Counts the number of set neighbors for each pixel in the binary image <code>in</code>.</p>
<p>Out will contain, for each set pixel, 1 + the number of neighbors that are also set. The neighborhood is
given by <code>connectivity</code>, see <a href="concepts.html#connectivity">Connectivity</a> for more information. If <code>mode</code> is set to <code>"all"</code>, the
count is computed for all pixels, not only the foreground ones. In this case, for the non-set pixels the
count is not increased by 1, and therefore yields simply the count of set pixels in the full neighborhood.</p>
<p><code>edgeCondition</code> determines the value of pixels outside the image domain, and can be <code>"object"</code> or <code>"background"</code>.</p>
<p>This function is typically used on the output of <a href="binary.html#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanSkeleton</code></a> to distinguish different types
of pixels.</p>
<aside class="m-note m-default">
<h4>See also</h4>
<p><a href="binary.html#dip-GetSinglePixels-Image-CL-Image-L-dip-uint--dip-String-CL"><code>dip::GetSinglePixels</code></a>, <a href="binary.html#dip-GetEndPixels-Image-CL-Image-L-dip-uint--dip-String-CL"><code>dip::GetEndPixels</code></a>, <a href="binary.html#dip-GetLinkPixels-Image-CL-Image-L-dip-uint--dip-String-CL"><code>dip::GetLinkPixels</code></a>, <a href="binary.html#dip-GetBranchPixels-Image-CL-Image-L-dip-uint--dip-String-CL"><code>dip::GetBranchPixels</code></a></p>
</aside>
</div></section>
<section class="m-doc-details" id="dip-MajorityVote-Image-CL-Image-L-dip-uint--dip-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-MajorityVote-Image-CL-Image-L-dip-uint--dip-String-CL" class="m-doc-self">dip::<wbr />MajorityVote</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& edgeCondition = S::BACKGROUND)</span></span>
</h3>
<p>Filters the binary image by setting each pixel to the phase with more pixels in the neighborhood.</p>
<p>The majority vote filter is the binary equivalent to the median filter. If in the neighborhood of a pixel there
are more foreground than background pixels, the pixel will be set to foreground. Otherwise it will be set to
background. The pixel itself is part of the neighborhood, and therefore the neighborhood always has an odd number
of pixels.</p>
<p>Note that this is equivalent to (but more efficient than):</p>
<div class="m-code"><pre><span></span><span class="n">dip</span><span class="o">::</span><span class="n">uint</span><span class="w"> </span><span class="n">neighborhoodSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">NeighborList</span><span class="p">(</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"connected"</span><span class="p">,</span><span class="w"> </span><span class="n">connectivity</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="n">in</span><span class="p">.</span><span class="n">Dimensionality</span><span class="p">()</span><span class="w"> </span><span class="p">).</span><span class="n">Size</span><span class="p">();</span>
<span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">CountNeighbors</span><span class="p">(</span><span class="w"> </span><span class="n">in</span><span class="p">,</span><span class="w"> </span><span class="n">connectivity</span><span class="p">,</span><span class="w"> </span><span class="s">"all"</span><span class="p">,</span><span class="w"> </span><span class="n">edgeCondition</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="o">></span><span class="w"> </span><span class="n">neighborhoodSize</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
</pre></div>
<p>with <code>neighborhoodSize</code> the number of pixels in the neighborhood given by <code>connectivity</code>.</p>
<p><code>edgeCondition</code> determines the value of pixels outside the image domain, and can be <code>"object"</code> or <code>"background"</code>.</p>
<aside class="m-note m-default">
<h4>See also</h4>
<p><a href="nonlinear.html#dip-MedianFilter-Image-CL-Image-L-Kernel-CL-StringArray-CL"><code>dip::MedianFilter</code></a>, <a href="binary.html#dip-CountNeighbors-Image-CL-Image-L-dip-uint--dip-String-CL-dip-String-CL"><code>dip::CountNeighbors</code></a></p>
</aside>
</div></section>
<section class="m-doc-details" id="dip-SupGenerating-Image-CL-Image-L-Interval-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-SupGenerating-Image-CL-Image-L-Interval-CL-String-CL" class="m-doc-self">dip::<wbr />SupGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Sup-generating operator, also known as hit-miss operator.</p>
<p>The sup-generating operator is a relaxed template matching, where <code>interval</code> is the template.
<code>interval</code> contains some pixels that must be foreground, and some that must be background, but
also allows “don’t care” pixels, which will be ignored in the matching.</p>
<p>This operator is equal to the infimum of an erosion and an anti-erosion:</p>
<div class="m-code"><pre><span></span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">Infimum</span><span class="p">(</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">Erosion</span><span class="p">(</span><span class="w"> </span><span class="n">in</span><span class="p">,</span><span class="w"> </span><span class="n">hit</span><span class="w"> </span><span class="p">),</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">Erosion</span><span class="p">(</span><span class="w"> </span><span class="o">~</span><span class="n">in</span><span class="p">,</span><span class="w"> </span><span class="n">miss</span><span class="w"> </span><span class="p">));</span>
</pre></div>
<p>where <code>hit</code> and <code>miss</code> are the two binary structuring elements in <code>interval</code>.</p>
<p>This function is specifically for binary images. Use <a href="morphology.html#dip-HitAndMiss-Image-CL-Image-L-StructuringElement-CL-StructuringElement-CL-String-CL-StringArray-CL"><code>dip::HitAndMiss</code></a> for a more general operator.</p>
</div></section>
<section class="m-doc-details" id="dip-InfGenerating-Image-CL-Image-L-Interval-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-InfGenerating-Image-CL-Image-L-Interval-CL-String-CL" class="m-doc-self">dip::<wbr />InfGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Inf-generating operator, the dual of the hit-miss operator.</p>
<p>This operator is equal to the supremum of a dilation and an anti-dilation:</p>
<div class="m-code"><pre><span></span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">Supremum</span><span class="p">(</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">Dilation</span><span class="p">(</span><span class="w"> </span><span class="n">in</span><span class="p">,</span><span class="w"> </span><span class="n">hit</span><span class="w"> </span><span class="p">),</span><span class="w"> </span><span class="n">dip</span><span class="o">::</span><span class="n">Dilation</span><span class="p">(</span><span class="w"> </span><span class="o">~</span><span class="n">in</span><span class="p">,</span><span class="w"> </span><span class="n">miss</span><span class="w"> </span><span class="p">));</span>
</pre></div>
<p>where <code>hit</code> and <code>miss</code> are the two binary structuring elements in <code>interval</code>.</p>
<p>This function is specifically for binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-UnionSupGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-UnionSupGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL" class="m-doc-self">dip::<wbr />UnionSupGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Union of sup-generating operators.</p>
<p>Applies the sup-generating operator with each of the intervals in <code>intervals</code>, and takes the union
of the results.</p>
<p>This function is specifically for binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-UnionSupGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-UnionSupGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL" class="m-doc-self">dip::<wbr />UnionSupGenerating2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Union of sup-generating operators.</p>
<p>Applies the sup-generating operator with all the rotated versions of <code>interval</code>, and takes the union
of the results. See <a href="dip-Interval.html#dip-Interval-GenerateRotatedVersions-dip-uint--String-CL-C"><code>dip::Interval::GenerateRotatedVersions</code></a> for the definition of <code>rotationAngle</code>
and <code>rotationDirection</code>.</p>
<p>This function is specifically for 2D binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-IntersectionInfGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-IntersectionInfGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL" class="m-doc-self">dip::<wbr />IntersectionInfGenerating</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Intersection of inf-generating operators.</p>
<p>Applies the inf-generating operator with each of the intervals in <code>intervals</code>, and takes the intersection
of the results.</p>
<p>This function is specifically for binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-IntersectionInfGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-IntersectionInfGenerating2D-Image-CL-Image-L-Interval-CL-dip-uint--String-CL-String-CL" class="m-doc-self">dip::<wbr />IntersectionInfGenerating2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Intersection of inf-generating operators.</p>
<p>Applies the inf-generating operator with all the rotated versions of <code>interval</code>, and takes the intersection
of the results. See <a href="dip-Interval.html#dip-Interval-GenerateRotatedVersions-dip-uint--String-CL-C"><code>dip::Interval::GenerateRotatedVersions</code></a> for the definition of <code>rotationAngle</code>
and <code>rotationDirection</code>.</p>
<p>This function is specifically for 2D binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-Thickening-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-Thickening-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL" class="m-doc-self">dip::<wbr />Thickening</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Applies the thickening operator, optionally constrained by a mask, to an image.</p>
<p>Thickening is defined as <code>in + SupGenerating(in)</code>. The constrained operation is defined as
<code>in + (SupGenerating(in) & mask)</code>.</p>
<p>The operation is applied with each of the intervals in <code>intervals</code>, and repeated <code>iterations</code>
times. If <code>iterations</code> is 0, the operation is repeated until convergence.</p>
<p>A thickening with the right set of intervals leads to a background skeleton, also called skiz.
See <a href="binary.html#dip-HomotopicThickeningInterval2D-dip-uint-"><code>dip::HomotopicThickeningInterval2D</code></a>.
The intervals returned by <a href="binary.html#dip-HomotopicInverseEndPixelInterval2D-dip-uint-"><code>dip::HomotopicInverseEndPixelInterval2D</code></a> prune the skiz to single
points and circles.</p>
<p>This function is specifically for binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-Thickening2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-Thickening2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL" class="m-doc-self">dip::<wbr />Thickening2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Applies the thickening operator, optionally constrained by a mask, to an image.</p>
<p>The operation is applied with with all the rotated versions of <code>interval</code>, and repeated <code>iterations</code>
times. See <a href="binary.html#dip-Thickening-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL"><code>dip::Thickening</code></a> for a description of the operation.
See <a href="dip-Interval.html#dip-Interval-GenerateRotatedVersions-dip-uint--String-CL-C"><code>dip::Interval::GenerateRotatedVersions</code></a> for the definition of <code>rotationAngle</code> and <code>rotationDirection</code>.</p>
<p>This function is specifically for 2D binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-Thinning-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-Thinning-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL" class="m-doc-self">dip::<wbr />Thinning</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a> const& intervals,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Applies the thinning operator, optionally constrained by a mask, to an image.</p>
<p>Thinning is defined as <code>in - SupGenerating(in)</code>. The constrained operation is defined as
<code>in - (SupGenerating(in) & mask)</code>.</p>
<p>The operation is applied with each of the intervals in <code>intervals</code>, and repeated <code>iterations</code>
times. If <code>iterations</code> is 0, the operation is repeated until convergence.</p>
<p>A thinning with the right set of intervals leads to a skeleton. See <a href="binary.html#dip-HomotopicThinningInterval2D-dip-uint-"><code>dip::HomotopicThinningInterval2D</code></a>.
The intervals returned by <a href="binary.html#dip-HomotopicEndPixelInterval2D-dip-uint-"><code>dip::HomotopicEndPixelInterval2D</code></a> prune the skeleton to single points and
circles.</p>
<p>This function is specifically for binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-Thinning2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL"><div>
<h3>
<span class="m-doc-wrap-bumper">void
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-Thinning2D-Image-CL-Image-CL-Image-L-Interval-CL-dip-uint--dip-uint--String-CL-String-CL" class="m-doc-self">dip::<wbr />Thinning2D</a>(</span><span class="m-doc-wrap"><a href="dip-Image.html" class="m-doc">dip::Image</a> const& in,
<a href="dip-Image.html" class="m-doc">dip::Image</a> const& mask,
<a href="dip-Image.html" class="m-doc">dip::Image</a>& out,
<a href="dip-Interval.html" class="m-doc">dip::Interval</a> const& interval,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> iterations = 0,
<a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> rotationAngle = 45,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& rotationDirection = S::INTERLEAVED_CLOCKWISE,
<a href="supporttypes.html#dip-String" class="m-doc">dip::String</a> const& boundaryCondition = S::ADD_ZEROS)</span></span>
</h3>
<p>Applies the thinning operator, optionally constrained by a mask, to an image.</p>
<p>The operation is applied with with all the rotated versions of <code>interval</code>, and repeated <code>iterations</code>
times. See <a href="binary.html#dip-Thinning-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL"><code>dip::Thinning</code></a> for a description of the operation.
See <a href="dip-Interval.html#dip-Interval-GenerateRotatedVersions-dip-uint--String-CL-C"><code>dip::Interval::GenerateRotatedVersions</code></a> for the definition of <code>rotationAngle</code> and <code>rotationDirection</code>.</p>
<p>This function is specifically for 2D binary images.</p>
</div></section>
<section class="m-doc-details" id="dip-HomotopicThinningInterval2D-dip-uint-"><div>
<h3>
<span class="m-doc-wrap-bumper"><a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a>
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-HomotopicThinningInterval2D-dip-uint-" class="m-doc-self">dip::<wbr />HomotopicThinningInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2)</span></span>
</h3>
<p>Returns a 2D interval array for homotopic thinning.</p>
<p>Use with <a href="binary.html#dip-Thinning-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL"><code>dip::Thinning</code></a> to shrink objects without changing the Euler number.
Note that <a href="binary.html#dip-ConditionalThinning2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL"><code>dip::ConditionalThinning2D</code></a> is more efficient, though the two functions do not produce exactly
the same output. To create a skeleton, use <a href="binary.html#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanSkeleton</code></a>.</p>
<p><code>connectivity</code> can be 1 to produce 4-connected skeletons, or 2 for 8-connected skeletons.</p>
</div></section>
<section class="m-doc-details" id="dip-HomotopicThickeningInterval2D-dip-uint-"><div>
<h3>
<span class="m-doc-wrap-bumper"><a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a>
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-HomotopicThickeningInterval2D-dip-uint-" class="m-doc-self">dip::<wbr />HomotopicThickeningInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2)</span></span>
</h3>
<p>Returns a 2D interval array for homotopic thickening.</p>
<p>Use with <a href="binary.html#dip-Thickening-Image-CL-Image-CL-Image-L-IntervalArray-CL-dip-uint--String-CL"><code>dip::Thickening</code></a> to grow objects without merging them.
This produces a background skeleton (also known as skiz).
Note that <a href="binary.html#dip-ConditionalThickening2D-Image-CL-Image-CL-Image-L-dip-uint--String-CL-String-CL"><code>dip::ConditionalThickening2D</code></a> is more efficient, though the two options do not produce exactly
the same output. To create a background skeleton, use <a href="binary.html#dip-EuclideanSkeleton-Image-CL-Image-L-String-CL-String-CL"><code>dip::EuclideanSkeleton</code></a> on the inverted image.</p>
<p><code>connectivity</code> can be 1 to produce 4-connected skeletons, or 2 for 8-connected skeletons.</p>
</div></section>
<section class="m-doc-details" id="dip-EndPixelInterval2D-dip-uint-"><div>
<h3>
<span class="m-doc-wrap-bumper"><a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a>
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-EndPixelInterval2D-dip-uint-" class="m-doc-self">dip::<wbr />EndPixelInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2)</span></span>
</h3>
<p>Returns an interval array for detecting end pixels. Includes isolated pixels.</p>
<p>Use with <a href="binary.html#dip-UnionSupGenerating-Image-CL-Image-L-IntervalArray-CL-String-CL"><code>dip::UnionSupGenerating</code></a> to detect skeleton end pixels. Note that <a href="binary.html#dip-GetEndPixels-Image-CL-Image-L-dip-uint--dip-String-CL"><code>dip::GetEndPixels</code></a>
is more efficient.</p>
<p><code>connectivity</code> can be 1 to work with 4-connected skeletons, or 2 for 8-connected skeletons.</p>
</div></section>
<section class="m-doc-details" id="dip-HomotopicEndPixelInterval2D-dip-uint-"><div>
<h3>
<span class="m-doc-wrap-bumper"><a href="dip-Interval.html#dip-IntervalArray" class="m-doc">dip::IntervalArray</a>
</span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#dip-HomotopicEndPixelInterval2D-dip-uint-" class="m-doc-self">dip::<wbr />HomotopicEndPixelInterval2D</a>(</span><span class="m-doc-wrap"><a href="supporttypes.html#dip-uint" class="m-doc">dip::uint</a> connectivity = 2)</span></span>
</h3>