Suggested workflow to smooth/sharpen edges/lines
First of all, thanks for putting together ImageMagick, never used it until now and didn't realise the just how good and powerful it is. Reminds me of Perl (thats a huge compliment) with the power and community.
I've been experimenting with it for a week now and I think I've only just scratched the service but done a remarkable amount of work with it, but feel I'm using about 1% of the capability.
I want to use ImageMagick to refine (I'm choosing my words carefully as I'm not sure if I want to smooth or sharpen or something else) the edge I've detected in an image. So far I can process the image, cut the background out and generate an edge (or line) with no issues. However I want to turn the detected jagged edge from a bitmap into a smooth edge. It doesn't really matter if it's a smooth bitmap or a smooth line.
As an example here's a picture on Dropbox (or I hope it is) that I've processed.
https://www.dropbox.com/s/6b7fq781bjr9p ... 6.png?dl=0
The edge of the wrench, where it's white into black, is quite jagged. I'd like to smooth it out so it's neat. I've looked at sharpening and blurring and then doing a further Canny edge detection but nothing seems to work e.g.
https://www.dropbox.com/s/ox5fss6wpz4l5 ... 1.png?dl=0
https://www.dropbox.com/s/k2jekq49pdxd0 ... 1.png?dl=0
I think part of my problem is that the terminology isn't clear to me, am I smoothing it (which I think is actually something like Gaussian Blur) or am I sharpening it?
I've also tried to vectorise it using potrace to see if that helps, but it didn't.
https://www.dropbox.com/s/m4apy5okkf38q ... 1.svg?dl=0
Though I felt that it did smooth it out, but I had so many broken lines I needed to fix a different problem
I even downloaded the libpng library and got that working to see if I could write it in C. I at least got it working but after I thought about it, I realised I was simply duplicating (very badly) other peoples work and so discarded that idea for the moment,
Just to be clear, I'm not not looking for somebody to write the script but it would be helpful to have some pointers as the direction to go:
e.g. apply a gaussian blur, negate it, apply a canny edge detection twice, stroke rabbit foot three times and then hop on left foot under a full moon would be helpful.