Image Processing Toolbox User's Guide Previous page   Next Page
conndef

Create connectivity array

Syntax

Description

CONN = conndef(NUM_DIMS,TYPE) returns the connectivity array defined by TYPE for NUM_DIMS dimensions. TYPE can have either of the values listed in this table.

Value
Description
'minimal'
Defines a neighborhood whose neighbors are touching the central element on an (N-1)-dimensional surface, for the N-dimensional case.
'maximal'
Defines a neighborhood including neighbors that touch the central element in any way; it is ones(repmat(3,1,NUM_DIMS)).

Several Image Processing Toolbox functions use conndef to create the default connectivity input argument.

Examples

The minimal connectivity array for two dimensions includes the neighbors touching the central element along a line.

The minimal connectivity array for three dimensions includes all the neighbors touching the central element along a face.

The maximal connectivity array for two dimensions includes all the neighbors touching the central element in any way.


Previous page  colorbar conv2 Next page

© 1994-2005 The MathWorks, Inc.