Hi,
we are using the implementation of MSER from the imglib2 library for image segmentation. Obviously it works for one-channel grayscale images and also for multi-channel images. However, we could not figure out what exactly happens on the multi-channel images. From the source code we got at least the impression that there is no special color MSER or something similar implemented, is that correct? And if so, is there any documentation or other help available (exceeding the comments in the source code) where we could find detailed information on how imglib2 handles multi-channel images in extracting an MSER tree? Thanks in advance and best regards, Birgit P.S.: If this is not the right mailing list for asking such questions, please let me know where to better post them. ------------------------------------------------------------------------ Dr. rer. nat. Birgit Moeller Pattern Recognition & Bioinformatics Institute of Computer Science / Faculty of Natural Sciences III Martin Luther University Halle-Wittenberg office: Room 4.12 phone: +49(0)345-55-24745 fax: +49(0)345-55-27039 snail mail: Von-Seckendorff-Platz 1, 06120 Halle / Saale (Germany) e-mail: [hidden email] www: http://www.informatik.uni-halle.de/moeller/ ------------------------------------------------------------------------ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Brigit,
I am not 100% sure, Tobias Pietzsch is the developer of the plugin (I cc’ed him on the reply). But my best guess is that it treats a multicolor image as an n+1 dimensional image, i.e. a 3d image with multiple channels is seen as 4d image. So the segmentation is done in 4d dimensions, which is maybe not what you want? One solution would be to instantiate as many “Views” as you have colors: RandomAccessible singleColor = Views.hyperSlice( image, dimension, position ); // e.g. ( img, 3, 0 ), ( img, 3, 1 ), ( img, 3, 2 ) to get all three channels in a 3d+c image - all indices start with 0 // assuming channels are in the dimension with index 3, i.e. XYZC This reduces the dimensionality by 1 across the channel dimension, leaving you with as many 3d images as you have channels . Then run the algorithm independently on each of them (of course this can be done in a loop by querying the size of the channel dimension, in ImageJ that uses by default dimension order XYCZ this would be: nchannels = image.dimension( 2 )). Note, views are are virtual constructs, so the data is not copied. Hope this helps! Cheers, Stephan --- Dr. Stephan Preibisch HFSP Fellow Robert H. Singer / Eugene Myers lab Albert Einstein College of Medicine / HHMI Janelia Farm / MPI-CBG email: [hidden email] <mailto:[hidden email]> / [hidden email] <mailto:[hidden email]> / [hidden email] <mailto:[hidden email]> web: http://www.preibisch.net/ <http://fly.mpi-cbg.de/preibisch> > On Nov 21, 2014, at 8:06 , Birgit Möller <[hidden email]> wrote: > > Hi, > we are using the implementation of MSER from the imglib2 library for image segmentation. Obviously it works for one-channel grayscale images and also for multi-channel images. However, we could not figure out what exactly happens on the multi-channel images. From the source code we got at least the impression that there is no special color MSER or something similar implemented, is that correct? And if so, is there any documentation or other help available (exceeding the comments in the source code) where we could find detailed information on how imglib2 handles multi-channel images in extracting an MSER tree? > Thanks in advance and best regards, > > Birgit > > P.S.: If this is not the right mailing list for asking such questions, please let me know where to better post them. > > ------------------------------------------------------------------------ > Dr. rer. nat. Birgit Moeller > > Pattern Recognition & Bioinformatics > Institute of Computer Science / Faculty of Natural Sciences III > Martin Luther University Halle-Wittenberg > > office: Room 4.12 > phone: +49(0)345-55-24745 > fax: +49(0)345-55-27039 > snail mail: Von-Seckendorff-Platz 1, 06120 Halle / Saale (Germany) > e-mail: [hidden email] > www: http://www.informatik.uni-halle.de/moeller/ > ------------------------------------------------------------------------ > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Birgit Möller
Hi Stephan,
thanks for your quick reply and your explanations, they solved my problems. Before I missed the point how ImgLib2 handles multiple dimensions and channels in MSER detection in general. Now I understood that the MSER component trees are also multi-dimensional depending on the number of dimensions/channels of the processed images. I was not aware of that before - so this is actually the answer to my question. Thanks again! :-) Best regards, Birgit On Fri, 21 Nov 2014 09:03:00 -0500, Stephan Preibisch <[hidden email]> wrote: >Dear Brigit, > >I am not 100% sure, Tobias Pietzsch is the developer of the plugin (I cc’ed him on the reply). But my best guess is that it treats a multicolor image as an n+1 dimensional image, i.e. a 3d image with multiple channels is seen as 4d image. So the segmentation is done in 4d dimensions, which is maybe not what you want? One solution would be to instantiate as many “Views” as you have colors: > >RandomAccessible singleColor = Views.hyperSlice( image, dimension, position ); >// e.g. ( img, 3, 0 ), ( img, 3, 1 ), ( img, 3, 2 ) to get all three channels in a 3d+c image - all indices start with 0 >// assuming channels are in the dimension with index 3, i.e. XYZC > >This reduces the dimensionality by 1 across the channel dimension, leaving you with as many 3d images as you have channels . Then run the algorithm independently on each of them (of course this can be done in a loop by querying the size of the channel dimension, in ImageJ that uses by default dimension order XYCZ this would be: nchannels = image.dimension( 2 )). Note, views are are virtual constructs, so the data is not copied. > >Hope this helps! > >Cheers, >Stephan > >--- > >Dr. Stephan Preibisch >HFSP Fellow >Robert H. Singer / Eugene Myers lab > >Albert Einstein College of Medicine / HHMI Janelia Farm / MPI-CBG > >email: [hidden email] <mailto:[hidden email]> / [hidden email] <mailto:[hidden email]> / [hidden email] <mailto:[hidden email]> >web: http://www.preibisch.net/ <http://fly.mpi-cbg.de/preibisch> >> On Nov 21, 2014, at 8:06 , Birgit Möller <[hidden email]> wrote: >> >> Hi, >> we are using the implementation of MSER from the imglib2 library for image segmentation. Obviously it works for one-channel grayscale images and also for multi-channel images. However, we could not figure out what exactly happens on the multi-channel images. From the source code we got at least the impression that there is no special color MSER or something similar implemented, is that correct? And if so, is there any documentation or other help available (exceeding the comments in the source code) where we could find detailed information on how imglib2 handles multi-channel images in extracting an MSER tree? >> Thanks in advance and best regards, >> >> Birgit >> >> P.S.: If this is not the right mailing list for asking such questions, please let me know where to better post them. >> >> ------------------------------------------------------------------------ >> Dr. rer. nat. Birgit Moeller >> >> Pattern Recognition & Bioinformatics >> Institute of Computer Science / Faculty of Natural Sciences III >> Martin Luther University Halle-Wittenberg >> >> office: Room 4.12 >> phone: +49(0)345-55-24745 >> fax: +49(0)345-55-27039 >> snail mail: Von-Seckendorff-Platz 1, 06120 Halle / Saale (Germany) >> e-mail: [hidden email] >> www: http://www.informatik.uni-halle.de/moeller/ >> ------------------------------------------------------------------------ >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > >-- >ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |