Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Detecting spots on a butterfly
Date: Fri, 3 Apr 2009 19:44:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <gr5ou1$qna$1@fred.mathworks.com>
References: <gr4gga$d84$1@fred.mathworks.com> <futBl.41$TD1.22@newsfe18.iad>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1238787841 27370 172.30.248.38 (3 Apr 2009 19:44:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 3 Apr 2009 19:44:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1477385
Xref: news.mathworks.com comp.soft-sys.matlab:530153


Walter Roberson <roberson@hushmail.com> wrote in message <futBl.41$TD1.22@newsfe18.iad>...
> Husam Aldahiyat wrote:
> 
> > Say I have a picture of a butterfly with black spots on its wings, what is a good way
> > to create an algorithm that takes the picture as input and give the location and/or
> > number of spots as output?
> > The spots aren't circular.
> 
> I had a look at the image you supplied in a later posting, and it appeared to me that
> the number of spots was beyond any easy counting, and it appeared to me that there were
> spots that were smaller than the resolution of the image, especially near the body of
> the butterfly. This will make the problem quite difficult -- unless, that is, you place
> some kind of minimum size as to what is to be considered a "spot".

No, no. The spots in interest are the big black thresholdy ones. Each butterfly has either two or four spots only. Some problems occur when I try the dark coloured butterfliies (black spots on grey wings) but things are managable for the most part. 

I have a question: how can I threshold channels? I only know the bw function. Or is it done manually by playing around with the matrix resulting from imread()?