If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Emmanuel Levy
Hello,

I've been trying to identify yeast cells using imageJ (i.e., in the
attached example, the goal would be to have a binary image where all
the area inside of the "dark regions delimiting cells" is black, but
not the black area itself (example shown in "areas_wanted").

Most of the time it works OK but on some images I've got a while halo
around cells that makes things less well defined and more complicated.

- I've tried simple thresholding of course but it's not robust. Here
it doesn't actually work because dark areas delimiting cells are not
"closed", in order to close them, I would need to increase the
threshold so much that that dark lines become too thick.
- I've tried to make the edges stronger,
- I've tried the different segmentations available in Fiji ... but
without success.

I'm not an image expert at all, so perhaps there's something obvious
that I have missed?
Any idea would be very welcome.

Thanks,

Emmanuel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

cells.jpg (7K) Download Attachment
areas_wanted.jpg (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

dscho
Hi Emmanuel,

first of all, please note that your email's subject line might be mistaken
for an indication that all computer vision experts out there are, uhm, not
quite bright because they did not manage to replicate in silico what our
eyes do with ease.

I'd like to suggest humbly that this notion is not quite fair, for a
number of reasons:

- it took millions of years to develop eyes,

- what your eyes see is similar, but not quite identical to what my eyes
  see, so it is an ill-posed problem, and

- very often, what you think you see is not quite what you actually see.

As point in favor of that last statement:

On Sat, 9 Mar 2013, Emmanuel Levy wrote:

> I've been trying to identify yeast cells using imageJ (i.e., in the
> attached example, the goal would be to have a binary image where all
> the area inside of the "dark regions delimiting cells" is black, but
> not the black area itself (example shown in "areas_wanted").

Your mind automatically closes those regions. But they are not closed at
all!

Furthermore, your mind automatically rejects the fainter, parallel
delineations because it is biased to detect simple geometric shapes. But
you see those delineations, yet they should be rejected.

> Most of the time it works OK but on some images I've got a while halo
> around cells that makes things less well defined and more complicated.

Exactly. And that halo is very much "what your eyes can see" but what your
mind processes away, given a natural bias combined with additional
knowledge.

So the implied suggestion that the problem at hand is trivial is
incorrect. In reality, the problem is complicated by the very fact that
the analysis requires *substantially* more than what the eyes actually
see: it requires a model to fit to the observed data.

Now, you can do something about this without becoming an expert in
computer vision, by defining a model in a very intuitive way:

        http://fiji.sc/Trainable_Segmentation

And please do not believe that the plugin is not for you because the
modality of the example images is different from your images' (EM instead
of DIC); For the matter of mathematical modelling, the source of the data
is irrelevant.

Good luck!

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Emmanuel Levy
In reply to this post by Emmanuel Levy
Dear Johannes and Walter,

Thanks a lot for your replies.

Of course, I did not mean to be critical, especially of ImageJ! It's
been immensely helpful in my work and will continue to be. I was just
supposing that there might be some "trick" I didn't know about. For
example, for the rest of the cells (that can be segmented) a critical
trick was to use the versatile wand to clear most of the background.

For the hard remaining cases I wasn't sure what was necessary but now
I understand that I'll have to go into the machine learning direction.
I never used it before but I guess it's time to start.

Thanks again,

Emmanuel







On 9 March 2013 02:49, Walter O'Dell <[hidden email]> wrote:

> hey Emmanuel,
>
> try my template matching plugin
> http://rsbweb.nih.gov/ij/plugins/template-matching.html
>
> it should be able to achieve identification and counting of your cells.
>
> On Mar 8, 2013, at 6:46 PM, Emmanuel Levy wrote:
>
>> Hello,
>>
>> I've been trying to identify yeast cells using imageJ (i.e., in the
>> attached example, the goal would be to have a binary image where all
>> the area inside of the "dark regions delimiting cells" is black, but
>> not the black area itself (example shown in "areas_wanted").
>>
>> Most of the time it works OK but on some images I've got a while halo
>> around cells that makes things less well defined and more complicated.
>>
>> - I've tried simple thresholding of course but it's not robust. Here
>> it doesn't actually work because dark areas delimiting cells are not
>> "closed", in order to close them, I would need to increase the
>> threshold so much that that dark lines become too thick.
>> - I've tried to make the edges stronger,
>> - I've tried the different segmentations available in Fiji ... but
>> without success.
>>
>> I'm not an image expert at all, so perhaps there's something obvious
>> that I have missed?
>> Any idea would be very welcome.
>>
>> Thanks,
>>
>> Emmanuel
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>> <cells.jpg><areas_wanted.jpg>
>
> Walter O'Dell, PhD
> Assistant Professor, Dept. of Radiation Oncology
> PO Box 100385
> University of Florida
> Gainesville, FL
> 352-273-9030
> [hidden email]
> http://odell.radonc.med.ufl.edu
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Gabriel Landini
In this problem you have objects that are round, have a dark border and have
relatively constant sizes. Maybe the Hough transform for circles might be
useful for this.
There is a plugin in the IJ site, but I have not used it. Hope it helps

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

