邻域和数据块处理
某些图像处理运算需要分段处理图像,而不是一次处理整个图像。滑动邻域运算通过对每个像素邻域应用算法,以一次一个像素的方式处理图像。在另一种数据块处理中,图像被分成大小相等且不重叠的数据块,并对每个不同数据块应用算法。然后,对邻域和数据块进行重组以形成输出图像。
函数
blockproc | 图像的非重复块处理 |
bestblk | Determine optimal block size for block processing |
nlfilter | General sliding-neighborhood operations |
col2im | Rearrange matrix columns into blocks |
colfilt | Column-wise neighborhood operations |
im2col | Rearrange image blocks into columns |
blockedImage | Big or multiresolution image made from discrete blocks (自 R2021a 起) |
apply | Process blocks of blocked image (自 R2021a 起) |
主题
- Neighborhood or Block Processing: An Overview
Divide an image into sections, called blocks or neighborhoods, to reduce the memory needed to process the image.
- Sliding Neighborhood Operations
A sliding neighborhood operation is performed one pixel at a time using information about the pixel’s neighborhood.
- Distinct Block Processing
Distinct block processing divides an image into nonoverlapping rectangular sections that can be processed individually.
- Block Size and Performance
Using larger block sizes reduces overall computation time but requires more memory to process each block.
- Use Column-wise Processing to Speed Up Sliding Neighborhood or Distinct Block Operations
Reshape sliding neighborhoods and distinct blocks to reduce the execution time of processing an image.
- Perform Block Processing on Image Files in Unsupported Formats
To work with image data in file formats not supported by block processing functions, construct a class that manages files based on region.
- Parallel Block Processing on Large Image Files
If you have a Parallel Computing Toolbox™ license, you can take advantage of multiple processor cores on your machine to improve the performance of
blockproc
.