Adaptive processing and perceptual learning in visual cortical areas V1 and V4