• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

The kitchen table monitor gamma test

Doug Kerr

Well-known member
Various suites of text images, intended for testing or adjusting display chains without benefit of an actual colorimeter, include a clever way to visually ascertain the gamma of the display chain.

A nice example if found in the Lacom monitor test suite, developed by Han-Kwang Nienhuys. (Thanks to Maggie for calling this to our attention.)

That test suite can be accessed here:

http://www.lagom.nl/lcd-test/

Nienhuys asked the we not link to his images, but I will take the liberty of doing so here in order to describe how this test works.

Here we see the gamma test image:

gamma-test-2.png

Consider first the left-hand panel ("48%" - I'll explain later what that means), and the "gray" set of bands in it.

The principle is that if we observe this from a distance such that the little alternating "zebra stripes" of the outside and center bands blur into a solid gray band, and note the point at which these bands appear to have the same luminance as the interspersed "solid" gray bands, then the height at which that appears (read from the numerical scale) gives us an indication of the gamma of the display chain.

How does that work?

Well, first note that the RGB color of the solid gray bands varies steadily as we go from top (RGB 139) to bottom (RGB 200).

We also note that in the central and outside bands, the RGB color of the dark stripes is always 0, and of the lighter stripes, always 250. (Again, this is for the "48%" panel.)

Now suppose that the display chain actually follows the sRGB transfer curve specification. If so, the relative luminance of the dark stripes (RGB 0) should be 0, and the relative luminance of the lighter stripes (RGB 250) should be 0.956.

If we see this so that all the stripes blur together, we think we see a band of uniform luminance, that being the average luminance of the dark and light stripes (since they are of the same width). That average (relative) luminance should be 0.478.

Again assuming that the display chain follows the sRGB specification, that would be very nearly the luminance that should be exhibited for RGB 184. Thus we might expect that "striped" and "solid" bands to nearly match in apparent luminance where the color of the solid band is RGB 184.

And that range of RGB is centered at about 2.5 on the gamma scale. So this test would tell us that the gamma of our display chain was about 2.5.

Is that the correct gamma for an sRGB display chain?

Well, now we need to get into a complication. The sRGB transfer curve does not follow a simple power law with a certain exponent (gamma). Rather, it has a linear portion near the origin (for small luminance values), followed by a portion that follows a power law, with exponent 2.4, but offset (so as to nicely join the linear portion).

Thus there is no gamma for the sRGB curve (although it can be handily approximated by a power curve with an exponent of 2.2).

What we can do is one of two things:

A. We can, at any point on the sRGB transfer curve, speak of the gamma of a power curve that would have the same slope as the sRGB curve for that luminance.

B. We can, at any point on the sRGB transfer curve, speak of the gamma of a power curve that would have the same RGB value as the sRGB curve for that luminance.

The Lacom test evidently reports on the latter basis (B).

And so of course (in either case, actually) we would get a different result in different portions of the curve. Thus the three panels in the Lacom test image. The first panel ("48%"), for a perfect match to the sRGB transfer curve, would give the visual match at a relative luminance of almost exactly 48%. It in effect gives us the gamma of the chain, in sense "B", at a luminance of 48%. (Actually, it is only at exactly that luminance if the response indeed matches the sRGB curve!)

The second and third panels test for the gamma (in sense "B") at luminances of about 25% and 10%.

Nienhuys tells us that the expected values of gamma for the sRGB curve (in sense "B") are as follows at the different luminance (Y) values:

Y gamma
10% 2.17
25% 2.20
48% 2.25

The discrepancy from my earlier analysis is probably due to my having rounded the apparent color of the striped band to an integral RGB value.

Does it work?

Well, when I view the test image (as downloaded from the Lacom site) on my system by way of a trusted viewer, the gamma values it indicates comport well with the result from measurements with the Spyder3 system.

On the other hand, if I view the file "online" with my browser (Firefox 30), the results are quite different. This may well be a result of some inappropriate setting in my browser regarding assumed color space or such (I find that all very confusing).

I will look into that when I have a chance.

Best regards,

Doug
 

Doug Kerr

Well-known member
One reason that the Nienhuys' gamma test pattern does not work properly when the test image is seen via my browser (Firefox 30) is that on the browser at any handy zoom setting (including "normal"), the image on screen is not "pixel-for-pixel".
In the actual image, the black and white zebra stripes are each 1 px in width.​

Thus, the browser must interpolate to resize the image to send to the display chain, and uses antialising to deal politely with the non-integral locations of the stripe boundaries. This screws up the visual average luminance of the zebra-striped bands (which in fact varies as we go from top to bottom).

Nienhuys' HTML code at first looks as if it should force a pixel-by-pixel rendering at "normal" zoom, but that doesn't seem to happen. I think this may be because the dimensions at which the image is to be displayed are not explicitly denominated in pixels.

I may want to discuss this with Nienhuys (in my copious free time).

It's always something!

Best regards,

Doug
 

Doug Kerr

Well-known member
As a follow-up on the above, I plan to present some enlarged excerpts from the image file itself and from its rendering by my browser.

But just now, Carla and I are heading out on a day trip to the mountain town of Ruidoso for some special shopping and then lunch at the best Italian restaurant in this part of the state. (That is a pretty large region - the restaurant isn't even in our county, which itself is larger than the state of Connecticut.)

So, later.

Best regards,

Doug
 

Doug Kerr

Well-known member
Below on the left we have an excerpt from Nienhuys' gamma test chart (the actual file as downloaded), from the "48%" panel, the gray section, the portion from gamma 2.1 through 2.3, only the zebra stripe band and the adjacent "solid" bands, presented here at 8x actual size (in pixel terms) for ease in inspection. (The magnification was done "dumb".)

On the right, we have that same portion of the test image captured from its rendering by my browser from the online presentation, at "normal" zoom, magnified (dumb) here so its stripe pitch is the same as on the left side.

gamma-test-2-48-21-23-x8.jpg
gamma-test-2-48-21-23-FFX-x8.gif

We can easily see that on the left, the apparent luminance of the center band, when viewed from a distance so the individual stripes blur together, should be the average of the luminance of the light and dark stripes (as needed for the principle of this visual gamma check).

On the right we see we can expect no such thing.

Woof!

Best regards,

Doug
 

Doug Kerr

Well-known member
"Is that right?"

"Maybe not, but it is so."
It appears that the cause of the difficulty with the Nienhuys gamma test image file, viewed on-line in my browser, is that my browser (when in "normal" zoomage) presents all the images at exactly 125% of the pixel dimensions called for in the HTML file.

It appears that the cause of that is that I have my display "DPI" set to 120 DPI ("125% of normal').

Firefox responds to this (among other things) by upscaling all images accordingly from the pixel dimensions called for in the HTML code. There is considerable discussion in the Firefox forums as to whether or not this is appropriate.

Probably it would be appropriate for images whose dimensions were given in inches (I don't think one can do that) but not for those whose dimensions are given in pixels.

"My dog is five years old. How much is that in 'dog years' ?"

"Five."​

I have fed all my thoughts on this to Han-Kwang Nienhuys (just what he needs, no doubt).

In the meantime, I urge those of you who wish to take advantages of Han-Kwang's monitor text images to download the suite from the Lacom site and display them with a "trusted viewer".

Best regards,

Doug
 
Doug, when I suggested this website, it was simply because I had used it and had found it to be useful. I, as you, had downloaded the suite from his site and was pleased at the results. I had not even thought about what would happen when the images would be used with different browsers; I had simply thought it was all dependent on the monitor.

So, thank you very much for checking out all the information and I'm sorry if it gave you a tremendous amount of work to verify, but something in me thinks that you may like a challenge and may have actually have enjoyed this. I sure hope so!

:)
Maggie
 

Doug Kerr

Well-known member
Hi, Maggie,

Doug, when I suggested this website, it was simply because I had used it and had found it to be useful. I, as you, had downloaded the suite from his site and was pleased at the results. I had not even thought about what would happen when the images would be used with different browsers; I had simply thought it was all dependent on the monitor.
Well, who knew!

So, thank you very much for checking out all the information and I'm sorry if it gave you a tremendous amount of work to verify, but something in me thinks that you may like a challenge and may have actually have enjoyed this. I sure hope so!
Oh, I did indeed. It was, as always, a real learning experience.

And thanks for bringing attention to this site.

Best regards,

Doug
 

Doug Kerr

Well-known member
I find that after changing my display system "DPI" (temporarily) back to 96 DPI ("100%), the Nienhuys gamma check image file, presented through my Browser (Firefox v30.0), at "normal" zoom, works fine.

Best regards,

Doug
 
Top