Image Processing in Python
Rebeca Gonzalez
Data Engineer
# Import the modules from skimage.segmentation import slic from skimage.color import label2rgb
# Obtain the segments segments = slic(image)
# Put segments on top of original image to compare segmented_image = label2rgb(segments, image, kind='avg')
show_image(image) show_image(segmented_image, "Segmented image")
# Import the modules from skimage.segmentation import slic from skimage.color import label2rgb
# Obtain the segmentation with 300 regions segments = slic(image, n_segments= 300) # Put segments on top of original image to compare segmented_image = label2rgb(segments, image, kind='avg')
show_image(segmented_image)
Image Processing in Python