Path: news.mathworks.com!not-for-mail
From: "John D'Errico" <woodchips@rochester.rr.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: find maximum radius of the object
Date: Wed, 4 Nov 2009 12:21:01 +0000 (UTC)
Organization: John D'Errico (1-3LEW5R)
Lines: 24
Message-ID: <hcrrjd$t93$1@fred.mathworks.com>
References: <hcr3vp$hqg$1@fred.mathworks.com> <bb71b75b-868f-4d33-9f94-0ed1fc156d75@s15g2000yqs.googlegroups.com>
Reply-To: "John D'Errico" <woodchips@rochester.rr.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 1257337261 29987 172.30.248.35 (4 Nov 2009 12:21:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 12:21:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869215
Xref: news.mathworks.com comp.soft-sys.matlab:582341


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <bb71b75b-868f-4d33-9f94-0ed1fc156d75@s15g2000yqs.googlegroups.com>...
> Once you have your object binarized, use bwboundaries() to get the
> boundary coordinates.
> 
> Then use bwconncomp (or bwlabel) and regionprops() to get the
> centroid.
> 
> Then just get the distance between every boundary point to the
> centroid for every object, keeping track of the max distance.
> 
> This demo may help:
> http://www.mathworks.com/matlabcentral/fileexchange/25157

Of course, the distance to the centroid may not be
a good measure of the size of an object.

You might use a minimal bounding circle instead.
Identify the points, and then call minboundcircle,
found on the file exchange.

http://www.mathworks.com/matlabcentral/fileexchange/13643

HTH,
John