mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-04 17:57:01 +08:00
ENH: make quickshift more tolerant to input type, just convert to float. Also keep track of random seed for reproducable tests.
Finally, do a unique on the output and add testing.
This commit is contained in:
@@ -31,7 +31,6 @@ from skimage.util import img_as_float
|
||||
|
||||
img = img_as_float(lena())[::2, ::2, :].copy("C")
|
||||
segments = quickshift(img, sigma=5, tau=20)
|
||||
segments = np.unique(segments, return_inverse=True)[1].reshape(img.shape[:2])
|
||||
|
||||
print("number of segments: %d" % len(np.unique(segments)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user