I have a black-white image, but it is rather blurry so I was thinking of converting it into vector graphics so I could do some coloring. This is the image:
img = Import["https://i.sstatic.net/cyHjC.jpg"];
I used Binarize
with ImageGraphics
, but the result is not so good:
img2 = Binarize[ImageApply[If[Mean@# < 0.9, #, {1, 1, 1}] &, img], 0.8]
ImageGraphics[Erosion[img2, 1], 2, Method -> {"LinearSeparable", 10}]
As you can see, the lines are pretty rough with weird curves here and there.
ImageGraphics
tends to deal with much more complicated stuff, so I thought maybe it is possible to optimize this with the knowledge that this is a black and white image with only the lines required. But how?