A theory of shape recognition.