Most recent attempt at extracting boundaries.  Determined it is necessary to use a 5x5 matrix to extract acceptable boundary segments.