
Contrast is the difference in
luminance
Luminance is a photometric measure of the luminous intensity per unit area of light travelling in a given direction. It describes the amount of light that passes through, is emitted from, or is reflected from a particular area, and falls wit ...
or
color
Color (or colour in English in the Commonwealth of Nations, Commonwealth English; American and British English spelling differences#-our, -or, see spelling differences) is the visual perception based on the electromagnetic spectrum. Though co ...
that makes an object (or its representation in an
image
An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
or
display) visible against a background of different luminance or color. The human
visual system
The visual system is the physiological basis of visual perception (the ability to perception, detect and process light). The system detects, phototransduction, transduces and interprets information concerning light within the visible range to ...
is more sensitive to contrast than to absolute luminance; thus, we can perceive the world similarly despite significant changes in illumination throughout the day or across different locations.
The maximum contrast of an image is termed the
contrast ratio or
dynamic range
Dynamics (from Greek δυναμικός ''dynamikos'' "powerful", from δύναμις ''dynamis'' " power") or dynamic may refer to:
Physics and engineering
* Dynamics (mechanics), the study of forces and their effect on motion
Brands and ent ...
. In images where the contrast ratio approaches the maximum possible for the medium, there is a ''conservation of contrast''. In such cases, increasing contrast in certain parts of the image will necessarily result in a decrease in contrast elsewhere. Brightening an image increases contrast in darker areas but decreases it in brighter areas; conversely, darkening the image will have the opposite effect.
Bleach bypass reduces contrast in the darkest and brightest parts of an image while enhancing luminance contrast in areas of intermediate
brightness
Brightness is an attribute of visual perception in which a source appears to be radiating/reflecting light. In other words, brightness is the perception dictated by the luminance of a visual target. The perception is not linear to luminance, and ...
.
Biological contrast sensitivity
Campbell and Robson (1968) showed that the human
contrast sensitivity function shows a typical
band-pass filter
A band-pass filter or bandpass filter (BPF) is a device that passes frequencies within a certain range and rejects ( attenuates) frequencies outside that range.
It is the inverse of a '' band-stop filter''.
Description
In electronics and s ...
shape peaking at around 4 cycles per degree (cpd ''or'' cyc/deg), with sensitivity dropping off either side of the peak.
This can be observed by changing one's viewing distance from a "sweep
grating" (shown below) showing many bars of a
sinusoidal
A sine wave, sinusoidal wave, or sinusoid (symbol: ∿) is a periodic wave whose waveform (shape) is the trigonometric sine function. In mechanics, as a linear motion over time, this is '' simple harmonic motion''; as rotation, it correspond ...
grating that go from high to low contrast along the bars, and go from narrow (high spatial frequency) to wide (low spatial frequency) bars across the width of the grating.

The high-frequency cut-off represents the
optical
Optics is the branch of physics that studies the behaviour and properties of light, including its interactions with matter and the construction of instruments that use or detect it. Optics usually describes the behaviour of visible, ultravio ...
limitations of the visual system's ability to
resolve detail and is typically about 60 cpd. The high-frequency cut-off is also related to the packing density of the
retina
The retina (; or retinas) is the innermost, photosensitivity, light-sensitive layer of tissue (biology), tissue of the eye of most vertebrates and some Mollusca, molluscs. The optics of the eye create a focus (optics), focused two-dimensional ...
l
photoreceptor cell
A photoreceptor cell is a specialized type of neuroepithelial cell found in the retina that is capable of visual phototransduction. The great biological importance of photoreceptors is that they convert light (visible electromagnetic radiation ...
s: a finer matrix can resolve finer gratings.
The low frequency drop-off is due to
lateral inhibition within the
retinal ganglion cell
A retinal ganglion cell (RGC) is a type of neuron located near the inner surface (the ganglion cell layer) of the retina of the eye. It receives visual information from photoreceptor cell, photoreceptors via two intermediate neuron types: Bipolar ...
s. A typical retinal ganglion cell's
receptive field
The receptive field, or sensory space, is a delimited medium where some physiological stimuli can evoke a sensory neuronal response in specific organisms.
Complexity of the receptive field ranges from the unidimensional chemical structure of od ...
comprises a central region in which light either excites or inhibits the cell, and a surround region in which light has the opposite effects.
One experimental phenomenon is the inhibition of blue in the periphery if blue light is displayed against a white background, leading to a yellow surrounding. The yellow is derived from the inhibition of blue on the surroundings by the center. Since white minus blue is red and green, this mixes to become yellow.
For example,
in the case of graphical computer displays, contrast depends on the properties of the picture source or file and the properties of the computer display, including its variable settings. For some screens
the angle between the screen surface and the observer's line of sight is also important.
Quantifications
There are many possible definitions of contrast. Some include color; others do not. Russian scientist laments, "Such a multiplicity of notions of contrast is extremely inconvenient. It complicates the solution of many applied problems and makes it difficult to compare the results published by different authors."
[
]
Various definitions of contrast are used in different situations. Here,
luminance
Luminance is a photometric measure of the luminous intensity per unit area of light travelling in a given direction. It describes the amount of light that passes through, is emitted from, or is reflected from a particular area, and falls wit ...
contrast is used as an example, but the formulas can also be applied to other physical quantities. In many cases, the definitions of contrast represent a ratio of the type
:
The rationale behind this is that a small difference is negligible if the average luminance is high, while the same small difference matters if the average luminance is low (see
Weber–Fechner law
The Weber–Fechner laws are two related scientific law, scientific laws in the field of psychophysics, known as Weber's law and Fechner's law. Both relate to human perception, more specifically the relation between the actual change in a physica ...
). Below, some common definitions are given.
Weber contrast
Weber contrast is defined as
:
with
and
representing the luminance of the features and the background, respectively. The measure is also referred to as ''Weber fraction'', since it is the term that is constant in
Weber's Law. Weber contrast is commonly used in cases where small features are present on a large uniform background, i.e., where the average luminance is approximately equal to the background luminance.
Michelson contrast
Michelson contrast (also known as the ''visibility'') is commonly used for patterns where both bright and dark features are equivalent and take up similar fractions of the area (e.g.
sine-wave gratings). The Michelson contrast is defined as
:
with
and
representing the highest and lowest luminance. The denominator represents twice the average of the maximum and minimum luminances.
This form of contrast is an effective way to quantify contrast for periodic functions
and is also known as the modulation
of a periodic signal
. Modulation quantifies the relative amount by which the amplitude (or difference)
of
stands out from the average value (or background)
.
In general,
refers to the contrast of the periodic signal
relative to its average value. If
, then
has no contrast. If two periodic functions
and
have the same average value, then
has more contrast than
if
.
RMS contrast
Root mean square
In mathematics, the root mean square (abbrev. RMS, or rms) of a set of values is the square root of the set's mean square.
Given a set x_i, its RMS is denoted as either x_\mathrm or \mathrm_x. The RMS is also known as the quadratic mean (denote ...
(RMS) contrast does not depend on the spatial frequency content or the spatial distribution of contrast in the image. RMS contrast is defined as the standard deviation of the
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
intensities:
:
where intensities
are the
-th
-th element of the two-dimensional image of size
by
.
is the average intensity of all pixel values in the image. The image
is assumed to have its pixel intensities normalized in the range