We propose a novel method for identification of a linear pattern of pixels on a two-dimensional grid. Following principles employed by the visual cortex, we employ orientation selective neurons in a neural network which performs this task. The method is then applied to a sample of data collected with the ZEUS detector at HERA in order to identify cosmic muons which leave a linear pattern of signals in the segmented uranium-scintillator calorimeter. A two dimensional representation of the relevant part of the detector is used. The results compared with a visual scan point to a very satisfactory cosmic muon identification. The algorithm performs well in the presence of noise and pixels with limited efficiency. Given its architecture, this system becomes a good candidate for fast pattern recognition in parallel processing devices.