April 2020
Intermediate to advanced
438 pages
12h 2m
English
Perform the following steps to use the skimage.morphology module's watershed again, this time for blob detection:
def segment_with_watershed(im, cell_thresh, bg_thresh): if np.max(im) != 1.0: im = (im - im.min()) / (im.max() - im.min()) im_mask = im < cell_thresh
basins = np.zeros_like(im) basins[im < cell_thresh] = 2 basins[im > bg_thresh] = 1
flood_seg = watershed(im , basins)flood_seg = flood_seg > 1.0
selem = square(3) flood_erode = binary_erosion(flood_seg, ...
Read now
Unlock full access