Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Detection of pixels
Date: Thu, 1 Nov 2007 09:56:38 +0000 (UTC)
Organization: STFC Rutherford Appleton Laboratory
Lines: 37
Message-ID: <fgc7sl$mjp$1@fred.mathworks.com>
References: <fgas35$dqm$1@fred.mathworks.com> <fgb8uo$jie$1@fred.mathworks.com> <fgba8v$85l$1@fred.mathworks.com> <fgbemv$kc3$1@fred.mathworks.com> <fgbhtn$12n$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1193910998 23161 172.30.248.37 (1 Nov 2007 09:56:38 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 1 Nov 2007 09:56:38 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 968489
Xref: news.mathworks.com comp.soft-sys.matlab:435596



"Christian " <christian_zepeda_e@yahoo.com.ar> wrote in 
message <fgbhtn$12n$1@fred.mathworks.com>...
> Thanks ... Try your way, I think will be useful.
> 
> Christian
> 

You will almost certainly benefit from converting your rgb 
image into an intensity independent image (this is an image 
which only displays colour information, where the 
variations of illumination have been removed e.g. a pixel 
whose rgb values are 128 128 64 is the same colour as a 
pixel whose rgb values are 64 64 32 the difference is the 
second one is simply darker). 

There are several options open to you, for example 

1) Convert your image into HSV and set up your colour 
filter using the values taken from the HS planes, ignoring 
the V plane (i.e. you have a 2 plane image). 

2) Convert your image into normalized rgb. The 
approximation functions
 
Redness(r,g,b) = r/(r+g+b)
Greenness(r,g,b) = g/(r+g+b)
Blueness(r,g,b) = b/(r+g+b)

applied to every image pixel will do the job.

Then apply the techniques described by Pete should now 
perform substantially better.

Regards

Dave Robinson