A general approach to the spatial simplification of remote sensing images based on morphological connected filters