Topology of spaces of micro-images, and an application to texture discrimination