-
Notifications
You must be signed in to change notification settings - Fork 48
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
Using Distance Transform Watershed without a GUI / UI #79
Comments
Thanks, @satorstefan for bringing this to our attention! While we create a public method for that and publish a new release, you may want to write in your code the few lines equivalent to the process in that plugin: |
Hello Ignarcio, For now it seems it also works to set: System.setProperty("java.awt.headless", "false"); But I struggle to get a binary image out of my greyscale image. So far I tried:
and I also see that |
To binarize an image, you can use our own method from the Threshold class: https://github.com/ijpb/MorphoLibJ/blob/master/src/main/java/inra/ijpb/segment/Threshold.java#L57 |
Hello Ignarcio, I will try your approach. What I did try so for seems to "work", but the image result.png is just the unchanged binary that I put in.
|
@iarganda with your hint I could implement the algorithm. I have one last question. Is there a easy way to give each object its own color like shown in the picture on the right here: Best regards |
Hi Stefan, best, |
Hello David,
I would like to use MorphoLibJ without any UI. For the moment I am focused on DistanceTransformWatershed().
Currently it seems to me the code assumes a UI is present.
Could you add a constructor to DistanceTransformWatershed() so I can pass all mandatory arguments?
Or using some sort of builder pattern for DistanceTransformWatershed() would also be nice.
What I tried, but it did not work because of java.awt.HeadlessException: null:
The text was updated successfully, but these errors were encountered: