Home > Net >  How to reduce the width of lines in black and white images and make them thinner and smoother
How to reduce the width of lines in black and white images and make them thinner and smoother

Time:03-09

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.

enter image description here Figure 1

enter image description here Figure 2

CodePudding user response:

I think you are looking for skeletonization, see skimage.skeletonize, example enter image description here

  • Related