samjlord
In reply to this post by Emmanuel Levy
Have you tried simply dilating (and then eroding) the thresholded binary? That might close some of the circles. Also, removing background (e.g. by using the rolling ball or by subtracting a highly blurred version of the image) may help flatten the image before thresholding.
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Agustina Olivera
Hello. I think there is a software called Cell ID. With this software  
you can individualise cells and it is specially optimised for yeast  
brightfield images just like yours.

http://www.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=pubmed&retmode=ref&cmd=prlinks&id=18972382

Perhaps you can ask the authors of this paper,

Agustina



Quoting samjlord <[hidden email]>:

> Have you tried simply dilating (and then eroding) the thresholded binary?
> That might close some of the circles. Also, removing background (e.g. by
> using the rolling ball or by subtracting a highly blurred version of the
> image) may help flatten the image before thresholding.
>
>
>
> --
> View this message in context:  
> http://imagej.1557.n6.nabble.com/If-eyes-can-spot-it-imageJ-should-be-able-to-as-well-segmentation-problem-tp5002078p5002082.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Emmanuel Levy
Hello,

Thank you for your answers - actually, after some twiking around, I
got even the hard ones with the regular "thresholding" approach -
thanks to the Versatile Wand, a reallly conveninent tool.

All the best,

Emmanuel


On 9 March 2013 20:38, Agustina Olivera <[hidden email]> wrote:

> Hello. I think there is a software called Cell ID. With this software you
> can individualise cells and it is specially optimised for yeast brightfield
> images just like yours.
>
> http://www.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=pubmed&retmode=ref&cmd=prlinks&id=18972382
>
> Perhaps you can ask the authors of this paper,
>
> Agustina
>
>
>
>
> Quoting samjlord <[hidden email]>:
>
>> Have you tried simply dilating (and then eroding) the thresholded binary?
>> That might close some of the circles. Also, removing background (e.g. by
>> using the rolling ball or by subtracting a highly blurred version of the
>> image) may help flatten the image before thresholding.
>>
>>
>>
>> --
>> View this message in context:
>> http://imagej.1557.n6.nabble.com/If-eyes-can-spot-it-imageJ-should-be-able-to-as-well-segmentation-problem-tp5002078p5002082.html
>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

mikeadams709
Hi Emmanuel,

One of the things that makes your brain and eyes so good at segmenting
compared to most algorithms is the use of local contrast.
Look into using local contrasting techniques rather than a global approach.

Mike

On Sunday, March 10, 2013, Emmanuel Levy wrote:

> Hello,
>
> Thank you for your answers - actually, after some twiking around, I
> got even the hard ones with the regular "thresholding" approach -
> thanks to the Versatile Wand, a reallly conveninent tool.
>
> All the best,
>
> Emmanuel
>
>
> On 9 March 2013 20:38, Agustina Olivera <[hidden email]<javascript:;>>
> wrote:
> > Hello. I think there is a software called Cell ID. With this software you
> > can individualise cells and it is specially optimised for yeast
> brightfield
> > images just like yours.
> >
> >
> http://www.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=pubmed&retmode=ref&cmd=prlinks&id=18972382
> >
> > Perhaps you can ask the authors of this paper,
> >
> > Agustina
> >
> >
> >
> >
> > Quoting samjlord <[hidden email] <javascript:;>>:
> >
> >> Have you tried simply dilating (and then eroding) the thresholded
> binary?
> >> That might close some of the circles. Also, removing background (e.g. by
> >> using the rolling ball or by subtracting a highly blurred version of the
> >> image) may help flatten the image before thresholding.
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://imagej.1557.n6.nabble.com/If-eyes-can-spot-it-imageJ-should-be-able-to-as-well-segmentation-problem-tp5002078p5002082.html
> >> Sent from the ImageJ mailing list archive at Nabble.com.
> >>
> >> --
> >> 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
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

