Image Processing Toolbox | ![]() ![]() |
Perimeter Determination
The bwperim
function determines the perimeter pixels of the objects in a binary image. You can use either a 4- or 8-connected neighborhood for perimeter determination. A pixel is considered a perimeter pixel if it satisfies both of these criteria:
on
pixel.off
.This example finds the perimeter pixels in the circuit image.
BW1 = imread('circbw.tif'); BW2 = bwperim(BW1); imshow(BW1) figure, imshow(BW2)
Figure 9-6: Circbw.tif Before and After Perimeter Determination
![]() | 4- and 8-Connected Neighborhoods | Flood Fill | ![]() |