Image Processing Toolbox | ![]() ![]() |
Padding Borders
As Figure 6-1 shows, some of the pixels in a neighborhood may be missing, especially if the center pixel is on the border of the image. Notice that in the figure, the upper left and bottom right neighborhoods include "pixels" that are not part of the image.
To process these neighborhoods, sliding neighborhood operations pad the borders of the image, usually with 0's. In other words, these functions process the border pixels by assuming that the image is surrounded by additional rows and columns of 0's. These rows and columns do not become part of the output image and are used only as parts of the neighborhoods of the actual pixels in the image.
![]() | Sliding Neighborhood Operations | Linear and Nonlinear Filtering | ![]() |