Image Processing Toolbox User's Guide |
Rearrange matrix columns into blocks
Syntax
Description
col2im
rearranges matrix columns into blocks. block_type
is a string with one of these values:
A = col2im(B,[m n],[mm nn],'distinct')
rearranges each column of B
into a distinct m
-by-n
block to create the matrix A
of size mm
-by-nn
. If B = [A11(:) A12(:) A21(:) A22(:)]
, where each column has length m*n
,
then A = [A11 A12;A21 A22]
where each Aij
is m
-by-n
.
A = col2im(B,[m n],[mm nn],'sliding')
rearranges the row vector B
into a matrix of size (mm-m+1)
-by-(nn-n+1)
. B
must be a vector of size
1-by-(mm-m+1)*(nn-n+1)
. B
is usually the result of processing the output of im2col(...,'sliding')
using a column compression function (such as sum
).
A = col2im(B,[m n],[mm nn])
uses the default block_type
of 'sliding'
.
Class Support
B
can be logical or numeric. The return value A
is of the same class as B
.
See Also
blkproc
, colfilt
, im2col
, nlfilter
cmunique | colfilt |
© 1994-2005 The MathWorks, Inc.