Search code examples
pythonimage-processingscikit-image

How to directly access region properties from regionprops in skimage without a loop?


Once I run a command like region = regionprops(a), I have to run a for loop to access properties of each region like :

for i in range(0,len(region)):
    if region[i].area>x and region[i].major_axis_length > y:

Is it possible to access these properties directly without the for loop? For instance, var=region.area would create var containing area of all the regions?


Solution

  • This is now implemented in skimage.measure.regionprops_table.