HaomiaoJiang: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Projects221
imported>Projects221
Line 109: Line 109:


== Dithering Method Test Results ==
== Dithering Method Test Results ==
Some text. Some analysis. Some figures.
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.
 
[[image:ditheringTestResults.png | Table 1 Dithering Test Results]]
 
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 Dithering Test Results ==

Revision as of 05:28, 20 March 2013

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.

Figure 1 SPD Shape under Different Brightness Levels

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:

Vout=AVinγ

Since black is not purely black and there always more or less exists ambient lighting, we can add a constant term as

Vout=AVinγ+c

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

 XYZ=ieXYZfromEngery(SPD*(AVinγ+c1)+c2))

Here c1 stands for the luminance of black and c2 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.

Figure 2 - PR650

The calibration process is described as below:

  1. Stabilize spectrometer on a tripod and focus it on screen
  2. Display a flat patch on screen
  3. Take measurement of XYZ value (Save Y only)
  4. 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

  1. High cost - The spectrometer is not affordable to most of the users. It can be only used in labs and some other research institutions.
  2. 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.
  3. Poor Performance with low light - PR650 is not sensitive enough to measure the luminance when light is below 10 cd/m2

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.

figure 3 - example of dithering pattern

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

 Igray=Id_black+Id_gray2+e
 I=AVinγ+c

Here e stands for the error term.

If we have only one data point, display gamma can be solved by minimizing absolute error and we have

 γ=log(2)/log(Vd_gray/Vgray)

If we have multiple measurements, display gamma can be solved by least mean square algorithm. That is

 γ=argmine2=argmin2VgrayγVd_grayγ12

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

  1. 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.
  2. 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
 γ=1Ni=1Nlog(2)/log(Vd_gray(i)/Vgray(i))

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.

Table 1 Dithering Test Results

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

Some text. Some analysis. Some figures. Maybe some equations.


Analysis and Comments

Limitations

Influential Factors

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:

  1. 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.
  2. Improve the compatibility of online test program - we can try to use Flash instead of display image directly
  3. Seek for more possible applications - The program might also be useful to estimate the actual brightness of luminance in low light levels

References - Resources and related work

References

Software

Appendix I - Code and Data

Code

File:CodeFile.zip

Data

zip file with my data