Pages: [1]   Go Down

### AuthorTopic: Colorguru's: Average Lightness?  (Read 4284 times)

#### 32BT

• Sr. Member
• Offline
• Posts: 3095
##### Colorguru's: Average Lightness?
« on: September 10, 2011, 08:17:25 am »

Somewhere in the dark ages I used to be part of these forums so I'll allow myself to skip a formal introduction.

I recently had to shoot some interiorshots which required HDR exposure blending. Not specifically a problem these days, but then I got sleepdeprived over a seemingly very simple issue, and was wondering what you people think about the following question:

1. Suppose we have a perceptual linear gradient from black to white, with Lab lightness L = 50 in the middle.
What then would you consider the average Lab lightness for the entire image?

Common sense would suggest that the average lightness should be L = 50 as well,
A. By simple math because an equally distributed L from 0 to 100, divided by the number of steps, would yield 50.
B. And by simple laymens logic considering this image against a middle gray background, one would perceive the background reference as equal to the middle of the gradient, and for any reasonable whitepoint and contrast setting that would suggest the image has an average lightness equal to middle gray.

However,
C. If we first convert the image to a linear-gamma space like XYZ, and then take the mathematical average of the luminance Y, a number close to ~0.3 will pop up and that converts back to an Lab L of more that 60…

That of course, is a significant difference. So I am not wondering about the subtle differences between various delta E computations, but more about what in general would be considered the average lightness of an image. I am also interested in how photographers in general would interpret this concept as it is directly related to how you consider exposure references in the digital age.

2. Is the "18%" or "20%" gray card still "in schwung" for any quick exposure reference?

3. How about prepping images in the digital domain? What do you use as a reference for finalizing overall image brightness? Do you just use your eyes and a calibrated viewing environment? Perhaps average RGB values in your workingspace? (Did you ever wonder about how that average is calculated?)

4. How about the notorious black-cat-against-black-coal example? How would you know what constitutes a correct (or reasonable) contrast expression? Eyeballing?

Logged
Regards,
~ O ~
If you can stomach it: pictures

#### Peter_DL

• Sr. Member
• Offline
• Posts: 544
##### Re: Colorguru's: Average Lightness?
« Reply #1 on: September 11, 2011, 06:06:19 am »

The need to adjust image brightness e.g. relative to a somehow defined mid gray such as L* 50 on screen
(still) seems to be connected in a mystic way with the absolute luminance and differences [cd/m2] of the scene vs. monitor / output in general, for example a print at given light conditions.

Peter

--
Logged

#### Ernst Dinkla

• Sr. Member
• Offline
• Posts: 4019
##### Re: Colorguru's: Average Lightness?
« Reply #2 on: September 11, 2011, 10:23:31 am »

To make it more complex: Scaling of images seems to influence the brightness and contrast we see as correct, it is of course more complex than one would expect. I found this some time ago:

The Effect of Image Size on the Color Appearance of Image Reproductions
by

A probabilistic explanation of brightness scaling
Surajit Nundy*†‡ and Dale Purves*

are available on the web. Not that I grasp it all but I understand it is not simple ;-)

There is another thing that is more often mentioned. The small change in Gamma that happens in resampling.
http://www.4p8.com/eric.brasseur/gamma.html

The samples there are not real world and compensating that effect in print software is more likely to make things worse.

I stay with eyeballing.

met vriendelijke groeten, Ernst

New: Spectral plots of +250 inkjet papers:

http://www.pigment-print.com/spectralplots/spectrumviz_1.htm

Logged

#### hjulenissen

• Sr. Member
• Offline
• Posts: 2051
##### Re: Colorguru's: Average Lightness?
« Reply #3 on: September 11, 2011, 02:14:15 pm »

There is another thing that is more often mentioned. The small change in Gamma that happens in resampling.
http://www.4p8.com/eric.brasseur/gamma.html
I think the point is that if you do your (linear) resampling in a gamma-based representation, your output image will appear to have been non-lineary resampled to the observer out in the linear world.

The simple solution is to convert any image to a linear representation.

-h
Logged

#### Ernst Dinkla

• Sr. Member
• Offline
• Posts: 4019
##### Re: Colorguru's: Average Lightness?
« Reply #4 on: September 11, 2011, 03:33:47 pm »

I think the point is that if you do your (linear) resampling in a gamma-based representation, your output image will appear to have been non-lineary resampled to the observer out in the linear world.

The simple solution is to convert any image to a linear representation.

-h

It would be simple if all tone curves of cameras and color spaces were really continuous. If not the errors of the compensation could be worse than this gamma/resampling shift. That is what I got as a reply from Mike Chaney when I suggested to add a compensation like that to Qimage resampling choices.

