Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: machine vision-Color Matching
Date: Wed, 27 Feb 2008 17:56:03 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 82
Message-ID: <fq487j$jf9$1@fred.mathworks.com>
References: <fpgn52$9ij$1@fred.mathworks.com> <fpjlk1$3ho$1@fred.mathworks.com> <fq4372$hem$1@fred.mathworks.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1204134963 19945 172.30.248.37 (27 Feb 2008 17:56:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 27 Feb 2008 17:56:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:454080



"Vihang Patil" <vihang_patil@yahoo.com> wrote in message 
<fq4372$hem$1@fred.mathworks.com>...
> "John D'Errico" <woodchips@rochester.rr.com> wrote in 
> message <fpjlk1$3ho$1@fred.mathworks.com>...
> 
> 
> > Try changing the blue pixel a bit.
> > 
> > [iscolor,cn] = fuzzycolor([60 100 220]/255,'all');cn{find
> (iscolor)}
> > ans =
> > blue
> > 
> > Still blue, no problems. Find fuzzycolor on
> > the file exchange.
> > 
> > 
> http://www.mathworks.com/matlabcentral/fileexchange/loadFil
> e.do?
> > objectId=12326&objectType=FILE
> > 
> > HTH,
> > John
> 
> Hello John
> I tried your fuzzycolor, its good, but I think it requires 
> a lot of tweaking too
> for example
> [iscolor,cn] = fuzzycolor([88 110 255]/255,'all');cn{find
> (iscolor)}
> 
> I get no color whereas it is very much blue to me, which 
> you can see from the code below. 
> 
> new = im2uint8(ones([128 128 3]));
> new(:,:,1) = 88;
> new(:,:,2) = 110;
> new(:,:,3) = 255;
> figure,imshow(new);
> 
> I think I will need to add this into the fuzzycolor's 
> database. I am still working on it. Probably you can 
> through more insight on it.
> 
> Vihang

Yes, I may have missed some blues when I built
the database. As I recall, I did try to provide an
ability to add to or change the database.

A problem is that what I considered to be a blue,
on MY monitor, may not always coincide with
others opinion of a blue. There are several issues
of metamerism here to deal with. If your monitor
is set up with a higher or lower color temperature,
then blues might change. Or suppose one of us
is moderately color blind, perhaps protoanomalous
(red-green) or even tritananomalous (yellow-blue).
Even a minor amount of such an effect can influence
how you might see colors differently from me. Since
different people can have subtly different pigments
in their cones, they can see colors differently even
if not color blind at all.

These issues are why I called it fuzzy color. The
boundaries of a color name region will be both
irregular and fuzzy. In fact, some color name
regions may even overlap, i.e., colors near the
boundary of two color names like yellow/green,
might be arguably both yellow and green.

For your work, a simple solution is to build/modify
the database for your own eyes & monitor. Ask if
you have questions. I'd have to revisit the code,
but it was not hard to do using the buildfuzzyluts
function that I provided. The idea is it pops up
a series of color planes, then you encircle those
colors which satisfy your colorname with a
polygon in each plane.

John