Hello Yuekan, You're using this method:
https://ijpb.github.io/MorphoLibJ/javadoc/inra/ijpb/watershed/Watershed.html#computeWatershed(ij.ImagePlus,ij.ImagePlus,ij.ImagePlus,int,boolean,double,boolean) Therefore, the "imp" image should be the input image where the watershed method will take the pixel values from. This is usually a "gradient" image where the borders of the objects to be segmented are highlighted. Is this your case? You can maybe post here the images you used? Cheers! On Thu, Aug 6, 2026 at 8:06 PM Yuekan Jiao <[email protected]> wrote: > Hi > > I am trying to use MorphoLibJ Marker-controlled Watershed / Interactive > Marker-controlled Watershed in my Java code. Using installed MorphoLibJ it > works well, for example, on the gradient (I use "Find Edges") of Gaussian > filtered image blobs. With my own code, however, I get an empty image. The > command in my code is: > > ImagePlus impSeg = Watershed.computeWatershed(imp, impMarkers, null, 4, > true, 0, true); > > imp - the Gaussian filtered image blobs with markers drawn using > "Multi-point" tool > impMarkers - the binary image of the markers > > I also tried some similar functions included in class Watershed, but could > not get it to work. > > Could anyone tell me what I am missing? Thank you. > > Yuekan > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- Ignacio Arganda-Carreras, Ph.D. Ikerbasque Research Associate Professor Departamento de Ciencias de la Computacion e Inteligencia Artificial Facultad de Informatica, Universidad del Pais Vasco Paseo de Manuel Lardizabal, 1 20018 Donostia-San Sebastian Guipuzcoa, Spain Phone : +34 943 01 73 25 Website: https://cvpd.github.io/author/ignacio-arganda-carreras/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