James Ewing
Hi Mike and Emmanuel - Is there a Sobel filter available in ImageJ?  That will define the edges of your objects and level the flat background, regardless of its amplitude.

- Jim
On Mar 9, 2013, at 9:22 PM, michael adams wrote:

> Hi Emmanuel,
>
> One of the things that makes your brain and eyes so good at segmenting
> compared to most algorithms is the use of local contrast.
> Look into using local contrasting techniques rather than a global approach.
>
> Mike
>
> On Sunday, March 10, 2013, Emmanuel Levy wrote:
>
>> Hello,
>>
>> Thank you for your answers - actually, after some twiking around, I
>> got even the hard ones with the regular "thresholding" approach -
>> thanks to the Versatile Wand, a reallly conveninent tool.
>>
>> All the best,
>>
>> Emmanuel
>>
>>
>> On 9 March 2013 20:38, Agustina Olivera <[hidden email]<javascript:;>>
>> wrote:
>>> Hello. I think there is a software called Cell ID. With this software you
>>> can individualise cells and it is specially optimised for yeast
>> brightfield
>>> images just like yours.
>>>
>>>
>> http://www.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=pubmed&retmode=ref&cmd=prlinks&id=18972382
>>>
>>> Perhaps you can ask the authors of this paper,
>>>
>>> Agustina
>>>
>>>
>>>
>>>
>>> Quoting samjlord <[hidden email] <javascript:;>>:
>>>
>>>> Have you tried simply dilating (and then eroding) the thresholded
>> binary?
>>>> That might close some of the circles. Also, removing background (e.g. by
>>>> using the rolling ball or by subtracting a highly blurred version of the
>>>> image) may help flatten the image before thresholding.
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>>
>> http://imagej.1557.n6.nabble.com/If-eyes-can-spot-it-imageJ-should-be-able-to-as-well-segmentation-problem-tp5002078p5002082.html
>>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>>
>>>> --
>>>> 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
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Michael Schmid
Hi Jim & others,

the Sobel filter in ImageJ is available via Process>Find Edges

See the documentation
  http://rsb.info.nih.gov/ij/docs/guide/146-29.html#sec:Process

Michael
___________________________________________________

On Sun, March 10, 2013 04:22, James Ewing wrote:

> Hi Mike and Emmanuel - Is there a Sobel filter available in ImageJ?  That
> will define the edges of your objects and level the flat background,
> regardless of its amplitude.
>
> - Jim
> On Mar 9, 2013, at 9:22 PM, michael adams wrote:
>
>> Hi Emmanuel,
>>
>> One of the things that makes your brain and eyes so good at segmenting
>> compared to most algorithms is the use of local contrast.
>> Look into using local contrasting techniques rather than a global
>> approach.
>>
>> Mike
>>
>> On Sunday, March 10, 2013, Emmanuel Levy wrote:
>>
>>> Hello,
>>>
>>> Thank you for your answers - actually, after some twiking around, I
>>> got even the hard ones with the regular "thresholding" approach -
>>> thanks to the Versatile Wand, a reallly conveninent tool.
>>>
>>> All the best,
>>>
>>> Emmanuel
>>>
>>>
>>> On 9 March 2013 20:38, Agustina Olivera
>>> <[hidden email]<javascript:;>>
>>> wrote:
>>>> Hello. I think there is a software called Cell ID. With this software
>>>> you
>>>> can individualise cells and it is specially optimised for yeast
>>> brightfield
>>>> images just like yours.
>>>>
>>>>
>>> http://www.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=pubmed&retmode=ref&cmd=prlinks&id=18972382
>>>>
>>>> Perhaps you can ask the authors of this paper,
>>>>
>>>> Agustina
>>>>
>>>>
>>>>
>>>>
>>>> Quoting samjlord <[hidden email] <javascript:;>>:
>>>>
>>>>> Have you tried simply dilating (and then eroding) the thresholded
>>> binary?
>>>>> That might close some of the circles. Also, removing background (e.g.
>>>>> by
>>>>> using the rolling ball or by subtracting a highly blurred version of
>>>>> the
>>>>> image) may help flatten the image before thresholding.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>> http://imagej.1557.n6.nabble.com/If-eyes-can-spot-it-imageJ-should-be-able-to-as-well-segmentation-problem-tp5002078p5002082.html
>>>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>>>
>>>>> --
>>>>> 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
>>>
>>
>> --
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Unruh, Jay-2
Hi everyone,

