Graphics Logo

PseudoGrey

RWF Logo, no ICW Visible Policy GlossPinion Halls of Heroes
Squeezing 1786 Grey Levels out of 256 Possiblities

probably more than you ever wanted to know about pseudoGrey
(but we do gots lotsa pictures)
IBM, a source for Java
ibmJavaGrey.png
This image appealed to me, so I, uh, borrowed it from the Java marketing pages at IBM.  The original was a slightly smaller JPEG image called 'hmmainr.jpg'.  It has been overlayed with a pseudoGrey checkerboard containing all 1786 shades of grey.

Description

Text of the
Original Usenet Posting
19 July 1999
(preserved at the excellent Color Reference Library)

I've finally implemented a concept that has been on the back of my mind for some time.  I call it pseudoGrey.  It is a method to encode more than 8 bits of greyscale within a 24-bit color image.  Using the technique, exactly 1,786 levels of grey can be encoded and decoded.  The algorithm borrows from the concept of luma, in that the "plusses" map roughly to the luma weights of the three color components.

To use this technique, you begin with a 12-bit greyscale number.  The base 8-bit value for each rgb element is the 12-bit value right-shifted by four.  Then 1 is added to none, one, or two of the components by examining the low-order nibble of input.  On:

2.. 4 -> blue + 1 5.. 6 -> red + 1 7.. 8 -> red + 1, blue + 1 9..10 -> green + 1 11..13 -> green + 1, blue + 1 14..15 -> green + 1, red + 1

I don't think anyone can actually see the difference between 256 and 1786 levels of grey.  However, without degrading the color image, you preserve analytical detail which would otherwise be lost.  Of course, you need to have started with at least 512 levels of grey to get any benefit.  Film and many scanners do provide data sources that might take advantage of this technique.

Usenet Thread at Google Groups
(On 2007-01-03 I noticed it had been restored to their archive.)

To see an implementation, visit the SIHwheel.  The source code for the applet links from there.  The color wheel begins "non-augmented", which means there are 4096 slots available for greys.  If you click in the center of the wheel, the intensity bar is mapped to pseudoGrey.  If you have a 24-bit display and screen-peeker program, you will be able to verify the pseudoGrey encoding.  If you augment the color set (by having three or more hue domains in their extra-hue mode), the color wheel won't use more than 8-bit grey.

The 16-bit SIH colorspace always has at least 256 true grey levels.


February 2013 update: Extended PseudoGrey!
3110 unique levels!!
Read all about it!!!

This page used to contain source code for a small java console program.  Frankly it took up too much space, and most people weren't interested in it anyway.  It still resides in plain text form here, though.

The program tests two getPseudoGrey() methods.  A third method, isPseudoGrey(), provides a test to determine whether a color should be interpreted as grey.  Calculations use 12-bit greyscale.


Dave Wyble of the Munsell Color Science Laboratory has let me know that there has already been a hardware implementation of this concept:

  • Tyler C.W., Chan H., Liu L., McBride B. & Kontsevich L.L. (1992)
  • Bit-stealing: How to get 1786 or more grey levels from an 8-bit color monitor
  • Proc. SPIE #1666, 351-364

G. Adam Stanislav has implemented pseudogrey into his Pixie Dust Photoshop plugin.  His site includes information about redheads, but he also offers a lot of photography and plugin information.  Start with the Atelier link for the latter sort.


The photographer Alex Wilson independently came up with the idea of pseuodogrey.  He implemented it as a perl script.  It accepts a 16-bit raw grey photoshop file, and converts it to a raw 24-bit "color" file using the pseudogrey algorithm.  He has allowed me to host the script here.


Lyle J. Kroll has posted a tutorial, True Pseudogrey in GIMP. Check out the 1152x768 image he created.


Pat David later posted a True Pseudogrey in GIMP article to his blog.  Therein he offers a "script-fu" implementation and explanation of Lyle's manual technique.

For those more interested in viewing colors than greys, visit Roedy Green's Colour Page(Each turquoise ball links to a full page of colors.)  It is part of the amazing Java & Internet Glossary.


Translations of this Page
    Armenian by Karen Mgebrova


Please let me know about other related information.
Thank you.

top

Images

PseudoGrey Snakes
Fun for the Whole Family!

1x1 pseudogrey
pGrey1.png
1786 levels
1x1 deep grey
dGrey1.png
deep grey
4096 levels
3x3 grey
grey1.png
regular
ol' grey
256 levels

2x2 pseudogrey
pGrey2.png

3x3 pseudogrey
pGrey3.png


pseudoGrey cross-hatched with dark purple
pGrey5.png

pseudoGrey in the Hueborhood
hHoodPgrey.png
Why "grey" with an "e"?
Personal taste, mostly -- plus "gray" looks too much like "gary" to me.
top
counter
Accesses since 1999-07-25
Last updated 2015-05-28
Rich Franzen
Valid HTML 4.01!
myHome   myGallery