I need a binary image in which the edges of every labeled region are set to 1. I've found the `find_boundaries` function in the skimage.segmentation module, but its outcome didn't fit my requirement.
Currently, I'm using the following algorithm to solve my question.
``` bound = np.zeros(data.shape) labels = data.max() for label in labels: label_data = data==label bound += label_data - scipy.ndimage.binary_erosion(label_data) ```
It seemed work, but I'm not sure its correctness and is there a more efficient method?
On Thu, Mar 28, 2013 at 12:00 AM, Stéfan van der Walt email@example.com:
On Wed, Mar 27, 2013 at 5:07 AM, Zetian Yang firstname.lastname@example.org wrote:
I have been trying the watershed algorithm in the skimage package and it
really fantastic. Recently I have a problem where the edge of one
image is need. Is there a convenient way to extract edges of the
I'm glad you find the package useful! Do you need the edges as coordinates, or do you need a bitmap of the edges? We have marching squares for contour finding, edge detection, etc.
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com. For more options, visit https://groups.google.com/groups/opt_out.