This paper presents a simple and biologically plausible model of how mammalian visual systems could detect and identify features in an image. We suggest that the points in a waveform that have unique perceptual significance as `lines' and `edges' are the points where the Fourier components of the waveform come into phase with each other. At these points `local energy' is maximal. Local energy is defined as the square root of the sum of the squared response of sets of matched filters, of identical amplitude spectrum but differing in phase spectrum by 90 degrees: one filter type has an even-symmetric line-spread function, the other an odd-symmetric line-spread function. For a line the main contribution to the local energy peak is in the output of the even-symmetric filters, whereas for edges it is in the output of the odd-symmetric filters. If both filter types respond at the peak of local energy, both edges and lines are seen, either simultaneously or alternating in time. The model was tested with a series of images, and shown to predict well the position of perceived features and the organization of the images.