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 12:09:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <gr4u8t$hdv$1@fred.mathworks.com>
References: <gr4gga$d84$1@fred.mathworks.com> <gr4s5d$3lf$1@fred.mathworks.com> <gr4svl$paf$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 1238760541 17855 172.30.248.37 (3 Apr 2009 12:09:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 3 Apr 2009 12:09:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1477385
Xref: news.mathworks.com comp.soft-sys.matlab:530013


"Husam Aldahiyat" <numandina@gmail.com> wrote in message <gr4svl$paf$1@fred.mathworks.com>...
> "Image Analyst" <imageanalyst@mailinator.com> wrote in message <gr4s5d$3lf$1@fred.mathworks.com>...
> > "Husam Aldahiyat" <numandina@gmail.com> wrote in message <gr4gga$d84$1@fred.mathworks.com>...
> > > Hello,
> > > 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.
> > ------------------------------------------------------------------
> > Say you posted it somewhere.  Do you think you might get better answers?
> > All I can say at this point is to try something like watershed segmentation, or an edge detector (such as Sobel) followed by a morphological closing operation.  You'll also need bwlabel and regionprops in the image processing toolbox.
> > Regards,
> > ImageAnalyst
> 
> The pictures are like this one:
> http://img8.imageshack.us/img8/1272/200903153435.jpg
> 
> I've read the help and tried some things but still having trouble.

I'm not well versed in the IPT but the thresholds I impose count the spot as one part with the wing. 
Any help is appreciated.