Creating Masks on Fungal Hyphae Images

Hello everyone, this is probably something easy, but i simply cant manage to do it :confused:

I need to draw lines on top of fungal hyphaes (like the ones in the pics) and create masks from this lines i drawn… I will need to export this masks so i can use it on another program.

Thanks for your attention

Glomus sp. 3 Rhizophagus clarus 2 Rhizophagus intraradices 3


For the first photo.
20200331_Hyphes fongiques

run("Subtract Background...", "rolling=50 light");
run("Unsharp Mask...", "radius=5 mask=0.60");
//setThreshold(0, 178);
setOption("BlackBackground", true);
run("Convert to Mask");
1 Like

Hi @Mathew

Yeah, this i was able to do, but this method simply misses too much information, and since i have images that have way more complex hyphae networks, i think i will leave even more information behind… Thats why im trying to find a method where i can draw everything that i want to appear in my mask

Thanks for the help! :smiley:

Drop one these complex images.
We can then consider a method.



Sure!Glomus sp. 4 Rhizophagus intraradices 3 Rhizophagus intraradices

1 Like


If you want this then you have to use the plugin: Ridge detection

But it will only work with “.tif” or “.png” images.
With “.jpeg” you will have difficulties.

1 Like

I want to manually draw every single line that will be present in my mask. Do i still need the Ridge detection plugin? I was trying to draw with the pencil/brush options in FIJI, but none of them allowed me to export the mask of the actual drawn lines.

Ridge detection works well!

20200331_Hyphes fongiques_3

If you want to draw them by hand then you will have to do: Edit / Selection / roiManager (“Add”);

1 Like

Thank you very much @Mathew

I will def. take a look at this ridge detection method. Could u please share the configurations u used to generate these images?



You will find the “Ridge Detection” plugin here:


1 Like

@Mathew thank you very much :smiley:

Hey @Mathew i was wondering, is there any ways i can select the multiple lines i want to delete?

e.g in the image u did it and it selected some traces in the plant root… Can i select those and delete them?

1 Like


Copy and paste does not work here. The shadow of the root …

I hope that you will advance in your work.

run("Duplicate...", " ");
run("Ridge Detection", "line_width=3.5 high_contrast=230 low_contrast=87 darkline add_to_manager method_for_overlap_resolution=NONE sigma=1.51 lower_threshold=0.85 upper_threshold=5.78 minimum_line_length=0 maximum=0");type or paste code here


1 Like

Excuse me if I interupt, you can also make all the markings and any other notes etc. Then Plugins>Utilities>Capture image and use that.