I thought I would weigh in here because we have spent a bit of time getting segmentation to work in yeast.  Note first of all that these are not DIC images.  This is important because DIC gives crossing points from negative to positive slope that are difficult to segment by the Sobel filter.  Also note that most yeast are not perfectly round.  I have found that the hough transform works okay on haploid yeast but very poorly on diploid yeast which are even less round.  Secondly, note that it is surprisingly difficult to distinguish mother and bud, especially at high cell density.  This is because the bud neck region is an area of low contrast.  This also explains why your segmentation is so hard.  Those points of contact between mother and bud have essentially no local contrast compared to the cytoplasm.

Here is a workflow that has performed ok for us in the past:
1.  Smooth once (simple box smoothing will work)
2.  Perform a number of iterations of a tophat black gray morphology filter (15 seemed to work for your images).
3.  Threshold at a reasonable value (you could try an automatic thresholding here)
4.  Perform 2 iterations of the close binary operation
5.  Skeletonize
6.  Dilate the skeletons to close small gaps
7.  Duplicate and fill holes
8.  Perform the xor operation to clear the original dilated skeletons from the filled skeletons

If this seems difficult that's because it is!  If you want to make life easy, just image fluorescently with calcofluor white (or your favorite membrane marker) and use simple segmentation techniques.  That method also has the advantage that the dirt in your sample (or on your optics) will not contribute to the segmentation.

Jay


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Schmid
Sent: Sunday, March 10, 2013 11:38 AM
To: [hidden email]
Subject: Re: If eyes can spot it, imageJ should be able to as well! (segmentation problem ...)

Hi Jim & others,

the Sobel filter in ImageJ is available via Process>Find Edges

See the documentation
  http://rsb.info.nih.gov/ij/docs/guide/146-29.html#sec:Process

Michael
___________________________________________________

On Sun, March 10, 2013 04:22, James Ewing wrote:

> Hi Mike and Emmanuel - Is there a Sobel filter available in ImageJ?  
> That will define the edges of your objects and level the flat
> background, regardless of its amplitude.
>
> - Jim
> On Mar 9, 2013, at 9:22 PM, michael adams wrote:
>
>> Hi Emmanuel,
>>
>> One of the things that makes your brain and eyes so good at
>> segmenting compared to most algorithms is the use of local contrast.
>> Look into using local contrasting techniques rather than a global
>> approach.
>>
>> Mike
>>
>> On Sunday, March 10, 2013, Emmanuel Levy wrote:
>>
>>> Hello,
>>>
>>> Thank you for your answers - actually, after some twiking around, I
>>> got even the hard ones with the regular "thresholding" approach -
>>> thanks to the Versatile Wand, a reallly conveninent tool.
>>>
>>> All the best,
>>>
>>> Emmanuel
>>>
>>>
>>> On 9 March 2013 20:38, Agustina Olivera
>>> <[hidden email]<javascript:;>>
>>> wrote:
>>>> Hello. I think there is a software called Cell ID. With this
>>>> software you can individualise cells and it is specially optimised
>>>> for yeast
>>> brightfield
>>>> images just like yours.
>>>>
>>>>
>>> http://www.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=pubmed&r
>>> etmode=ref&cmd=prlinks&id=18972382
>>>>
>>>> Perhaps you can ask the authors of this paper,
>>>>
>>>> Agustina
>>>>
>>>>
>>>>
>>>>
>>>> Quoting samjlord <[hidden email] <javascript:;>>:
>>>>
>>>>> Have you tried simply dilating (and then eroding) the thresholded
>>> binary?
>>>>> That might close some of the circles. Also, removing background (e.g.
>>>>> by
>>>>> using the rolling ball or by subtracting a highly blurred version
>>>>> of the
>>>>> image) may help flatten the image before thresholding.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>> http://imagej.1557.n6.nabble.com/If-eyes-can-spot-it-imageJ-should-b
>>> e-able-to-as-well-segmentation-problem-tp5002078p5002082.html
>>>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>>>
>>>>> --
>>>>> 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
>>>
>>
>> --
>> 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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html