I am trying to transform an image to line drawing, exactly like on this website (default settings):
https://tech-lagoon.com/imagechef/en/image-to-edge.html
I am using Image Magick to try to achieve the exact same results, but currently fail to do so. I have tried using canny edge filter or -edge 1 but the results are not as expected. The closest thing I have manage to achieve to the above website is the following command:
magick input.png -colorspace Gray -morphology EdgeOut Octagon -negate out.bmp
Here is the image I am trying to obtain: (just black lines on a white background, and thick black lines, without "double outline" like you see in my obtained image, in the collar of the dog. I just want one line)
Here is what I get when I run the Image Magick command from above:
Any suggestions to get the desired result? It would be even better if I could obtain the same image as the one from tech-lagoon but also remove all lines that are not black (for example the wall different color line, that is very thin)
EDIT 1: Trying various morphology got me a good result, but I still need some help. I need to "denoise" and remove scattered black dots.
The command that works is
-colorspace Gray -morphology EdgeOut Diamond:3 -negate -threshold 90%% -define morphology:compose=Lighten -morphology Convolve "Blur:0x1>"
I would like to "clean" it up a bit, because the lines are not perfect everywhere. Any ideas for denoising a bit and improving the black lines so they are more smooth?