mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-05 02:29:58 +08:00
Fix data type issue in python 3
This commit is contained in:
@@ -479,15 +479,16 @@ def regionprops(label_image, properties=None,
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from skimage.data import coins
|
||||
>>> from skimage import data, util
|
||||
>>> from skimage.morphology import label
|
||||
>>> img = coins() > 110
|
||||
>>> img = util.img_as_ubyte(data.coins()) > 110
|
||||
>>> label_img = label(img)
|
||||
>>> props = regionprops(label_img)
|
||||
>>> props[0].centroid # centroid of first labelled object
|
||||
(22.729879860483141, 81.912285234465827)
|
||||
>>> props[0]['centroid'] # centroid of first labelled object
|
||||
(22.729879860483141, 81.912285234465827)
|
||||
|
||||
"""
|
||||
|
||||
label_image = np.squeeze(label_image)
|
||||
|
||||
Reference in New Issue
Block a user