Switched insertion of connected components in filterSpecklesImpl