Image Processing Toolbox | Search Help Desk |

col2im | See Also |

Rearrange matrix columns into blocks

Syntax

`A = col2im(B,[m n],[mm nn],``block_type`

)
A = col2im(B,[m n],[mm nn])

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 `A`

ij 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 of class `double`

or of any integer class. `A`

is of the same class as `B`

.
See Also

`blkproc`

, `colfilt`

, `im2col`

, `nlfilter`