I have the following image, which represents a path.
I want to apply an algorithm called HoughLines(P) on it. This algorithm should detect lines and coordinates. But first I need to make the path thinner for it to be valid input for houghlinesp.
The output that I want is this:
I tried 'thinning' and 'skeletonizing' algorithms from python's scikit learn library. I will show the results below, but in the bottom of the images the output is not what I expected. I see that lee's skeletonize method produces a result that comes most close to my desired output, but its not good enough yet. Are there different variations of skeletonizing, thinning or any other algorithms that can produce the output that I want?
from skimage.morphology import skeletonize, thin
thinned = thin(thresholded)
skeleton = skeletonize(thresholded)
skeleton_lee = skeletonize(thresholded, method='lee')