Regionprops in skimage does not return intensity_mean and returns an error. A minimal example is here:
from skimage import data, util
from skimage.measure import label, regionprops
img = util.img_as_ubyte(data.coins()) > 110
label_img = label(img, connectivity=img.ndim)
regions = regionprops(label_img)
for region in regions:
print(region.area)
So the above example works, but the example below doesn't work:
from skimage import data, util
from skimage.measure import label, regionprops
img = util.img_as_ubyte(data.coins()) > 110
label_img = label(img, connectivity=img.ndim)
regions = regionprops(label_img)
for region in regions:
print(region.intensity_mean)
Honestly, I don't know what to try!
source https://stackoverflow.com/questions/76118536/regionprops-in-skimage-does-not-return-intensity-mean
Comments
Post a Comment