Image Processing Toolbox User's Guide |
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.
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.
conndef(3,'minimal') ans(:,:,1) = 0 0 0 0 1 0 0 0 0 ans(:,:,2) = 0 1 0 1 1 1 0 1 0 ans(:,:,3) = 0 0 0 0 1 0 0 0 0
The maximal connectivity array for two dimensions includes all the neighbors touching the central element in any way.
colorbar | conv2 |
© 1994-2005 The MathWorks, Inc.