|
On Sep 8, 10:27 pm, ImageAnalyst <imageanal...@mailinator.com> wrote:
> 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
If I erode the image, blobs will all merge since they are separated by
two pixels. Sounds like if can decide to define only one pixel as
edge, then life will be easier. My problem, however, remains the same.
I need a common label for a blob boundary and its interior.
|