Subject: Re: Detecting colored objects
Date: Wed, 30 Oct 2002 16:37:57 -0500
NNTP-Posting-Date: 30 Oct 2002 21:38:00 GMT
X-Mailer: Mozilla 4.78 [en] (Win95; U)
Let me share 2 final thoughts.
Harry Dellamano's initial query:
> I would like to candle eggs that have 11 possible solid colors rolling down
> an assembly line. ... What is the best photo
> detector and light source for this job??
1. One of my suggestions was to use LEDs as narrow-band sources in order
to select out multiple wavelength bands. If we PUT THAT COMPLETELY
ASIDE, and assume some kind of "normal" sensors that detect Red, Green,
and Blue, then it is important what you use for a "white" light. The pitfalls
a. Traditional fluorescent lights such as Cool White are deficient in both
red and green. They work against you in separating one color from
another. See my web page, http://www.jimworthey.com .
b. A simple incandescent lamp is broad-band in a sense, but is in fact
yellowish, so it will tend to give weak stimulation to your blue sensor. You
can crank up the gain on that sensor, or use a bluish filter or whatever,
you need to be aware of the issue.
c. In addition to item a, there is a temptation to use large low-luminance
sources such as a bank of 4-foot fluorescent tubes. The reflection of this
source becomes a "veiling reflection" that is too large for your sensors to
The ultimate bluish small-area source would be a Solux spot or flood; see
http://www.soluxtli.com/ . A compact three-band fluorescent lamp would
give good color discrimination and you can position it to avoid the veiling
reflection. You could also assemble a 3-band lamp from red, green, and blue
LEDs , with target wavelengths of 610, 540, and 450 nm. I can't speak to
details or costs for LEDs, but they would give you long life and you'd
know what wavelengths you are using. Again, see my website for a cram
course in lighting for color vision.
2. Suppose that you have 3 sensors and some appropriate lighting, then
the problem is to discriminate one signal from another. I can well imagine
that some vendor has a system that you can "train" without delving into
the details too deeply. If you are not using such a system, or if you want
to become that vendor, then you have a problem of identifying a color
as matching one of the 11 prototypes. Each prototype is a vector
in a 3-space. A confounding issue is that you may suffer some variation
in overall lightness due to uncertainty in the position of the workpiece.
The "right" color is the one for which the measurement on the
prototype has the least vector difference from the measurement on
the workpiece. If you are working with a big amplitude variation,
you better hope that the prototypes point different directions in color
space, and you can work with direction cosines rather than vector
differences. Note that a few 10's or 100's of floating point operations
will take some microseconds in a PC, not a major source of delay.
This is a rational analysis that may overlook some subtlety in your