Oct. 12, 2017

Daltonization

There is not just one color blindness

 
When people hear about color blindness they usually relate it to the term red-green color blindness, which is interpreted as 'not being able to distinguish the colors red and green'. Unfortunately this is misleading and merely describes the most common form of color vision deficiency.

In 1798, John Dalton (of atomic theory fame) was the first known scientist to describe color blindness in detail, as he discovered to be colorblind himself [1]. After studying his color vision, comparing his results with his brother, who was also colorblind, and talking to other colorblind people which he found during his research, he put together a list of Characteristic Facts of our Vision (by our he refers to the group of colorblind people including himself and his brother). This list includes the following points:
John Dalton was suffering from deuteranopia [2] - one specific form of red-green color blindness - and his findings already show us, that this is not only about having troubles with the colors red and green but affects the whole color spectrum.

During the 19th century many scientists such as Young, Helmholtz, Maxwell, and Wilson became interested in the topic of color vision and color blindness. These scientists formed the fundamental research paving the way to our understanding of the perception and misperception of colors. In 1855 Maxwell wrote in a letter to Wilson: "The mathematical expression of the difference between colour-blind and ordinary vision is that colour to the former is a function of two independent variables, but to an ordinary eye, of three; [...] If we find two combinations of colours which appear identical to a colour-blind person, and mark their positions on the triangle of colours, then the straight line passing through these points will pass through all points corresponding to other colours, which, to such a person, appear identical with the first two. We may in the same way find other lines passing through the series of colours which appear alike to the colour-blind. All these lines either pass through one point or are parallel, according to the standard colours which we have assumed, and the other arbitrary assumptions we may have made." [3]

Color vision

In order to understand the source of the different types of color vision deficiency, it is important to understand how our color vision works. The human eye consists of approximately seven million cone cells and one hundred twenty million rod cells. Cone cells are responsible for color vision and function best in high levels of illumination; this is the reason color vision is absent at night. Rod cells function in low levels of illumination, and play a secondary role in color vision as they can only distinguish between lightness and darkness.

The average person has three types of cone cells, referred to as trichromacy, which differ in their peak sensitivity along the color spectrum. Long-wave sensitive cones have a maximum absorbance at 560nm, medium-wave sensitive cones at 530nm and short-wave sensitive cones at 420nm. These wavelengths are very close to the the primary colors red, green and blue and therefore are often referred to by those three colors [4].

Mixing the input of those three types of cones makes up our entire visible color spectrum. With this knowledge it is easy to understand that someone with more than three types of cones would have an increased perception of color; an example being tetrachromacy with four cone types. Whereas, on the other side, if there is a problem with one of those cone types or if one is missing the perceived variety of colors can be reduced dramatically.


Diagram 1: MacAdam ellipses in the CIE 1931 chromaticity diagram.
Even people with normal color vision, or tetrachromacy for that matter, cannot distinguish differences within the entire color spectrum. This is important to understand as otherwise even people with no defect could be classified as colorblind.

In the 1940s MacAdam conducted a series of tests and introduced the discrimination ellipses, also known as MacAdam ellipses (see Diagram 1), into the CIE 1931 chromaticity diagram [5]. Every ellipse encloses colors which cannot be discriminated at the same level of luminance. These ellipses provide the tolerance limits for color specification and color reproduction. MacAdam estimated that a trichromat can distinguish about seventeen thousand unique colors at each level of luminance, or about three million perceivable colors overall.

Color vision deficiency

With the theory of color vision in the backpack, understanding the different types of color blindness is one step away. As our color vision is based on the three types of cones - red, green, and blue - a slight shift of the maximal sensitivity of one of those three types of cones results in less possible color mixtures, and reduction of the perceived color spectrum. This form of color blindness is an abnormality of the normal trichromaticcolor vision and referred to as anomalous trichromacy.

If one cone type is missing completely there are only two receptors left to mix the perceived range of colors, resulting in a dramatic reduction of the amount of visible colors; this type of color vision deficiency is called dichromacy.

If we keep removing cones we end up in forms of color blindness where two or even all are missing. In this case the term 'color blindness' is really correct, as only shades of gray or slight hints of colors can be seen. This complete form of color blindness is called monochromacy and is accompanied by a severe light sensitivity as only rods are used to retrieve visual information.
 

Color Vision with ColorLookupTables

 
Any color correction can be expressed as a color look-up table (CLUT); a mechanism used in image processing to transform a range of input colors into output colors.  There are 16,777,216 colors available in the standard RGB color space.  One way of representing this data is to create an image containing 4096 x 4096 pixels — when arranged in a specific way, this image is called a Hald CLUT (see "Identity" for normal vision below).  Hald CLUTs are supported by ImageMagick, and GraphicsMagick.  Other possible uses would be to offload the data onto an FPGA or an ICC profile, thereby filtering the entire display.

The following images were created using Photoshop's PixelBender plugin and the Color Vision Library.  Google Chrome, and Safari were both fast enough to process this data without timing out, unfortunately, they don't allow right-click to save the <canvas> as a PNG.

Identity
Normal Vision

Protanopia
Simulate missing red-cone
Daltonize missing red-cone


Deuteranopia
Simulate missing green-cone
Daltonize missing green-cone

Tritanopia
Simulate missing blue-cone
Daltonize missing blue-cone