code: def boundary_map(self):
          
          # compute contours
          contours = self.find_contours()
  
          # fill in nonzero pixels
          new_data = np.zeros(self.data.shape)
          for contour in contours:
              new_data[contour.boundary_pixels[:, 0].astype(np.uint8),
                       contour.boundary_pixels[:, 1].astype(np.uint8)] = np.iinfo(np.uint8).max
          return BinaryImage(new_data.astype(np.uint8), frame=self.frame)
docs: Computes the boundary pixels in the image and sets them to nonzero values.
  
          Returns
          -------
          :obj:`BinaryImage`
              binary image with nonzeros on the boundary of the original image