0
I’m trying to make a digital recognition program in python, in the skeletonization part, the image gets lines, as below:
The original image is this:
My code:
import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt
from skimage.morphology import skeletonize as skelt
from skimage.morphology import thin
from skimage import morphology, filters
#pega a imagem
img = cv.imread('impressoes/01.jpg', 16)
#binariza a imagem
binary = img > filters.threshold_otsu(img)
thin = thin(binary)
#faz a skeletonization
skeleton = skelt(binary)
plt.imshow(skeleton, 'gray')
plt.show()
How I remove those lines that were created?