[comp.graphics] Gray levels and color

jdm@hodge.UUCP (jdm) (07/14/89)

In a company I onced worked for there was a guy who could
look at a black and white photograph of a prinited circuit board
and read the color codes on the resistors, capacitors, wires, etc.
I could look at the same photograph and make an educated guess
of what the colors were based on the intensity of the gray levels
and the most likely color combinations that would occur on a
PC board, but I could not read them with 100% accuracy like
this guy could.

It turned out that this guy was color blind in such a way that
he could see colors in levels of gray.  Apparently they were the
correct colors for he never seemed to need to guess or deduce.
He actually saw those colors on the B&W photograph.  Now I am
wondering "just what are the correlations between intensity
(levels of gray) and color (either RGB or HSI)"?


Reducing the Hue and Saturation in a photograph would leave only
a gray level picture of the intensities.  How would one use such
an intensity scale to reconstruct the orginal color of the 
photograph using either RGB or HSI?


-- 

"I'm an anthropologist, not a computer systems architect, damit!"

jdm@hodge.cts.com [uunet zardoz]!hodge!jdm

James D. Murray, Ethnounixologist
Hodge Computer Research Corporation
1588 North Batavia Street 
Orange, California 92667  USA

TEL: (714) 998-7750	Ask for James
FAX: (714) 921-8038	Wait for the carrier

ray@hydroplane.cis.ohio-state.edu (william c ray) (07/14/89)

in a previous article someone says...  'I once knew a fella who could %
reconstruct color data from a B/W photo, he could read resistor codes on
b/w photos w/out the color there.  somehow he could actualy see the color
in the grayscale, because he never guessed and was always right... how did
he do it?"

answer... he was a better guesser than you thought...  in any color-to-BW
scheme, there are multiple hues which will record (generic term here, not necc
meaning screen graphics) as the same value (shade of gray).  ie, if the
pigments were right in the bands, several bands could have recorded as the
exact same value on a print.  there would be no way of knowing what the
origional colors were (none)  to make matters worse (and your friends guessing
ability even better...) there is not one BW film available (that I know of)
which records colors as we see them.  as a matter of fact, depending on the
film, the same color in two different prints would record as two very different
values.  for example, a photo of, say a 200 ohm resistor 
               (thats red          black  brown) would record on 
TRI X          (       black       black  dark-grey)   and on say
Panatomic X    (       light-grey  black  dark-grey)

This is due to the fact that TRI X is not particularly sensitive to red
light (like as in not hardly at all) while Panatomic X is more sensitive to
Red light than it is to Blue (under tungsten lighting conditions, when 
unaffected by ultra-violet)  What this means is that given an apple, a
green pepper, and (can anyone think of a largish blue food substance?) oh,
why not a VERY large blueberry, and using the correct films, I can make
any one of them appear black and/or any one of them appear white in the
final image  (actualy this is a bit tough to do to the green without filters,
but we wont go into that)

therefore, as you can see, determining which color is which from the grayscale
that it records at is an utterly impossible proposition.  (this means that
the fella who could read resistors in B/W was GOOD...)

later
Will Ray
ray@cis.ohio-state.edu

dplatt@coherent.com (Dave Platt) (07/15/89)

In article <54868@tut.cis.ohio-state.edu> william c ray <ray@cis.ohio-state.edu> writes:

> in a previous article someone says...  'I once knew a fella who could %
> reconstruct color data from a B/W photo, he could read resistor codes on
> b/w photos w/out the color there.  somehow he could actualy see the
> color in the grayscale, because he never guessed and was always right...
> how did he do it?"
>  
> answer... he was a better guesser than you thought...  in any
> color-to-BW scheme, there are multiple hues which will record (generic
> term here, not necc meaning screen graphics) as the same value (shade of
> gray).  ie, if the pigments were right in the bands, several bands could
> have recorded as the exact same value on a print.
> ...
> therefore, as you can see, determining which color is which from the
> grayscale that it records at is an utterly impossible proposition.
> (this means that the fella who could read resistors in B/W was GOOD...)

Well... William's points are on the mark _if_ the problem is one of
identifying arbitrary hues, chosen from the complete RGB colorspace,
from a black&white image of unknown hue->gray mapping behavior.  I'm not
sure that William's arguments rule out the problem as stated by the
original poster, though... _that_ problem is substantially simpler.

I suspect that the color-blind engineer was not simply pulling guesses
out of a hat.  Instead, he was probably depending on a several
simplifying characteristics which greatly reduced the number of possible
choices for each resistor-image.

1) His company had probably standardized on one type of black&white
   film.  Thus, once he had seen a well-populated circuit board, _and_ a
   picture of that same board, he could have memorized the mapping
   between shades-of-gray-as-he-saw-them-on-the-board and
   shades-of-gray-as-he-saw-them-on-the-picture.

2) There are only a limited number of colors used to mark resistors...
   perhaps 15 shades, perhaps as many as 20 (including silver and gold).
   Out of this many shades, there may actually be only a small number of
   "collisions", in which two shades have the same gray-scale
   representation on a specific type of black&white film.

