I do not think connected components works on an image with an alpha channel. Either process the alpha channel or process the underlying image or flatten the alpha channel onto some background color and then process that.
What exactly do you want to remove? It is not clear what you want to do.
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at
http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see
http://imagemagick.org/script/porting.php#cli