Loadable Function: conndef (conn)
Loadable Function: conndef (mask)
Loadable Function: conndef (ndims, type)

Create connectivity array.

Creates a matrix of for morphological operations, where elements with a value of 1 are considered connected to the center element (a connectivity array).

It can be specified by the number of dimensions, ndims, and type which must be one of the following strings:

"minimal"

Neighbours touch the central element on a (ndims-1)-dimensional surface.

"maximal"

Neighbours touch the central element in any way. Equivalent to ones (repmat (3, 1, ndims)).

the number of connected elements to the center element, conn, in which case the following are valid:

4

Two-dimensional 4-connected neighborhood.

8

Two-dimensional 8-connected neighborhood.

6

Three-dimensional 6-connected neighborhood.

18

Three-dimensional 18-connected neighborhood.

26

Three-dimensional 26-connected neighborhood.

or a connectivity array itself, in which case it checks for its validity and returns itself. In such case, it is equivalent to iptcheckconn.

See also: iptcheckconn, strel.

Package: image