|
Re: filling holes in blobs quickly [message #30225 is a reply to message #30224] |
Tue, 16 April 2002 02:33   |
anne.martel
Messages: 6 Registered: April 2002
|
Junior Member |
|
|
You could find the connected dark region outside of the bright blobs.
Anything that doesn't belong to that region is either a bright object
or a dark hole completely surrounded by bright pixels.
r = search2d(mask,0,0,0,0)
if(r(0) ge 0) then begin
mask(*)=1
mask(r)=0
endif
This assumes that [0,0] always lies outside a blob.
Anne
dmartin@chaos.ph.utexas.edu (Doug Martin) wrote in message news:<d2bf73f3.0204151417.6e64bf7d@posting.google.com>...
> I'm sure this is a well solved problem, but:
> I'm trying to fill in holes inside of domains (blobs) quickly. The
> domains are in a binary image, and are bright.
>
> Right now, I search for dark regions - the holes (label_region);
> pick out those of a small size (histogram and where);
> and then fill them in (a FOR loop through the where values, since I
> don't know how to get where to compare to every value in a vector).
>
> This is slow, and I strongly suspect there is an intelligent way to do
> this: fill in all dark blobs up to a certain size.
>
> Thanks for any help,
>
> Doug Martin
> University of Texas at Austin
|
|
|
|
Re: filling holes in blobs quickly [message #30291 is a reply to message #30224] |
Wed, 17 April 2002 14:05  |
dmartin
Messages: 5 Registered: April 2002
|
Junior Member |
|
|
the_cacc@hotmail.com (trouble) wrote in message news:<5f9f0a23.0204160150.33d49a69@posting.google.com>...
> DILATE
>
> Not much experience with it, but it seems like a good candidate.
Thanks for all of your suggestions (incl Morph_Close and search2d).
Search2d seems to work well, but is somewhat slow (?), especially when
compared to label_region.
I'm using 5.2.1, so Morph_close isn't on there, but I have been using
a combination of dilate and erode functions to do something similar (I
think).
One problem is that this does fill in small channels.
Does anyone know how to intelligently design structuring elements to
remove round-ish objects only?
Thanks again,
Doug
|
|
|