Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Watershed #299

Closed
Pantelispanka opened this issue Nov 25, 2021 · 2 comments
Closed

Problem with Watershed #299

Pantelispanka opened this issue Nov 25, 2021 · 2 comments

Comments

@Pantelispanka
Copy link

Pantelispanka commented Nov 25, 2021

I am using ImageJ in a web application where i have to count some particles.
There when i use the watershed the algorithm segments the background and not the particles.

The imports


import ij.ImagePlus;

import ij.plugin.filter.EDM;

import ij.process.AutoThresholder;

The code goes


            ij.plugin.filter.EDM edm = new EDM();

            this.imagePlus.getProcessor().autoThreshold();

            this.imagePlus.updateAndDraw();

            edm.setup("watershed", this.imagePlus);

            edm.toWatershed(this.imagePlus.getProcessor());

            this.imagePlus.updateAndDraw();

I use autoThreshold because of the 0-255 binary image asked from the watershed algorithm. That alters everything from the pipeline but even though the algorithm returns segmented the background and not the particles

@imagejan
Copy link
Member

This is not an imagej2 issue, I believe.

The best place for questions/issues like these is actually the forum: https://forum.image.sc

@Pantelispanka please try whether changing the Black background option in Process > Binary > Options... helps.

@Pantelispanka
Copy link
Author

Pantelispanka commented Nov 25, 2021

Thanks for pointing that out. I will close the issue and post it on the forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants