How to do skeletonization for this image [closed]
Hey guys, im trying to do skeletonization for this image using python 3.6.3 opencv.
I'm hoping to use Guo-hall or Zhang-Suen thinning algorithms to skeletonize this image. Please advice me for python(3.6.3) opencv.
Which version of opencv? And do you have the contrib modules installed?
@Tetragramm hey im using opencv 3.3.1 , No im very new to using python.. I only have numpy and opencv2 installed.
Very simple!
from skimage.morphology import skeletonize
But please pay attention to this, the input parameter should be either 0 or 1, so you should do it like this:
ske = (skeletonize(thr_img//255) * 255).astype(np.uint8)
@moHe thank you! i finally got it to work! You save me from many headaches!!!