The border-detection operation is done via the mathematical
morphology operation
connectivity = 6When ``connectivity = 6'', all ``1'' points in the input volume that are 6-connected to a ``0'' (points in the background) are singled out as border points. A similar interpretation applies to the case ``connectivity = 26''.