[Numpy-discussion] Re: Shape detection

2022-01-24 Thread Fabrice Silva
Le samedi 22 janvier 2022, pawel.dar...@gmail.com a écrit : > Hello, > > I am not sure that this is correct group for my problem but I hope > someone can help me :) > > I try to analyze picture with porous material > (https://python.neocast.eu/disc.png). I calculate a total quantity of > each por

[Numpy-discussion] Re: Shape detection

2022-01-23 Thread Stefan van der Walt
Hi Pawel, I would recommend scikit-image for these types of analysis. Here's a start: --- from skimage import io, measure import numpy as np image = io.imread('disc.png') thresholded = image > 10 labels = measure.label(image) regions = measure.regionprops(labels) regions_small = [r for r in reg