Path: news.mathworks.com!not-for-mail
From: "Yi " <heyinba0904@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: find Spots in the Image
Date: Wed, 23 Sep 2009 03:28:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 33
Message-ID: <h9c4k2$lab$1@fred.mathworks.com>
References: <h96qbb$ug$1@fred.mathworks.com> <h96r1t$emm$1@fred.mathworks.com> <d0c0f9fb-b8b1-4ef9-aee2-b4af570ed60a@j9g2000vbp.googlegroups.com>
Reply-To: "Yi " <heyinba0904@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1253676482 21835 172.30.248.35 (23 Sep 2009 03:28:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 23 Sep 2009 03:28:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 506617
Xref: news.mathworks.com comp.soft-sys.matlab:572235


Hi ImageAnalyst:
Thank you so much!!! You really help me a lots !!!
and last question, How can i  detect the blobs which touch the image boundary?
Do i need use boundingbox of each blobs? or something else?

thanks ^_^

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <d0c0f9fb-b8b1-4ef9-aee2-b4af570ed60a@j9g2000vbp.googlegroups.com>...
> On Sep 22, 7:14?pm, "Yi " <heyinba0...@hotmail.com> wrote:
> > hi ImageAnalyst
> > i have read your tutorial. this is the code what i learn from your tutorial:
> >
> > % Read in standard MATLAB demo image
> > originalImageX = imread('testImage.JPG');
> > originalImage = rgb2gray(originalImageX);
> > thresholdValue = 1;
> > binaryImage = originalImage < thresholdValue;
> > binaryImage = imfill(binaryImage, 'holes');
> > labeledImage = bwlabel(binaryImage, 8);
> > blobMeasurements = regionprops(labeledImage, originalImage, 'EulerNumber'); ?
> > numberOfBlobs = size(blobMeasurements, 1);
> >
> > after i run this function
> > i got numberOfBlobs = 49 and each of them has a EulerNumber which equal to "1"
> > so i really can not understand the meaning of this result.
> > could you help me and give me some ideas?
> >
> > thanks so much
> ---------------------------------------------------------------------------------
> Your problem was that you called
> binaryImage = imfill(binaryImage, 'holes');
> for some reason.  Why did you do that?  You just filled the holes you
> were hoping to count.