Graphics Logo

PseudoGrey Plus

RWF Logo, no ICW Visible Policy GlossPinion Halls of Heroes

Introduction

PseudoGrey Plus takes the PseudoGrey concept one step further.  Whereas PseudoGrey can encode 1786 levels of grey within a 24-bit color image, PseudoGrey Plus ups that to 3110 unique levels.  I have only been working with this idea for a week.  (It is 20 Nov 2013 as I write.)  Currently I envision its main utility in being able to use 12-bit greyscale images on a color monitor, while maintaining both the original dynamic range and most discrete levels of contrast.

The underlying basis of pseudogrey is a color to grey algorithm known as luma.  It dates back to color televisions of the 1950s and '60s.  While reversing it works very well as a greyscale to color technique, modern monitors treat color differently than old color TVs.  In particular, they weight the intensity rating of red, green, and blue more like human eyes do.  The newer algorithm is based on luminance.  Here is a table comparing the two:

Grey Mode Red Green Blue
luma .299 .587 .114
luminance .212671 .715160 .072169

Note in particular that the eye weights of both red and especially blue have dropped, while the effect of green on perceived intensity went up.

top

The Math

Simulating more than 256 levels of grey in a 24-bit image involves minor tweaks to the intensities of red, green, and blue (RGB).  A normal greyscale conversion simply calculates an overall intensity for each pixel and sets the RGB values the same.

Perhaps the RGB values do not need to be exactly the same.  Consider varying them a bit <clears throat> from their base intensity.  In-between levels of grey result.  In the following table, there are "plusses" to the base RGB value.  Pseudogrey has no plusses greater than 1.  Pseudogrey Plus, however, takes advantage of the weakness of blue and red in the luminance value to allow them to vary upward by as much as 2.

12-bit
low
nibble
PsuedoGrey PsuedoGrey
Plus
ideal
%tween
(1/16ths)
plusses %tween plusses %tween
R G B R G B
0 0 0 0 0.0% 0 0 0 0.00% 0.00%
1 0 0 0 0.0% 0 0 1 7.22% 6.25%
2 0 0 1 11.4% 0 0 2 14.43% 12.50%
3 0 0 1 11.4% 1 0 0 21.27% 18.75%
4 1 0 0 29.9% 1 0 1 28.48% 25.00%
5 1 0 0 29.9% 1 0 1 28.48% 31.25%
6 1 0 0 29.9% 1 0 2 35.70% 37.50%
7 1 0 1 41.3% 2 0 0 42.53% 43.75%
8 1 0 1 41.3% 2 0 1 49.75% 50.00%
9 0 1 0 58.7% 2 0 2 56.97% 56.25%
a 0 1 0 58.7% 2 0 2 56.97% 62.50%
b 0 1 1 70.1% 0 1 0 71.60% 68.75%
c 0 1 1 70.1% 0 1 1 78.73% 75.00%
d 0 1 1 70.1% 0 1 2 85.95% 81.25%
e 1 1 0 88.6% 0 1 2 85.95% 87.50%
f 1 1 0 88.6% 1 1 0 92.78% 93.75%

The "12-bit low nibble" column is how you would map if your original image were 12-bit greyscale.  The base intensity of each pixel is the upper 8 bits (byte), and the low-order nibble specifies the "plusses" for the three RGB output pixels.

"Uh, Rich?", the alert amongst you are wondering.  "How can those two sets of numbers coexist?  If the first is for the response of an old color TV, and the second for a modern monitor, shouldn't we just use the second (modern monitor) one?"

Not necessarily, but you are correct that your eyes match the second set better.  However, if you are converting a color image to greyscale, 1786 shades is likely more than enough.  Most folks have lived for decades with only 256 shades – not even knowing they were missing anything.  It does not matter that the %betweens are not even.  The important thing is that there is some difference in lightness offered for each one of the shades.  OTOH, if you are converting a 12-bit greyscale image to be viewed on a color monitor, having all 3110 unique levels is a much better choice.

In case that is not clear, let me restate.  For color to greyscale, there is a significant gain in expanding to 1786 levels.  Note that downstream users might further modify your image.  If the maximum variance from true grey is one bit instead of two, the chances of visible color artifacting are more than halved.  That all said, if you want to use all 3110 levels on your color-to-greyscale image, feel free.  For viewing deep grey images (e.g. 12 or 16 bits/pixel) on a color monitor, 3110 levels is pretty darn good.  While the full dynamic range of the original is preserved, some of the the discrete levels are still lost.  But the loss would be much greater if only 1786 levels were available.

top

References, Etc.

The G'MIC Image Processing Framework supports extended pseudogrey, an even more ambitious extension to greyscale.


counter
Accesses since 2013-02-20
Last updated 2013-02-20
Rich Franzen
Valid HTML 4.01!
myHome   myGallery
top