HaomiaoJiang
Back to Psych 221 Projects 2013
Background
Display Characterization
Display characterization is the process to build proper models for certain displays and estimate the underlying parameters. The display characteristics are usually measured in two categories, spatial properties and temporal properties. Spatial properties mainly include display gamma value, color bit depth, spectral power distribution, color spectral additivity, pixel independence and so on. Temporal properties include refresh rate, color breakup and so on. Among them, color bit-depth, refresh rate are given by the manufacture and these parameters will not vary a lot between displays. Also, shape of spectral power density is similar among LCD displays, which is shown in figure 1 below.
However, gamma values are different from display to display, even if they are from the same manufacture. So measuring or estimating the gamma for each display is essential in calibrating the display model.
Gamma Curve
Gamma curve characterize the relationship between the inputs value and the output luminance levels. Actually, this encodes and decodes luminance or tristimulus values in video or still image systems.
Gamma is also sometimes called gamma correction, gamma nonlinearity or gamma encoding. Mathematically, gamma correction is, in the simplest cases, defined by the power-law expression:
Since black is not purely black and there always more or less exists ambient lighting, we can add a constant term as
Usage in Vision Experiment
Measuring gamma value of display is essential in preparation of most of the vision experiments. With gamma value and spectral power distribution of the display, we can estimate the spectrum of light coming into the subjects eye. Then, we can transform the spectrum to XYZ or even other color space to do further processing. This process can be described by formular below
Here stands for the luminance of black and stands for the ambient lighting spectrum. These two terms can sometimes be ignored, assuming that we're working in dark room condition. Also, Spectral power distribution can somehow be estimated from the standard shape of LCD display. Thus, characterizing the gamma value is the critical point in output light estimation process.
Measuring Methods
Traditional Measuring Methods
Measuring Process
Traditionally, gamma values are measured by using spectrometer inside a dark room. Spectrometer is an instrument used to measure properties of light over a specific portion of the electromagnetic spectrum. With the spectrum in visible range, luminance values can also be calibrated by computing the XYZ.
Commonly used spectrometers include PR650 and PR715. An image for PR650 is shown in figure 2 below.
The calibration process is described as below:
- Stabilize spectrometer on a tripod and focus it on screen
- Display a flat patch on screen
- Take measurement of XYZ value (Save Y only)
- Change brightness levels and redo step 3
To calibrate display with PR650, you can use code from PsychToolbox or from dmToolbox.
Detailed instructions about steps and calling APIs can be found at Vista Lab Wiki Page and pdc wiki correspondingly.
Deficiencies
Although it's very accurate to measure the gamma curve with spectrometer in most cases, it still has some imperfectness.
Its main drawbacks are listed as below
- High cost - The spectrometer is not affordable to most of the users. It can be only used in labs and some other research institutions.
- Time consuming - The measuring speed of spectrometer can be extremely slow in low light conditions. When calibration is done with 256 input levels, the measuring process can take up to eight hours.
- Poor Performance with low light - PR650 is not sensitive enough to measure the luminance when light is below 10
Thus, we need a simple method to make quick estimation about display gamma.
Dithering Methods
In this section, we will introduce a method to estimate the display gamma by matching the luminance of a gray patch and a dithered patch.
The dithering pattern is a kind of chessboard pattern with intervened black-gray (or gray-white). An illusion image about the chessboard pattern is shown in figure 3 below.
Chess box size is equal to the pixel size of the screen. When screen resolution is high enough, the blurring effects in human vision system can make the dithered patch look exactly the same as a gray patch. The brightness can be calculated as an average of the black and gray (or gray and white).
The subjects are asked to match the brightness of the gray patch and dithered patch by adjusting the brightness of gray in dithered patch. When subjects find the match point, we have equation
Here stands for the error term.
If we have only one data point, display gamma can be solved by minimizing absolute error and we have
If we have multiple measurements, display gamma can be solved by least mean square algorithm. That is
In implementation, we use Matlab as our platform and the program is based on PsychToolbox 3.
Online Dithering Test
Online dithering test is a web based application to make a short gamma test online. Its algorithm is almost the same as dithering test.
However, due to the computing complexity limits of online dithering method, we made the following two modifications
- Subjects are asked to change the intensity of gray patch to make a match instead of adjusting the dithered patch. This is much easier to be handled in web applications but it sacrifices a little the minimun adjustment step size as tradeoffs.
- Gamma value are calculated through a stochastic manner and the final estimation is made by taking average of gammas from each gray level. This method is much simpler in computation and it doesn't require any space to store the past experiment data. The equation of this stochastic estimation is as below
Test Results
Experiment Settings and Test Environment
The experiments are run by two healthy subjects for 15 different levels on two different displays.
Tests are done in normal indoor conditions with up to 150 lux ambient lighting.
Partial tests are done in dark room condition to see the influence of ambient lighting.
No tests have been done in outdoor conditions (up to 400 lux) since most LCD displays are not supposed to be used in that kind of environment.
Dithering Method Test Results
We made the test with two displays, a macbook controlled retina display and a windows controlled TCL display.
The test results are shown in table below.
From the table, we can see that the accuracy of the dithering match test is quite good. Thus, we can apply this algorithm to estimate most of the displays.
Online Dithering Test Results
Online test results depend on the operation system and the running web browser.
The experiment works well on the TCL display with windows but fails on apple display with mac.
Analysis and Comments
In this section, we will discuss the limitation and some influential factors in dithering algorithm and gamma estimation process.
Limitations
The accuracy of the algorithm can be heavily impaired by artifacts listed below
- Pixel Dependencies - Pixel dependencies are the most sever problem in assessing the display gamma by dithering. Actually, the algorithm described above is based on the assumption that each pixel is independent from its neighbors. This is true for most of the newly designed and manufactured display. But it might not be true for some of the display. For example, pixels in the display of Lenovo Y570 are highly dependent and we cannot get a reasonable testing results on that machine.
- Refreshing and Temporal Artifacts - Chessboard pattern with small box size can magnify the artifacts brought by display refresh mode. It's possible that, on some displays, subjects can see unwanted artifacts like screen flashing or color break up. Theoretically speaking, these artifacts will not affect the gamma estimation process. However, these annoying stuffs can prevent user from making a perfect match seriously.
- Screen Resolution - Dithering match test is based on the spatial blurring in human vision system. However, if the pixel size is too large, our eyes can not integrate them to get a gray patch. In that way, it will be almost impossible for a subject to make a match in luminance.
Influential Factors
During the experiment, we found that several factors might affect the gamma estimation process. The influential factors are listed below:
- Viewing Angle - If we change the viewing angle after making a match, we can see that the brightness of the patches becomes different. Possible reason is that the viewing angle for the two patches might be different when not sitting in front of screen. Also, it's possible that light from different brightness dies off at different speed (or they have different radiance distribution). Thus, it's better to force subject to make their eyesight perpendicular to the screen.
- Viewing Distance - If we get too close to the screen, we'll see the black-gray dots in the dithered patch, not a gray patch. This can make the match extremely difficult. However, good news is that currently screen resolution is high enough to support the normal reading distance (0.7 ~ 1m).
- Ambient Lighting - Theoretically, ambient light will not have any influence on the gamma estimation. However, when the ambient light is too bright, it is very hard for the subject to distinguish some minor differences between the gray patch and dithered patch. This will surely decrease the accuracy of the experiment.
Conclusions
From the test results, we can see that in most cases, estimating display gamma by matching dithering patch test is quite accurate. However, it's still imperfect and has some deficiencies.
In the next steps, we can try to improve it in following aspects:
- Develop validation program - we can use the estimated gamma to make a multi-basis half-tone patch that theoretically matches the gray patch. If the subject agrees on this match, we are done.
- Improve the compatibility of online test program - we can try to use Flash instead of display image directly
- Seek for more possible applications - The program might also be useful to estimate the actual brightness of luminance in low light levels
References
- http://en.wikipedia.org/wiki/Gamma_correction
- http://drj11.wordpress.com/2009/04/03/dither-and-gamma/
Software