Image Processing Toolbox    

Neighborhood and Block Operations


Overview

Certain image processing operations involve processing an image in sections called blocks, rather than processing the entire image at once.

The Image Processing Toolbox provides several functions for specific operations that work with blocks, for example, the dilate function for binary image dilation. In addition, the toolbox provides more generic functions for processing an image in blocks. This chapter discusses these generic block processing functions.

To use one of the functions described in this chapter, you supply information about the size of the blocks, and specify a separate function to use to process the blocks. The block processing function does the work of breaking the input image into blocks, calling the specified function for each block, and reassembling the results into an output image.

Words You Need to Know

An understanding of the following terms will help you to use this chapter. For more explanation of this table and others like it, see Words You Need to Know in the Preface.

Words
Definitions
Block operation
An operation in which an image is processed in blocks rather than all at once. The blocks have the same size across the image. Some operation is applied to one block at a time. The blocks are reassembled to form an output image.
Border padding
Additional rows and columns temporarily added to the border(s) of an image when some of the blocks extend outside the image. The additional rows and columns normally contain zeros.
Center pixel
The pixel at the center of a neighborhood.
Column processing
An operation in which neighborhoods are reshaped into columns before processing in order to speed up computation time.
Distinct block operation
A block operation in which the blocks do not overlap.
Inline function
A user-defined function created using the MATLAB function inline. Toolbox functions whose syntax includes a parameter called FUN can take an inline function as an argument.
Neighborhood operation
An operation in which each output pixel is computed from a set of neighboring input pixels. Convolution, dilation, and median filtering are examples of neighborhood operations. A neighborhood operation can also be called a sliding neighborhood operation.
Overlap
Extra rows and columns of pixels outside a block whose values are taken into account when processing the block. These extra pixels cause distinct blocks to overlap one another. The blkproc function enables you to specify an overlap.


 Image Cropping Types of Block Processing Operations