It is known that a typical observer can discern between a dozen to three dozen distinct grey levels or intensity variations. If color is added, then a typical observer can discern thousands of color shades and intensities.
Another important parameter is the data type of each element. Data type refers to the number of bits required to represent each data element. This information is important for determining the type of arithmetic used for representing, processing, and displaying data elements.
To display data a transformation is made in order to generate a visual representation. The actual data can be seen by moving the mouse over the data and reading its values. This display transformation is very complex and important to understand. Also, in many applications is poorly implemented. The issues dealt with in this transformation are:
---
Left: Original image, data type "float", Right: plot of a single line
Clicking on the image will call the khoros display operator.
Observe that the true data value is displayed in floating point format
in the location window at the bottom of the image.
In this case, the data is mapped into the default grey scale, with its maximum value (2.0) corresponding to the brightest shade (white) and the minimum (-2.0) to the darkest shade (black).
---
Converted image, data type "bit"
Observe that all "ones" are mapped to the brightest shade and all "zeros" to the darkest.
---
Converted image, data type "byte"
Observe that the maximum value (2) is mapped to white, the minimum value (-2) is mapped to black and the others to intermediate grey shades.
output = scale * input + offset.If we convert the original image to data type "byte" with a scale factor of 255/4, the display is as follows:
x = 2 ==> 2 1 <= x < 2 ==> 1 0 <= x < 1 ==> 0 -1 < x < 0 ==> 0 -2 < x <= -1 ==> 255 (-1) x = -2 ==> 254 (-2)
Observe that we cannot see the values 1 and 2 because 255 is mapped to the brightest grey level, and we cannot discern from values 255 and 254 because their shades are very similar.
If we convert the original image to data type "complex", the resultant image has the real part equivalent to the original pixels and the imaginary part is set to zero.
The display transformation process performs an implicit conversion using log(|x|+1) which generates an output range between 0 (log[0+1]) and log[2+1]. Zero is mapped to black and log(3) is mapped to white. Note that image enhancement has occurred.