Glare (vision)

Glare is difficulty of seeing in the presence of bright light such as direct or reflected sunlight or artificial light such as car headlamps at night. Because of this, some cars include mirrors with automatic anti-glare functions and in buildings, blinds or louvers are often used to protect occupants. Glare is caused by a significant ratio of luminance between the task (that which is being looked at) and the glare source. Factors such as the angle between the task and the glare source and eye adaptation have significant impacts on the experience of glare.
Discomfort and disability.
Glare can be generally divided into two types, discomfort glare and disability glare. Discomfort glare is a psychological sensation caused by high brightness (or brightness contrast) within the field of view, which does not necessarily impair vision. In buildings, discomfort glare can originate from small artificial lights (e.g. ceiling fixtures) that have brightnesses that are significantly greater than their surrounding. When the luminous source occupies a much greater portion of the visual field (e.g. daylit windows), discomfort caused by glare can be linked to a saturating effect. Since observers will not always look directly at a bright illuminated source, discomfort glare will usually arises when an observer is focusing on a visual task (e.g. a computer-screen) and the bright source is within their peripheral visual field.
Disability glare impairs the vision of objects without necessarily causing discomfort. This could arise for instance when driving westward at sunset. Disability glare is often caused by the inter-reflection of light within the eyeball, reducing the contrast between task and glare source to the point where the task cannot be distinguished. When glare is so intense that vision is completely impaired, it is sometimes called dazzle.
Reducing factors.
Glare can reduce visibility by:
Sunglasses are often worn to reduce glare; polarized sunglasses are designed to reduce glare caused by light reflected from non-metallic surfaces such as water, glossy printed matter or painted surfaces. An anti-reflective treatment on eyeglasses reduces the glare at night and glare from inside lights and computer screens that is caused by light bouncing off the lens. Some types of eyeglasses can reduce glare that occurs because of the imperfections on the surface of the eye.
Light field measurements can be taken to reduce glare with digital post-processing.
Measurement.
Studies.
Discomfort glare has often been studied using psychophysics experiments, where the common methods have been the luminance adjustment and category rating procedures. Studies conducted by Petherbridge and Hopkinson and Luckiesh and Guth. were amongst the first to compared subjective assessments given by observers against physical measurements produced by a glare source.
Glare from artificial lights is typically measured with luminance meters. From daylit windows, cameras are used to convert the pixels into luminances. Both of which are able to determine the luminance of objects within small solid angles. The glare of a scene i.e. visual field of view, is then calculated from the luminance data of that scene.
The International Commission on Illumination (CIE) defines glare as:
""Visual conditions in which there is excessive contrast or an inappropriate distribution of light sources that disturbs the observer or limits the ability to distinguish details and objects"." 
The CIE recommends the "Unified glare rating" (UGR) as a quantitative measure of glare.
Other glare calculation methods include "CIBSE Glare Index", "IES Glare Index" and the "Daylight Glare Index" (DGI).
Unified glare rating.
The unified glare rating (UGR) is a measure of the glare in a given environment, proposed by Sorensen in 1987 and adopted by the International Commission on Illumination (CIE). It is basically the logarithm of the glare of all visible lamps, divided by the background lumination formula_1:
formula_2
where formula_3 is the common logarithm (base 10), formula_4 is the luminance of each light source numbered formula_5, formula_6 is the solid angle of the light source seen from the observer and formula_7 is the Guth position index, which depends on the distance from the line of sight of the viewer.