mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-17 11:26:12 +08:00
Rename km_segmentation to slic. They have a PAMI paper now so I guess we should use their name.
This commit is contained in:
@@ -6,12 +6,12 @@ import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
from skimage.data import lena
|
||||
from skimage.segmentation import km_segmentation, visualize_boundaries
|
||||
from skimage.segmentation import slic, visualize_boundaries
|
||||
from skimage.util import img_as_float
|
||||
from skimage.color import rgb2lab
|
||||
|
||||
img = img_as_float(lena()).copy("C")
|
||||
segments = km_segmentation(rgb2lab(img), ratio=10.0, n_segments=1000)
|
||||
segments = slic(rgb2lab(img), ratio=10.0, n_segments=1000)
|
||||
|
||||
print("number of segments: %d" % len(np.unique(segments)))
|
||||
|
||||
Reference in New Issue
Block a user