Hi Yann,

Thanks for writing. You're absolutely right, though it took me a second to get my head around it from reading the source: the neighbourhood is the neighbourhood of the *objects*, not of the contours. (And anyway we've settled on American spelling in the library since that docstring was written!) In addition, we've also adopted the terminology of connectivity (1-, 2-, 3-, ..., ndim-), which generalises better to higher dimensions, so this should probably be updated in this function also.

Would you mind writing an issue about this in our issue tracker?
https://github.com/scikit-image/scikit-image/issues

Thanks!

Juan.

On Fri, Nov 16, 2018, at 3:24 AM, Yann GAVET wrote:

I played around with the perimeter from skimage.measure.

In the documentation, the neighborhood is described as:

"neighbourhood : 4 or 8, optional
Neighborhood connectivity for border pixel determination."


There is an imprecision because this is different from the connectivity of the resulting contour. If N4 is chosen, then the contour is 8-connected, and conversely. The documentation could have this precision.


yann


-- 
Yann GAVET
Assistant Professor - 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