Pattern recognition by retina-like devices