I have a set of black and white images as shown below like Figure 1 and I want to have them with much smaller lines like Figure 2, even though no lines are missing as much as possible. I also tried morphological methods and algorithms like Canny with Python, but I did not get the result I wanted.
CodePudding user response:
I think you are looking for skeletonization, see skimage.skeletonize
, example