Image-Py / sknw

build net work from skeleton image (2D-3D)
BSD 3-Clause "New" or "Revised" License
224 stars 48 forks source link

Does it matter if the skeleton is black or white? Skeletonize may expect white shapes and not black #20

Closed aegonwolf closed 1 year ago

aegonwolf commented 2 years ago

Hi, your sknw library works wonderfully, thanks. I've come across an oddity you might want to know about.

When I have a binary mask, say some lines indicated as white, it works, but when I invert as in your documentation it doesn't work anymore. It looks like the thinning is done on white pixel areas: https://scikit-image.org/docs/dev/auto_examples/edges/plot_skeleton.html

yxdragon commented 2 years ago

sknw treat 0 as background and other as foreground. but what does 'doesn't works' mean? raise an error? or give wrong result?