The sensitivity of the visual system depends on ambient illumination: Sensi
tivity is reduced in the presence of a bright, uniform background. We asked
how sensitivity is adjusted when the background is spatially detailed and
therefore contains both luminance peaks and troughs in the neighborhood of
a foreground object. A test flash was superimposed on a static sinusoidal g
rating. As the grating's spatial frequency increased, sensitivity for flash
detection declined, regardless of whether the flash was superimposed on a
peak or a trough of the grating. We studied the mechanisms underlying this
loss of sensitivity by delivering the test stimulus through one eye and the
background through the other. The conclusion is that three mechanisms are
involved. Luminance adaptation and a masking process adjust sensitivity at
low- and mid-range spatial frequencies, respectively. The third mechanism,
a contrast gain control, is localized (it occurs at spatial frequencies app
roaching the limit for resolution) and fast (complete in half a second), an
d it results hom early processing in the visual pathway (it is absent durin
g dichoptic viewing). This local adjustment of sensitivity may help to prot
ect the clarity of even the smallest details in the visual scene. (C) 1999
Optical Society of America [S0740-3232(99)01005-4].