Contenuto principale

Block Processing: An Overview

R2026b

Certain image processing operations divide an image into sections, called blocks, process each block independently, and then reassemble the results into an output image. Block processing is useful when processing the entire image at once is impractical or inefficient. By operating on smaller blocks, you can process images that exceed available memory, work with large volumes or multidimensional datasets, and parallelize computations.

The Image Processing Toolbox™ provides several approaches for block processing. These approaches differ in the types of images they support and the operations they perform.

Use When You Need to ProcessApproachRepresentative Example
  • Images, volumes, or multidimensional images that are too large to fit into memory.

  • Images in nonstandard image formats.

  • Multiresolution (also known as multilevel or pyramidal) images.

  • Volumes or multidimensional images with 3-D or higher-dimensional blocks.

  • Collections of blocked images.

Use the blockedImage workflow to process images as discrete blocks, This workflow supports large images, multiresolution images, multidimensional data, images in nonstandard formats, and collections of images. Use apply to process blocked images and blockedImageDatastore to process collections of blocked images.

  • Images that fit in memory and do not require the additional capabilities of the blockedImage workflow.

Use the blockproc function to process an in-memory image one block at a time. This function divides an image into nonoverlapping rectangular blocks and applies a specified operation to each block independently. The blockproc function is particularly useful for performing image compression using the Discrete Cosine Transform.

  • 2-D grayscale, binary, and indexed images that fit in memory and use column-wise operations.

Use the colfilt function to process all image blocks of an in-memory image simultaneously using a column-wise approach. This function rearranges image blocks into matrix columns and applies operations that act independently on each column, such as median, std, and sum.

See Also

| | | | |

Topics