A theory for the development of feature detecting cells in visual cortex