Image Processing Toolbox    

Column Processing

The toolbox provides functions that you can use to process sliding neighborhoods or distinct blocks as columns. This approach is useful for operations that MATLAB performs columnwise; in many cases, column processing can reduce the execution time required to process an image.

For example, suppose the operation you are performing involves computing the mean of each block. This computation is much faster if you first rearrange the blocks into columns, because you can compute the mean of every column with a single call to the mean function, rather than calling mean for each block individually.

You can use the colfilt function to implement column processing. This function:

  1. Reshapes each sliding or distinct block of an image matrix into a column in a temporary matrix
  2. Passes the temporary matrix to a function you specify
  3. Rearranges the resulting matrix back into the original shape

  Overlap Sliding Neighborhoods