Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!38g2000yqr.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: outer perimeter binary blobs - vectorisation
Date: Tue, 8 Sep 2009 18:27:53 -0700 (PDT)
Organization: http://groups.google.com
Lines: 48
Message-ID: <a13c8c25-9f76-4d89-82a7-7bc796c4e788@38g2000yqr.googlegroups.com>
References: <3bab9014-5398-4dd4-b6a1-8c4b49e19dac@f33g2000vbm.googlegroups.com> 
	<eb8c9bee-de8e-4a02-affa-8ea268984649@p23g2000vbl.googlegroups.com> 
	<58f50640-4469-4369-bb09-7dc1cc95b731@x37g2000yqj.googlegroups.com> 
	<c6e04b9e-c0f8-4a98-9c61-e856ded8ecdb@t2g2000yqn.googlegroups.com>
NNTP-Posting-Host: 75.186.70.56
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1252459673 18529 127.0.0.1 (9 Sep 2009 01:27:53 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 9 Sep 2009 01:27:53 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 38g2000yqr.googlegroups.com; posting-host=75.186.70.56; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
	GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 
	3.5.21022; AskTB5.5),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:569118


On Sep 8, 8:04 pm, Brendan <brendandetra...@yahoo.com> wrote:
> Thanks for the answer.
>
> I am trying replicate a cloud masking paper in which edge pixels are
> determined by thresholding cluster shade. The paper then compares the
> mean pixel value for each edge against the mean pixel value for each
> interior. My starting point is a bitmap of unsorted edge pixels. I
> think I am stuck with looping unless I use the inner perimeter,
> however this will disqualify small blobs.
-------------------------------------------------------------------------------------------------------------
Brendan:
I thought your starting point was the labeled image like you said in
your first post.  Well either way, I just don't see how looping over
individual blobs is necessary.  You can process the whole image just
by doing what I said.  The only way that this could be considered
looping is if you write the erosion routine by yourself and by looping
you mean that you raster scan over every pixel in the image (which is
a nested for loop) and then scan an n-by-n window in there (another
nested for loop).  but I just can't understand how you'd need to do
looping over blobs like this
for blobNumber = 1 : totalNumberOfBlobs
   % Extract the portion of the image that is the blob into a small
sub-image.
    % process that sub image
end
I just don't think you need to do this.  You CAN but I believe it's
unnecessary and may take longer.  imerode() may have the 4 nested for
loops internally but as far as you're concerned, it's a one line
function call.

I also don't see why you say that subtracting the eroded image from
the original image will "disqualify" small blobs.  The outlines of the
small blobs will be there using that algorithm even if they are only
1, 2, 3, etc. pixels big.  Not sure what you mean by disqualify as
this will get their outlines.

And if you want the boundaries as separate objects instead of a binary
image, just use bwboundaries() on the binary image like I said.

But your description of the "cloud masking paper" didn't sound like a
pure binary operation - it sounded like it had some candidate edge
pixels (a binary image found by some preprocessing) and then it's
trying to refine whether an edge pixel in that binary image really IS
a true edge pixel by doing some gray scale processing on the original
image.
Regards,
ImageAnalyst