3

I'm trying to thicken lines with imagemagick. There is a description about how to do this here, but when I do it on my sample images they just stay the same or get rather weaker.

Examples given from imagemagick (that do not make lines thicker when I try):

convert man.gif -morphology Thicken '3x1+2+0:1,0,0' thick_right.gif
convert man_line.gif -morphology Thicken ConvexHull thick_line.gif

My Sample image

  • Does anyone know how to make the lines (or shapes) thicker/bolder?
  • also: how does the "command" '3x1+2+0:1,0,0' work?
2

It seems these "morphology"s are were made having a black background as a basis. Once the image is white-on-black, the transformation works. From the documentation:

It was original developed with binary (pure black and white) images in mind

Negate the colors (so that I have white on black):

convert black-on-white.png -negate white-on-black.png

Then do above transformation from the question. However, I had better results with following morphology:

convert white-on-black.png -morphology Dilate Octagon fat-white-on-black.png

Still, nice to have would be to have it work from different color schemes.

  • 2
    The article also says * 'Dilate' and 'Erode' are dual*, so you can operate on your original image with -morphology Erode Octagon . – meuh Jul 30 '16 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.