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: Tue, 22 Sep 2009 23:14:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 30
Message-ID: <h9blnq$or4$1@fred.mathworks.com>
References: <h96qbb$ug$1@fred.mathworks.com> <h96r1t$emm$1@fred.mathworks.com> <3aeaa406-d937-4807-a397-4e46c2ea46ec@s6g2000vbp.googlegroups.com> <h99d10$6ge$1@fred.mathworks.com> <h9a9no$jni$1@fred.mathworks.com>
Reply-To: "Yi " <heyinba0904@hotmail.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 1253661242 25444 172.30.248.37 (22 Sep 2009 23:14:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Sep 2009 23:14:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 506617
Xref: news.mathworks.com comp.soft-sys.matlab:572201


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



"Image Analyst" <imageanalyst@mailinator.com> wrote in message <h9a9no$jni$1@fred.mathworks.com>...
> See my tutorial and adapt it to ask regionprops() for the EulerNumber:
> 
> 'EulerNumber' &#8212; Scalar that specifies the number of objects in the region minus the number of holes in those objects. This property is supported only for 2-D input label matrices. regionprops uses 8-connectivity to compute the EulerNumber measurement. To learn more about connectivity, see Pixel Connectivity.
> 
> This should get you what you asked for.
> Good luck,
> ImageAnalyst