What do you mean with "filtering CCL output"? I can get a list of islands with:
Code: Select all
convert image -define connected-components:verbose=true -connected-components 4 info:
Or is there a better IM way to filter the output?
Edit: On first test runs I get an error on some images:
Code: Select all
convert: too many objects `align_PTO.min1.tif' @ error/vision.c/ConnectedComponentsImage/438.
It is important that it does not miss empty rows or columns as might happen with "-define connected-components:area-threshold=410" if I understand correctly.
My current reference is https://imagemagick.org/script/connected-components.php . Is another helpful explantation elsewhere?
Unfortunately the island check has to be done on each iteration; otherwise I would have to check for empty rows/columns on each iteration again.You do not need to find islands on each iteration, if I understand.
If you look at the third animated gif here you'll see some "jumps" at the end of the animation where empty columns were found. If that case is not catched, the script fails.