Function Reference
— Function File: b = bwborder (im)

Finds the borders of foreground objects in a binary image.

b is the borders in the 0-1 matrix im. 4-neighborhood is considered.

A pixel is on the border if it is set in im, and it has at least one neighbor that is not set.