April 2020
Intermediate to advanced
438 pages
12h 2m
English
Let's import all of the packages, modules, and functions required to demonstrate morphological segmentation with the watershed algorithm:
from scipy import ndimage as ndifrom skimage.morphology import watershed, binary_dilation, binary_erosion, remove_small_objectsfrom skimage.morphology import disk, squarefrom scipy.ndimage import distance_transform_edtfrom skimage.measure import label, regionpropsfrom skimage.segmentation import clear_borderfrom skimage.filters import rank, threshold_otsufrom skimage.feature import peak_local_max, blob_logfrom skimage.util import img_as_ubytefrom skimage.io import imreadfrom skimage.color import rgb2grayimport numpy as npimport matplotlib.pyplot as plt
Read now
Unlock full access