Robust Recognition of Noisy and Superimposed Patterns via Selective Attention