Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!f33g2000vbm.googlegroups.com!not-for-mail
From: Brendan <brendandetracey@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: outer perimeter binary blobs - vectorisation
Date: Tue, 8 Sep 2009 05:47:41 -0700 (PDT)
Organization: http://groups.google.com
Lines: 14
Message-ID: <3bab9014-5398-4dd4-b6a1-8c4b49e19dac@f33g2000vbm.googlegroups.com>
NNTP-Posting-Host: 24.222.3.178
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1252414061 24666 127.0.0.1 (8 Sep 2009 12:47:41 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 8 Sep 2009 12:47:41 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f33g2000vbm.googlegroups.com; posting-host=24.222.3.178; 
	posting-account=B-TRNQoAAACbFTAQWrEB2ZKtNl2Jbw6S
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; 
	.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; 
	.NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 
	3.5.30729),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:568958


I have a binary image with many (~2000) blobs. Each blob is separated
by at least two pixels. The image has been despurred and cleaned with
bwmorph and bwlabeled. I need to extract the outer perimeter(1 pixel
width) of each blob and give it the same label as its blob. This is
easily done by looping through the blobs, and taking the difference of
the blob and the blob enlarged by one pixel. Easily done but very
slow.

The above would extract the 8-connected outer perimeter. How would I
extract the 4-connected perimeter?

Any suggestions to vectorise or otherwise speed up this operation?

Thanks