Trace region boundaries in binary image

traces
the exterior boundaries of objects, as well as boundaries of holes
inside these objects, in the binary image `B`

= bwboundaries(`BW`

)`BW`

. `bwboundaries`

also
descends into the outermost objects (parents) and traces their children
(objects completely enclosed by the parents). Returns `B`

,
a cell array of boundary pixel locations.

The `bwboundaries`

function implements the
Moore-Neighbor tracing algorithm modified by Jacob's stopping criteria.
This function is based on the `boundaries`

function
presented in the first edition of *Digital Image Processing
Using MATLAB*, by Gonzalez, R. C., R. E. Woods, and S.
L. Eddins, New Jersey, Pearson Prentice Hall, 2004.

[1] Gonzalez, R. C., R. E. Woods, and S. L. Eddins, *Digital
Image Processing Using MATLAB*, New Jersey, Pearson Prentice
Hall, 2004.