met vriendelijke groeten, Ernst

New: Spectral plots of +250 inkjet papers:

http://www.pigment-print.com/spectralplots/spectrumviz_1.htm

Logged

#### Peter_DL

• Sr. Member
• Offline
• Posts: 544
##### Re: Colorguru's: Average Lightness?
« Reply #5 on: September 14, 2011, 01:45:47 pm »

Supplementary:

Talking about an auto-adaptive Tone curve to adjust image brightness depending on Scene DR, aperture & shutter speed, it might be a meaty object of study by camera / software engineers,
and I’m not surprised that there is little published (maybe in patents ?) or commonly known - at least, speaking for myself.

Peter

--
Logged

#### hjulenissen

• Sr. Member
• Offline
• Posts: 2051
##### Re: Colorguru's: Average Lightness?
« Reply #6 on: September 14, 2011, 02:13:25 pm »

It would be simple if all tone curves of cameras and color spaces were really continuous. If not the errors of the compensation could be worse than this gamma/resampling shift. That is what I got as a reply from Mike Chaney when I suggested to add a compensation like that to Qimage resampling choices.
I dont understand this. When the image is sent to lcd/paper, the gamma is effectively more or less inverted. If you wait until that point to do scaling, you would do scaling in a linear light space.

-h
Logged

#### Ernst Dinkla

• Sr. Member
• Offline
• Posts: 4019
##### Re: Colorguru's: Average Lightness?
« Reply #7 on: September 15, 2011, 04:45:11 am »

I dont understand this. When the image is sent to lcd/paper, the gamma is effectively more or less inverted. If you wait until that point to do scaling, you would do scaling in a linear light space.

-h

http://ddisoftware.com/tech/qimage/gamma-resampling-and-bits/?action=printpage

I did not continue that discussion for other reasons too as sketched in my first message in this thread, there are very complex/unpredictable influences on the lightness of prints with different sizes. John Paul Caponigro's one point darkening for every 2x print area increase is not reliable either.

met vriendelijke groeten, Ernst

New: Spectral plots of +250 inkjet papers:

http://www.pigment-print.com/spectralplots/spectrumviz_1.htm

Logged

#### 32BT

• Sr. Member
• Offline
• Posts: 3095
##### Re: Colorguru's: Average Lightness?
« Reply #8 on: September 17, 2011, 07:39:17 am »

Well, i'm still undecided about how to best interpret overall image brightness. Consider this: most of us are looking at a 2.2 calibrated gamma, and L = 50.0 displays as slightly darker than 0.5 on our screen.

Do we generally wish to see images relative to gamma 2.2, or relative to L in Lab? Is that still a reference in todays imaging environments?

Most images will be viewed and reproduced on monitors, more so than on paper/print. Since most monitors are easily capable of providing significantly more than 100cd/m2, to name just 1 of the many variables, is L in Lab still a relevant parameter?

Moreover, overall image brightness is most likely not a 2degree observer problem, so perhaps that renders all the usual math obsolete to begin with.

Anyways, for a more hands-on approach:
I decided to build a piece of software to do the HDR blending with CoreImage. Also because all the available solutions tend to generate halo-ed crap. Either by intent or otherwise. Plus they all seem to offer a multitude of controls which are highly irrelevant to my needs and most probably indicative of an error in processing logic.

The software I created is meant to do the blending and nothing else. No local contrast enhancements, nor extreme highlight/shadows type of corrections. I just want a correct blend of source frames that I have prepared with some kind of faithful reproduction.

In order to do so, the software just creates luminance masks that allow it to blend the images in some reasonable matter without sacrificing original color and contrast. But, the blended result still has some overall average brightness that may (or may not) need to be corrected to some reference.

The question then is: what reference?

So for a meaningful discussion and because I could use some feedback on the software, I am providing a link to a first beta version here. The software is pretty much self-explanatory, read the ReadMe file for some pointers.

The software shows the final result in a middle-gray backing and allows you to adjust the exposure value. So the question then is this: how would you like to set the background? To what reference? Middle-gray in Lab? or in gamma 2.2? What kind of feedback parameter would be useful?

BlendEditor v1.0b1

(Mac only, requires Mac OS X 10.6, less then 120 KB download)

Please note: this is beta software, do not install if you are not familiar with the concept of beta-software

« Last Edit: September 17, 2011, 07:42:40 am by opgr »
Logged
Regards,
~ O ~
If you can stomach it: pictures

#### Peter_DL

