Hi,
I want to find Average CIE L a b values of Pixels in a Selection that is more than just a 5x5 array. ie just a general selection shape.
thanks
#1
The "mean" value in the histogram of each channel will show you the average values
#2
That seems to be true for RGB mode, but not in L a b.
Any suggestions.
#3
wrote in message
That seems to be true for RGB mode, but not in L a b.
Any suggestions.
Doesn' the histogram show the distribution of pixel values using the current working profile? If so, then you need to set the working profile to Lab. Jim
#4
Not directly but they can be derived from the Mean values with a little math
To determine the average L value, use the formula: 100 - [Mean ÷ 2.55]
To determine the average a and b values, use the formula: Mean - 128
#5
Thanks John,
that will do it.
cheers
#6
John,
In your formulas, to what "mean" values do you refer? The Lab L mean value is not the mean luminosity shown in the histogram. The Lab a and b mean values are not cited at all.
What one could do, however, is to go to the color picker, punch in the mean R,G, and B values from the histogram and read off the corresponding Lab L and a and b values. (This should not be expected to work in reverse, i.e., to get mean R,G,B values from Lab values becuse the RGB gamut is smaller than the Lab gamut).
#7
I don't mean to be mean, but I mean the mean values in the histogram, when you scroll the Channel field to Lightness or "a" or "b", know what I mean?
#8
John,
Clearly, I'm missing something. The only histogram channel mean data I can find are RGB, Red, Green, Blue, Luminosity, and "Colors". By what means does one coax Lab values out of the histogram?
#9
OK, to answer my own question, switch to Lab mode and then invoke the histogram to get L a and b channel data.
#10
The relation between R'G'B' (gamma encoded values)
and Lab is highly nonlinear, therefore mean values
cannot be transformed easily.
One exception: a gray image has C'=R'=G'=B'.
In this case and for G=2.2, C' is almost a linear
function of L* or vice versa.
This is shown here on top of p.8, the black and the
green curves:
<
http://www.fho-emden.de/~hoffmann/a3gencolortest.pdf>
Then we can use L*=C'/2.55 for L*=0..100 and C'=0..255
as an approximation with max. error 5% or so.
Perhaps the OP's problem can be solved by applying
a very strong Gaussian blur which results in a uniformly colored area. Then one can read the Lab values.
Gaussian blur doesn't clip, therefore the measurement
should be rather accurate.
Best regards --Gernot Hoffmann
#11
Couldn't you just have the image in Lab mode, and run the Blur > Average filter on the selection? Once you have the color, you could then undo the blur.
#12
John,
yes, but the Info Palette can show Lab values even
if the image is in an RGB mode.
Besides all these odd mathematical considerations
about mean values, I'm still thinking that Blur
isn't bad.
It's obviously correct, assumed that the calculation
for millions of pixels is not affected by severe
rounding errors (strong Gaussian Blur has to be
executed by float accuracy).
Best regards --Gernot Hoffmann
#13
Couldn't you just have the image in Lab mode, and run the Blur > Average filter on the selection? Once you have the color, you could then undo the blur.
No
Because that would make too much sense :)
#14