The sensory world is constantly changing and neural circuits must adapt to these changes if information is to be extracted efficiently. But the processing of external stimuli is also modulated by changes in the internal state of the animal, reflected in the sleep-wake cycle, motor activity and arousal. In this presentation I will describe how we have used in vivo imaging to investigate the mechanisms by which these external and internal factors adjust visual processing in the retina and cortex. One focus will be the varied roles of inhibitory interneurons and a second will be the actions of the neuromodulator dopamine on the synaptic machinery that transmits the visual signal.