Main Content
Neighborhood or Block Processing: An Overview
Certain image processing operations involve processing an image in sections, called blocks or neighborhoods, rather than processing the entire image at once. Several functions in the toolbox, such as linear filtering and morphological functions, use this approach.
The toolbox includes several functions that you can use to implement image processing algorithms as a block or neighborhood operation. These functions break the input image into blocks or neighborhoods, call the specified function to process each block or neighborhood, and then reassemble the results into an output image. The following table summarizes these functions.
Function | Description |
---|---|
nlfilter | Implements sliding neighborhood operations that you can use to process an input image in a pixel-wise fashion. For each pixel in the input image, the function performs the operation you specify on a block of neighboring pixels to determine the value of the corresponding pixel in the output image. For more information, see Sliding Neighborhood Operations |
blockproc | Implements distinct block operations that you can use to process an input image a block at a time. The function divides the image into rectangular blocks, and performs the operation you specify on each individual block to determine the values of the pixels in the corresponding block of the output image. For more information, see Distinct Block Processing |
colfilt | Implements column-wise processing operations which provide a way of speeding up neighborhood or block operations by rearranging blocks into matrix columns. For more information, see Use Column-wise Processing to Speed Up Sliding Neighborhood or Distinct Block Operations. |