Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from skimage import segmentation
- from skimage.measure import regionprops
- #a segmented image
- labels = segmentation.slic(img1, compactness=10, n_segments=200)
- propimage = labels
- #props loop
- for region in regionprops(labels1, properties ='eccentricity') :
- eccentricity = region.eccentricity
- propimage[propimage==region] = eccentricity
- for i in range(0,max(labels)):
- prop = regions[i].eccentricity #the way to cal a single prop
- propimage[i]= prop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement