Non connecting morphological filter

前端 未结 2 458
故里飘歌
故里飘歌 2021-02-11 00:10

After some simple preprocessing I am receiving boolean mask of segmented images.

I want to \"enhance\" borders of the mask and make them more smooth. For that

2条回答
  •  执念已碎
    2021-02-11 00:51

    Not 100% sure what you are trying to achieve, but this may be an avenue to explore... the tool potrace takes images and converts them to vectorised images which involves smoothing. It prefers PGM format input files so I use ImageMagick to prepare them. Anyway, here is an example of the command and the result so see what you think:

    convert disks.png pgm:- | potrace - -s -o out.svg
    

    I have converted the resulting SVG file to a PNG so I can upload it to SO.

提交回复
热议问题