added 8u type support to filterSpeckles function