Potrace the harsh edges

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Locked
andrew31
Posts: 5
Joined: 2019-09-12T00:15:10-07:00
Authentication code: 1152

Potrace the harsh edges

Post by andrew31 »

Hi guys...

I'm running this script on my images but I'm not happy with the white edges on the images...wondering if I can use potrace to smooth the edges...thank you .

Code: Select all

convert test.jpg -bordercolor white -border 1x1 -fuzz 5% -fill none -floodfill +0+0 white -shave 1x1 test_edited.png
Image

Image

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Potrace the harsh edges

Post by fmw42 »

You do not need pot race. You can do that with some blur style antialiasing of the alpha channel. Try

Code: Select all

convert test.jpg -bordercolor white -border 1x1 -fuzz 5% -fill none -floodfill +0+0 white -shave 1x1 -channel a -blur 0x1 -level 50x100% +channel -background pink -flatten test_edited.png
If that looks OK. then remove the -background pink -flatten to have a transparent background.

Locked