Good day, I would just like to inquire regarding the process to get the
intersection between an original image and its watershed transform image. I did this to my image: invert --> distance transform --> watershed I already have my watershed image but when I try to intersect (Image Calcu --> AND) with my original image, I don't think I get the one that i want...what should i do? thanks! Any help would be greatly appreciated as I am very new in imagej and i want to use it as a major tool in my thesis. thanks! ------------------------------------------------------------------- Christine T. Clarin UP Department of Computer Science Work/Fax: (02) 925-2366 Mobile: (+63917) 482-3606 Email: [hidden email] |
Hmm, what watershed are you using?
The one in my ImageJ (Process->Binary->Watershed) expects a binary image as input and performs distance transform implicitly! The let's say original result of watershed on a gray image, e.g. a distance transformed (binary) image is either a binary image with the bassins surrounded by the watersheds (thin lines) or a labelled image of the bassins (each pixel of one bassin has the bassin number)! If you have a binary image from watershed why to perform an and with which original?. The regions are the areas you expect! Regards Karsten Am 26.01.2007 um 11:54 schrieb Chris Clarin: > Good day, I would just like to inquire regarding the process to get > the > intersection between an original image and its watershed transform > image. > > I did this to my image: invert --> distance transform --> watershed > > I already have my watershed image but when I try to intersect > (Image Calcu > --> AND) with my original image, I don't think I get the one that i > want...what should i do? thanks! > > Any help would be greatly appreciated as I am very new in imagej > and i want > to use it as a major tool in my thesis. thanks! > > ------------------------------------------------------------------- > Christine T. Clarin > UP Department of Computer Science > Work/Fax: (02) 925-2366 > Mobile: (+63917) 482-3606 > Email: [hidden email] Karsten Rodenacker -------------------------------------------------------------------- :-) GSF - Institute of Biomathematics and Biometry D-85758 Oberschleissheim Postfach 11 29 Karsten.Rodenacker_AT_gsf.de | http://ibb.gsf.de/ http://ibb.gsf.de/homepage/karsten.rodenacker/ Voice: +49 89 31873401 | Voicemail/FAX: ..193401 |
On Friday 26 January 2007 12:59, Karsten Rodenacker wrote:
> Hmm, what watershed are you using? > The one in my ImageJ (Process->Binary->Watershed) expects a binary > image as input and performs distance transform implicitly! > The let's say original result of watershed on a gray image, e.g. a > distance transformed (binary) image is either a binary image with the > bassins surrounded by the watersheds (thin lines) or a labelled image > of the bassins (each pixel of one bassin has the bassin number)! The name of that command is somewhat misleading. It should be named "Watershed Separate" instead or something like that. To do a proper watershed transform you need to use Daniel Sage's plugin (there is some other as well). Regards, G. |
In reply to this post by Karsten Rodenacker
Thank you very much for the quick reply. =) i realize that you are right, i
do not need to use "and" as these are indeed the regions that I expect. However, I have a question, if I need to edit this code of watershed which is in process->binary->watershed, where do i get the code? thank you very much! christine On 1/26/07, Karsten Rodenacker <[hidden email]> wrote: > > Hmm, what watershed are you using? > The one in my ImageJ (Process->Binary->Watershed) expects a binary > image as input and performs distance transform implicitly! > The let's say original result of watershed on a gray image, e.g. a > distance transformed (binary) image is either a binary image with the > bassins surrounded by the watersheds (thin lines) or a labelled image > of the bassins (each pixel of one bassin has the bassin number)! > > If you have a binary image from watershed why to perform an and with > which original?. The regions are the areas you expect! > > Regards > Karsten > > Am 26.01.2007 um 11:54 schrieb Chris Clarin: > > > Good day, I would just like to inquire regarding the process to get > > the > > intersection between an original image and its watershed transform > > image. > > > > I did this to my image: invert --> distance transform --> watershed > > > > I already have my watershed image but when I try to intersect > > (Image Calcu > > --> AND) with my original image, I don't think I get the one that i > > want...what should i do? thanks! > > > > Any help would be greatly appreciated as I am very new in imagej > > and i want > > to use it as a major tool in my thesis. thanks! > > > > ------------------------------------------------------------------- > > Christine T. Clarin > > UP Department of Computer Science > > Work/Fax: (02) 925-2366 > > Mobile: (+63917) 482-3606 > > Email: [hidden email] > > Karsten Rodenacker > -------------------------------------------------------------------- :-) > GSF - Institute of Biomathematics and Biometry > D-85758 Oberschleissheim Postfach 11 29 > Karsten.Rodenacker_AT_gsf.de | http://ibb.gsf.de/ > http://ibb.gsf.de/homepage/karsten.rodenacker/ > Voice: +49 89 31873401 | Voicemail/FAX: ..193401 > -- ------------------------------------------------------------------- Christine T. Clarin UP Department of Computer Science Work/Fax: (02) 925-2366 Mobile: (+63917) 482-3606 Email: [hidden email] |
In reply to this post by Gabriel Landini
Hi Gabriel, thanks for you and Karsten's help, I also tried Daniel Sage's
plugin but it gives me a different result with the process->binary->watershed method in imageJ. I understand the result of the latter one better than I understand the result from the plugin. as it is nearer to what i expected. however, I am still torn with what watershed I have to use because the if only i could learn how to get the intersection between the plugin's result and my original image, I could better compare it with my process->binary->watershed result. My problem is that, the basins in process->binary-> result are too few for me (I wonder how I can adjust the threshold) while the one from the plugin is too many. this is why I want to get the intersection. Any ideas on what I should do? thanks! chris On 1/26/07, Gabriel Landini <[hidden email]> wrote: > > On Friday 26 January 2007 12:59, Karsten Rodenacker wrote: > > Hmm, what watershed are you using? > > The one in my ImageJ (Process->Binary->Watershed) expects a binary > > image as input and performs distance transform implicitly! > > The let's say original result of watershed on a gray image, e.g. a > > distance transformed (binary) image is either a binary image with the > > bassins surrounded by the watersheds (thin lines) or a labelled image > > of the bassins (each pixel of one bassin has the bassin number)! > > The name of that command is somewhat misleading. It should be named > "Watershed > Separate" instead or something like that. > To do a proper watershed transform you need to use Daniel Sage's plugin > (there > is some other as well). > Regards, > > G. > -- ------------------------------------------------------------------- Christine T. Clarin UP Department of Computer Science Work/Fax: (02) 925-2366 Mobile: (+63917) 482-3606 Email: [hidden email] |
On Monday 29 January 2007 03:52:44 Chris Clarin wrote:
> I also tried Daniel Sage's > plugin but it gives me a different result with the > process->binary->watershed method in imageJ. Of course, they are different things. I think (not sure) that the Binary>Watershed does something that corresponds to this (please correct if I am wrong): 1. erode blobs to their ultimate point(s) [this is done using the distance transform] 2. dilate the ultimate points without merge, inside the original mask So each particle that has been reduced to more than 1 ultimate point [8 shapes and so on] will be reconstructed as separated blobs, the rest remain unchanged. > I am still torn with what watershed I > have to use because the if only i could learn how to get the intersection > between the plugin's result and my original image, I could better compare > it with my process->binary->watershed result. To get the differences (both binary images) do a image1 XOR image2. > My problem is that, the > basins in process->binary-> result are too few for me (I wonder how I can > adjust the threshold) while the one from the plugin is too many. this is > why I want to get the intersection. To get less basins with Daniel's plugin you can try blurring the image with a gaussian filter before applying the ws. This thread is quite difficult to follow. If you could upload to some website what you are intending to do it would be easier to understand. To get the source code (you asked in a previous message) look in the IJ site, Downloads section. G. |
In reply to this post by Chris Clarin
I do not really understand the problem:
1. watershed applied to a binary image using process->binary- >watershed should have a similar result with Sage watershed applied to inverted distance transform of the binary image! 2. watershed is well-known for oversegmentation. That is just the disadvantage of watershed in general. Smoothing (as in Sage's plugin) is one way to reduce this. Still I am using the watershed applied to grayscale images to divide images (even volumes) into so-called path- connected regions for further evaluation. 3. there are several approaches to merge bassins from watershed to reduce oversegmentation. 4. I suspect that the source of watershed can be found in the ImageJ source. However the Vincent paper is still valid as description. Regards KR Am 29.01.2007 um 04:52 schrieb Chris Clarin: > Hi Gabriel, thanks for you and Karsten's help, I also tried Daniel > Sage's > plugin but it gives me a different result with the > process->binary->watershed method in imageJ. I understand the > result of the > latter one better than I understand the result from the plugin. as > it is > nearer to what i expected. however, I am still torn with what > watershed I > have to use because the if only i could learn how to get the > intersection > between the plugin's result and my original image, I could better > compare it > with my process->binary->watershed result. My problem is that, the > basins in > process->binary-> result are too few for me (I wonder how I can > adjust the > threshold) while the one from the plugin is too many. this is why I > want to > get the intersection. > > Any ideas on what I should do? thanks! > > chris > > On 1/26/07, Gabriel Landini <[hidden email]> wrote: >> >> On Friday 26 January 2007 12:59, Karsten Rodenacker wrote: >> > Hmm, what watershed are you using? >> > The one in my ImageJ (Process->Binary->Watershed) expects a binary >> > image as input and performs distance transform implicitly! >> > The let's say original result of watershed on a gray image, e.g. a >> > distance transformed (binary) image is either a binary image >> with the >> > bassins surrounded by the watersheds (thin lines) or a labelled >> image >> > of the bassins (each pixel of one bassin has the bassin number)! >> >> The name of that command is somewhat misleading. It should be named >> "Watershed >> Separate" instead or something like that. >> To do a proper watershed transform you need to use Daniel Sage's >> plugin >> (there >> is some other as well). >> Regards, >> >> G. >> > > > > -- > ------------------------------------------------------------------- > Christine T. Clarin > UP Department of Computer Science > Work/Fax: (02) 925-2366 > Mobile: (+63917) 482-3606 > Email: [hidden email] Karsten Rodenacker -------------------------------------------------------------------- :-) GSF - Institute of Biomathematics and Biometry D-85758 Oberschleissheim Postfach 11 29 Karsten.Rodenacker_AT_gsf.de | http://ibb.gsf.de/ http://ibb.gsf.de/homepage/karsten.rodenacker/ Voice: +49 89 31873401 | Voicemail/FAX: ..193401 |
Thank you very much for your helpful replies. just an update though, what
I'm trying to do is to evolve programs and therefore what I decided is to use both watershed algorithms and try to make my machine learn what better algorithm to use everytime it encounters an image =) i hope I can pull this off! thanks! On 1/29/07, Karsten Rodenacker <[hidden email]> wrote: > > I do not really understand the problem: > 1. watershed applied to a binary image using process->binary- > >watershed should have a similar result with Sage watershed applied > to inverted distance transform of the binary image! > 2. watershed is well-known for oversegmentation. That is just the > disadvantage of watershed in general. Smoothing (as in Sage's plugin) > is one way to reduce this. Still I am using the watershed applied to > grayscale images to divide images (even volumes) into so-called path- > connected regions for further evaluation. > 3. there are several approaches to merge bassins from watershed to > reduce oversegmentation. > 4. I suspect that the source of watershed can be found in the ImageJ > source. However the Vincent paper is still valid as description. > Regards > KR > Am 29.01.2007 um 04:52 schrieb Chris Clarin: > > > Hi Gabriel, thanks for you and Karsten's help, I also tried Daniel > > Sage's > > plugin but it gives me a different result with the > > process->binary->watershed method in imageJ. I understand the > > result of the > > latter one better than I understand the result from the plugin. as > > it is > > nearer to what i expected. however, I am still torn with what > > watershed I > > have to use because the if only i could learn how to get the > > intersection > > between the plugin's result and my original image, I could better > > compare it > > with my process->binary->watershed result. My problem is that, the > > basins in > > process->binary-> result are too few for me (I wonder how I can > > adjust the > > threshold) while the one from the plugin is too many. this is why I > > want to > > get the intersection. > > > > Any ideas on what I should do? thanks! > > > > chris > > > > On 1/26/07, Gabriel Landini <[hidden email]> wrote: > >> > >> On Friday 26 January 2007 12:59, Karsten Rodenacker wrote: > >> > Hmm, what watershed are you using? > >> > The one in my ImageJ (Process->Binary->Watershed) expects a binary > >> > image as input and performs distance transform implicitly! > >> > The let's say original result of watershed on a gray image, e.g. a > >> > distance transformed (binary) image is either a binary image > >> with the > >> > bassins surrounded by the watersheds (thin lines) or a labelled > >> image > >> > of the bassins (each pixel of one bassin has the bassin number)! > >> > >> The name of that command is somewhat misleading. It should be named > >> "Watershed > >> Separate" instead or something like that. > >> To do a proper watershed transform you need to use Daniel Sage's > >> plugin > >> (there > >> is some other as well). > >> Regards, > >> > >> G. > >> > > > > > > > > -- > > ------------------------------------------------------------------- > > Christine T. Clarin > > UP Department of Computer Science > > Work/Fax: (02) 925-2366 > > Mobile: (+63917) 482-3606 > > Email: [hidden email] > > Karsten Rodenacker > -------------------------------------------------------------------- :-) > GSF - Institute of Biomathematics and Biometry > D-85758 Oberschleissheim Postfach 11 29 > Karsten.Rodenacker_AT_gsf.de | http://ibb.gsf.de/ > http://ibb.gsf.de/homepage/karsten.rodenacker/ > Voice: +49 89 31873401 | Voicemail/FAX: ..193401 > -- ------------------------------------------------------------------- Christine T. Clarin UP Department of Computer Science Work/Fax: (02) 925-2366 Mobile: (+63917) 482-3606 Email: [hidden email] |
Free forum by Nabble | Edit this page |