Is it possible to remove skeletal small branches in opencv or scikit image?

Is it possible to remove small branches during the skeleton procedure?

Like in this picture: http://felix.abecassis.me/wp-content/uploads/2011/09/skel_opencv.png

Only the letter O is perfect, but not all other letters.

Is this a method during the procedure or after removing these small branches? I am using python opencv, but the solution also with pymorph or scikit-image is a good one. Here is the code I used for skeletonization: Code

Original Image: http://felix.abecassis.me/wp-content/uploads/2011/09/opencv.png

+4
source share
1 answer

Here is the result of scikit-image :

from skimage import io from skimage import morphology image = io.imread('opencv.png') out = morphology.skeletonize(image > 0) 

skimage-skeleton

+3
source

All Articles