Where neurologically is edge detection? In the retina, LGN, early cortical areas?

Answer from Jim Hoffman (Psychology and Cognitive Science)

The circular surround (mexican hat) cells are found in the cells coming out of the retina, the LGN and the early levels of V1. In V1, sets of circular surround cells get combined into elongated receptive fields known as simple cells. These seem to respond to oriented lines and edges. However, it is not known whether they are in fact edge detectors. It seems likely that many of these RFs would have to be combined or integrated over space to actually detect edges in any reliable way. How and where this is done is not known.