Login  Register

Fill holes or background

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Fill holes or background

Samuel GRANJEAUD
3 posts
Dear all,

I got a binary image of borders of particules (black borders surrounding
white area, white general background). The borders may be connected, but
I want unconnected area. So, I inverted the image to get white borders
and black holes. Every area should be now be well separated. But, the
background is also black. So I am trying to fill the background with
white. Unfortunately the color fill tool or the wand tool fills/selects
the whole image and don't stop at particules borders. Any idea?

Regards,
Samuel
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Fill holes or background

Gabriel Landini
1783 posts
On Tuesday 30 Nov 2010 10:56:44 you wrote:
> I got a binary image of borders of particules (black borders surrounding
> white area, white general background). The borders may be connected, but
> I want unconnected area. So, I inverted the image to get white borders
> and black holes. Every area should be now be well separated. But, the
> background is also black. So I am trying to fill the background with
> white. Unfortunately the color fill tool or the wand tool fills/selects
> the whole image and don't stop at particules borders. Any idea?

Can you post an image somewhere so people can see what the problem is.
Cheers
G.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Fill holes or background

Samuel GRANJEAUD
3 posts
> On Tuesday 30 Nov 2010 10:56:44 you wrote:
>  
>> I got a binary image of borders of particules (black borders surrounding
>> white area, white general background). The borders may be connected, but
>> I want unconnected area. So, I inverted the image to get white borders
>> and black holes. Every area should be now be well separated. But, the
>> background is also black. So I am trying to fill the background with
>> white. Unfortunately the color fill tool or the wand tool fills/selects
>> the whole image and don't stop at particules borders. Any idea?
>>    
>
> Can you post an image somewhere so people can see what the problem is.
> Cheers
> G.
>
>  
Looking for a similar example in the samples, the blobs.gif brings me
the solution. The filling color tool should be set to 4 connected to
stop at borders of one pixel thick.

Regards,
Samuel
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

filling holes with openings

Franklin Shaffer-2
35 posts
In reply to this post by Samuel GRANJEAUD
I am trying to measure bubble sizes and shapes.  I do an edge detection which creates a white border around the bubble, then I use Fill Holes to fill inside the border.  
 
However, in some cases the border is not completely closed, it has breaks in it.
 
Is there a plugin or macro available that will fill inside a border line if it has some breaks in it?
 
Thanks!
 
 
Senior Research Engineer
USDOE National Energy Technology Laboratory
Computational Science Division
Mail Stop 84-202
626 Cochran's Mill Road
Pittsburgh, PA 15236
 
[hidden email]
Office:  412-386-5964
Cell:  724-970-7262

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Franklin Shaffer.vcf (466 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: filling holes with openings

Volker Baecker
140 posts
Maybe you could try to do a series of dilate operations that would close
your borders, than run the "fill holes" and than erode the same number
of times you dilated before, something like this:

iterations = 5;
run("Options...", "iterations="+iterations+" count=1 edm=Overwrite
do=Nothing");
run("Dilate");
run("Fill Holes");
run("Erode");

On 20/11/12 17:48, Franklin Shaffer wrote:

> I am trying to measure bubble sizes and shapes.  I do an edge detection which creates a white border around the bubble, then I use Fill Holes to fill inside the border.  
>  
> However, in some cases the border is not completely closed, it has breaks in it.
>  
> Is there a plugin or macro available that will fill inside a border line if it has some breaks in it?
>  
> Thanks!
>  
>  
> Senior Research Engineer
> USDOE National Energy Technology Laboratory
> Computational Science Division
> Mail Stop 84-202
> 626 Cochran's Mill Road
> Pittsburgh, PA 15236
>  
> [hidden email]
> Office:  412-386-5964
> Cell:  724-970-7262
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html