Connected-component labeling with ImageMagick

Yes, it is now possible with ImageMagick 6.8.9-10 and newer, see here. So, if we start with this image: we can get the components labelled and also the bounding boxes, centroids and other statistics for each blob or component like this: convert input.png \ -colorspace gray -negate -threshold 10% \ -define connected-components:verbose=true \ -define connected-components:area-threshold=100 … Read more

ImageMagick Command-Line Option Order (and Categories of Command-Line Parameters)

Unfortunately, the accepted answer to this question is not yet complete… 🙂 Three (major) classes of parameters Assuming, your ImageMagick version is a recent one, here is an important amendment to it: you should differentiate between 3 major classes of command line parameters: Image Settings Image Operators Image Sequence Operators   These three classes do … Read more

convert:not authorized `aaaa` @ error/constitute.c/ReadImage/453

Note: the solution in this and other answers involves disabling safety measures that are there to fix arbitrary code execution vulnerabilities. See for instance this ghostscript-related and this ubuntu-related announcement. Only go forward with these solutions if the input to convert comes from a trusted source. I use ImageMagick in php (v.7.1) to slice PDF … Read more