You may want to remove certain objects by making them transparent. Use -define connected-components:remove=list-of-ids (e.g. -define connected-components:remove=2,4-5).
using a command like this
Code: Select all
convert image -define connected-components:remove=2,4-5 outimage