mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-12 12:30:16 +08:00
Bug fix: add z dimension regardless of multichannel
This commit is contained in:
@@ -93,7 +93,7 @@ def slic(image, n_segments=100, ratio=10., max_iter=10, sigma=1,
|
||||
image = img_as_float(image)
|
||||
if not multichannel:
|
||||
image = gray2rgb(image)
|
||||
elif image.ndim == 3:
|
||||
if image.ndim == 3:
|
||||
# See 2D RGB image as 3D RGB image with Z = 1
|
||||
image = image[np.newaxis, ...]
|
||||
if not isinstance(sigma, coll.Iterable):
|
||||
|
||||
Reference in New Issue
Block a user