An optical illusion (also called a visual illusion) is characterized by visually perceived images that differ from objective reality.
The information gathered by the eye is processed in the brain to give a perception that does not tally with a physical measurement of the stimulus source.
There are three main types: literal optical illusions that create images that are different from the objects that make them, physiological ones that are the effects on the eyes and brain of excessive stimulation of a specific type (brightness, colour, size, position, tilt, movement), and cognitive illusions, the result of unconscious inferences.
Physiological illusions, such as the afterimages following bright lights, or adapting stimuli of excessively longer alternating patterns (contingent perceptual aftereffect), are presumed to be the effects on the eyes or brain of excessive stimulation or interaction with contextual or competing stimuli of a specific type—brightness, colour, position, tile, size, movement, etc.
The theory is that a stimulus follows its individual dedicated neural path in the early stages of visual processing, and that intense or repetitive activity in that or interaction with active adjoining channels cause a physiological imbalance that alters perception.
The Hermann grid illusion and Mach bands are two illusions that are best explained using a biological approach. Lateral inhibition, where in the receptive field of the retina light and dark receptors compete with one another to become active, has been used to explain why we see bands of increased brightness at the edge of a colour difference when viewing Mach bands. Once a receptor is active it inhibits adjacent receptors.
This inhibition creates contrast, highlighting edges. In the Hermann grid illusion the gray spots appear at the intersection because of the inhibitory response which occurs as a result of the increased dark surround. Lateral inhibition has also been used to explain the Hermann grid illusion, but this has been disproved.