Invert and Options problem of Erosion and Dilation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Invert and Options problem of Erosion and Dilation

Mengying
Hi,

I want to improve the partial volume effects problem of my image by Erosion and Dilation. And for my image the target objects are the foreground.

I have the following problems:

(1) Do I need to invert my image to do erosion and expansion (that is to make the target become the background)?

(2) What does “count” in Process/Binary/Options mean? The explanation in the document is:

Count Specifies the number of adjacent background pixels necessary before a pixel is removed from the edge of an object during erosion and the number of adjacent foreground pixels necessary before a pixel is added to the edge of an object during dilation.

 

But I'm confused about the definition. I just found that when count is 1, the image changes greatly, and when count is 8, the image changes very little.

 

Any leads will be appreciate!

Mengying



| |
Mengying Ni
|
|
[hidden email]
|



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Invert and Options problem of Erosion and Dilation

Wayne Rasband-2
> On Jun 26, 2020, at 7:09 AM, Mengying <[hidden email]> wrote:
>
> Hi,
>
> I want to improve the partial volume effects problem of my image by Erosion and Dilation. And for my image the target objects are the foreground.
>
> I have the following problems:
>
> (1) Do I need to invert my image to do erosion and expansion (that is to make the target become the background)?

You do not need to invert the image but you should enable the “Black background” option if your image has a black background.

> (2) What does “count” in Process/Binary/Options mean? The explanation in the document is:

The best way to understand how the binary operators work is to enable “Preview” in the Process>Binary>Options dialog and try the different operators and options.

This topic is also on the Image.sc forum at:
   https://forum.image.sc/t/invert-and-options-problem-of-erosion-and-dilation/39642

-wayne


> Count Specifies the number of adjacent background pixels necessary before a pixel is removed from the edge of an object during erosion and the number of adjacent foreground pixels necessary before a pixel is added to the edge of an object during dilation.
>
> But I'm confused about the definition. I just found that when count is 1, the image changes greatly, and when count is 8, the image changes very little.
>
> Any leads will be appreciate!
>
> Mengying

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