• Sr. Member
• Offline
• Posts: 544
##### Re: Colorguru's: Average Lightness?
« Reply #9 on: September 17, 2011, 12:18:20 pm »

Consider this: most of us are looking at a 2.2 calibrated gamma, and L = 50.0 displays as slightly darker than 0.5 on our screen. Do we generally wish to see images relative to gamma 2.2, or relative to L in Lab? Is that still a reference in todays imaging environments?

...

Anyways, for a more hands-on approach: I decided to build a piece of software to do the HDR blending with CoreImage. Also because all the available solutions tend to generate halo-ed crap. Either by intent or otherwise. Plus they all seem to offer a multitude of controls which are highly irrelevant to my needs and most probably indicative of an error in processing logic.

Well, most of us are in a color-managed environment and with a calibrated & profiled screen, we do not look at "gamma" at all. With the monitor profile mirroring the calibration gamma, there is simply a linear relationship between output luminance [cd/m2] and RGB in a linear "gamma" space.

L 50* still seems to me a reasonable mid gray, from a perceptual point of view.
Of course it will translate to different RGB depending on working space gamma / TRC.

These are basics, Oscar,
trust you know it anyway. Not sure about the gist of your post.

As for HDR blending,

Peter

--
Logged

#### 32BT

• Sr. Member
• Offline
• Posts: 3095
##### Re: Colorguru's: Average Lightness?
« Reply #10 on: September 18, 2011, 05:07:06 am »

Yes, these are basics. That's why i expected a simple answer. But I never really looked at it properly. Well, actually, in a sense I did: When I process my RAW image data, I generally tent to adjust the exposure compensation so the histogramdata hits the right maximum, then fool around with other sliders to adjust the overall brightness back to something reasonable.

When bringing back the overall brightness, I always wondered whether there was some kind of natural correct reference.

I generally just used some form of average RGB indication. But that is obviously prone to all kinds of errors. ProPhoto being 1.8 gamma, or Lightroom using a linear workingspace, but an sRGB histo… And now that I actually did the luminance vs lightness calculation, and because I wanted to build some kind of useful reference into my software, I thought it was a relevant question.

Logged
Regards,
~ O ~
If you can stomach it: pictures

#### bjanes

• Sr. Member
• Offline
• Posts: 3387
##### Re: Colorguru's: Average Lightness?
« Reply #11 on: September 18, 2011, 10:00:32 am »

I think the point is that if you do your (linear) resampling in a gamma-based representation, your output image will appear to have been non-lineary resampled to the observer out in the linear world.

The simple solution is to convert any image to a linear representation.

Correct! I downloaded the image of His Holiness. It is in an untagged color space (presumably around gamma 2.2), so I assigned the color space sRGB. On downsampling 2:1 in Photoshop with the bicubic algorithm, I got the featureless image. However, one must note that this is not a normal image, but one distorted by colored raster lines. In the Bridge preview, it appears featureless in the thumbnail because of re-sampling. This is not the type of image we normally work with, and I think that the author offers a solution to a problem that does not exist.

Lightroom performs its image calculations in a linear space: Melissa. I don't have presently Lightroom installed on my computer but I do have the Melissa color space (chromaticities of ProPhotoRGB with a gamma of 1.0) in my profiles folder. On converting to Melissa and downsampling 2:1 and then converting back to sRGB, I got the image shown below along with the original image. I presume that the resampling problem does not occur in Lightroom.

Regards,

Bill
« Last Edit: September 18, 2011, 10:51:52 am by bjanes »
Logged

#### Peter_DL

• Sr. Member
• Offline
• Posts: 544
##### Re: Colorguru's: Average Lightness?
« Reply #12 on: September 18, 2011, 11:00:01 am »

When bringing back the overall brightness, I always wondered whether there was some kind of natural correct reference.

I generally just used some form of average RGB indication. But that is obviously prone to all kinds of errors. ProPhoto being 1.8 gamma, or Lightroom using a linear workingspace, but an sRGB histo… And now that I actually did the luminance vs lightness calculation, and because I wanted to build some kind of useful reference into my software, I thought it was a relevant question.

In Photoshop Lab mode, and with the histogram set to show the Lightness channel only,
the Mean value of the histogram statistics more often seems to be > 128 mid gray for a pleasing image brightness (on the given scale of L* 0 to 255).  Maybe something like 128 x 1.05 +/-15% as for a rough empirical correlation from a couple of images, without considering specific High key / Low key scenarios.

Peter

--
« Last Edit: September 18, 2011, 11:20:40 am by Peter_DL »
Logged
Pages: [1]   Go Up