3) The color-coding scheme for resistors is quite general; the commonest
   notation allows for two significant digits of value, a power-of-ten
   stripe, and a precision stripe.  

   However, in practice not all combinations are actually used.  For
   example, you're unlikely to find a 100-ohm resister, a 110-ohm, a
   120-ohm, ... , and a 990-ohm resistor in any real-world component.
   Instead, values that lie within any particular decade (100-1000 ohms,
   1000-10,000 ohms) tend to be drawn from a standard selection of
   "common" values.  I think that there are perhaps 10 or 12
   commonly-used values within any particular decade, rather than 90 or
   so.  This makes a good deal of sense, as the actual precision of
   resistors is often good to only 5% or 10%.  Thus, the likelihood that
   two standard-value color patterns will end up "looking the same" in a
   black&white photograph is not actually all that high.

4) Being an electronics engineer, this man probably had a good
   understanding of common circuit configurations, and might have been
   likely to recognize some circuit configurations simply by looking at
   the component layout on the board.  This might have given him some
   information about the component values that would typically be used
   in that sort of circuit.

So... all told, I think it's well within the bounds of reasonability
that a skilled electronics engineer, who was highly color-blind and thus
already used to recognizing colored objects by their gray-scale values,
could have learned to identify the corresponding photographic gray-scale
values of a relatively small population of resistor-codes under the
conditions that have been described.
-- 
Dave Platt    FIDONET:  Dave Platt on 1:204/444        VOICE: (415) 493-8805
  UUCP: ...!{ames,sun,uunet}!coherent!dplatt     DOMAIN: dplatt@coherent.com
  INTERNET:   coherent!dplatt@ames.arpa,  ...@uunet.uu.net 
  USNAIL: Coherent Thought Inc.  3350 West Bayshore #205  Palo Alto CA 94303

root@cca.ucsf.edu (Systems Staff) (07/15/89)

In article <20722@hodge.UUCP>, jdm@hodge.UUCP (jdm) writes:
> 
> In a company I onced worked for there was a guy who could
> look at a black and white photograph of a prinited circuit board
> and read the color codes on the resistors, capacitors, wires, etc.
> ...
> I could not read them with 100% accuracy like
> this guy could.
> ...
> It turned out that this guy was color blind in such a way that
> he could see colors in levels of gray.

It seems quite possible that his spectral sensitivity curve was
a reasonable match for that of the film being used so the picture
was pretty much what he ordinarily saw.

That would account for his (effortless?) accuracy.

 Thos Sumner       Internet: thos@cca.ucsf.edu
 (The I.G.)        UUCP: ...ucbvax!ucsfcgl!cca.ucsf!thos
                   BITNET:  thos@ucsfcca

 U.S. Mail:  Thos Sumner, Computer Center, Rm U-76, UCSF
             San Francisco, CA 94143-0704 USA

OS|2 -- an Operating System for puppets.

#include <disclaimer.std>

jbm@eos.UUCP (Jeffrey Mulligan) (07/17/89)

jdm@hodge.UUCP (jdm) writes:


>In a company I onced worked for there was a guy who could
>look at a black and white photograph of a prinited circuit board
>and read the color codes on the resistors, capacitors, wires, etc.
>I could look at the same photograph and make an educated guess
>of what the colors were based on the intensity of the gray levels
>and the most likely color combinations that would occur on a
>PC board, but I could not read them with 100% accuracy like
>this guy could.

>It turned out that this guy was color blind in such a way that
>he could see colors in levels of gray.  Apparently they were the
>correct colors for he never seemed to need to guess or deduce.
>He actually saw those colors on the B&W photograph.

Note that there are several types of "color blindness," including
red-blindness (protanopia) and green-blindness (dueteranopia).
For a protanope, reds will look dark, and greens light, while
for a deuteranope the opposite correlation between hue and
lightness will hold.  

Each type of photographic film has it's own spectral sensitivity;
some films are insensitive to red (and can therefore be handled under
a safelight) while others must be handled in total darkness.
Naturally, it is the goal of the film manufacturer to make
the film's spectral sensitivity correspond as closely as possible
to the normal eye's luminosity function; if your color-blind friend
could correctly read the resistor values from the photograph,
however, it was a lucky combination of circumstances.

> Now I am
>wondering "just what are the correlations between intensity
>(levels of gray) and color (either RGB or HSI)"?

There are no bright browns or dark yellows.  Other than that
there are no correlations imposed by nature, although in any
given scene or image there are bound to be some correlations.

>Reducing the Hue and Saturation in a photograph would leave only
>a gray level picture of the intensities.  How would one use such
>an intensity scale to reconstruct the orginal color of the 
>photograph using either RGB or HSI?

Not possible from a methematical standpoint.  My guess is that
for film colorization, a human operator just picks whatever colors
he thinks would look nice.


Jeff Mulligan


-- 

	Jeff Mulligan (jbm@aurora.arc.nasa.gov)
	NASA/Ames Research Ctr., Mail Stop 239-3, Moffet Field CA, 94035
	(415) 694-6290