Count amount of non-continuous blocks in an image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Peggy
Posts: 33
Joined: 2020-03-02T22:31:47-07:00
Authentication code: 1152

Re: Count amount of non-continuous blocks in an image

Post by Peggy »

snibgo wrote:
2020-03-18T23:49:05-07:00
For the flower image, the input has transparent black pixels, with bands of transparent white at top and bottom. We can see these with:

Code: Select all

magick sixFlower.png -alpha off sixflower_na.png
The result sixflower_na.png is:
Image

The connected-component list correctly shows six components that are neither black nor white.

You now use a v7 version of IM. I suggest you should use "magick" instead of "convert".
Alright, got it. Thank you :D

Locked