Hi Yann! Thanks for this contribution. The core team is a bit busy/unavailable this summer but I'm looking forward to reviewing it once I'm home (though others may certainly chime in before then). Thanks again, Juan. On Wed, 28 Aug 2019 16:40:45 +0200, Yann GAVET wrote:
Hello again,
I submitted my pull request, with
- Crofton perimeter for 2D images
- Corrections for Euler number evaluation in 2D and 3D images
As stated in the PR and shown in this mailing list and in the github open issues, there is some interesting work to do on surface evaluation for 3D images. One could find interesting references in it.
I hope this interests some people and contribute to the improvement scikit-image.
best regards
yann gavet
Le 27/08/2019 à 11:25, Yann GAVET a écrit :
Hello all,
I found an error (not a bug) in Euler characteristic (denoted euler_number) given by regionprops. It probably comes from a wrong use of the filled_image. Moreover, there is no specification of the connectivity (neighbourhood 4 or 8), and this characteristic strongly depends on it. Matlab (bweuler function) gives different values for SAMPLE test (given in test_regionprops). To summarize, if your object is 4 connected, then the background is 8 connected.
But before doing this, I would propose a new perimeter estimation. As you may know, a discrete perimeter is only an estimation. The Crofton perimeter, based on Crofton formula), may be better than the classical way of evaluating the perimeter. Interestingly, Crofton perimeter (in 2 or 4 directions) as well as (another) perimeter can be computed at the same time as the Euler characteristic, in conjonction with the area. The algorithm is based on a convolution (to compute pixels configurations) and a histogram.
I have a proposition to submit, based on minkowski functionals and working on 2D (binary) images, I will soon create a pull request, with the following modifications/additions:
- correction in Euler number. It will not use the filled image anymore. As a consequence, it will be working on 2D images only. I do not have a working function for 3D images yet.
- new crofton perimeter evaluation
What do you think of this? What is your suggestion about the common code shared by these two functions, how should I handle it ?
I did not find any directory for the measure submodule in doc/examples/. Should/could I create one to illustrate the perimeters evaluation ?
thank you
best regards
yann
-- Yann GAVET - Assistant Professor LGF CNRS 5307 - Ecole Nationale Supérieure des Mines de Saint-Etienne 158 Cours Fauriel, CS 62362, 42023 SAINT-ETIENNE cedex 2 Tel: (33) - 4 7742 0170 _______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org