simple thresholding problem

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

simple thresholding problem

Gensch, Thomas
dear all,

i have a (rather simple?) problem of identifying circular and elliptical objects in a fluorescence image (see the attached sample picture). i want to generate a mask, that i can use in a second image (different fluorophore and color, different structures) to select the interesting areas.

while by eye and freehand drawing one can nicely mark the limits of the object, with all the thresholding tools in imagej (i tried "threshold in "adjust" and the "autothreshold plugin") i obtained only mediocre results (one of the best examples is attached). i can see the problem (in some parts due to close localization and very different fluorescence intensities by neighbouring objects the space between objects has intensity values larger than some of the weaker fluorescent elliptical objects.

i wouId appreciate very much, if one of  you could help me or suggest a better approach,

thanks a lot,


thomas


Dr. Thomas Gensch
Institute of Complex Systems 4 (ICS-4), Cellular Biophysics/Institut fuer Komplexe Systeme 4, Zelluläre Biophysik
Forschungszentrum Juelich (Research Centre Juelich)
52425 Juelich
Tel:+49-2461-618068
Tel:+49-2461-614216
email: [hidden email]


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


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

gensch_sample picture_elliptic objects_intensity fluorescence_threshold huang.gif (11K) Download Attachment
gensch_sample picture_elliptic objects_intensity fluorescence.gif (127K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: simple thresholding problem

Martin Höhne
Thomas,

the macro posted below might be a starting point. For the macro you need to these two filters/plugins installed:
http://rsb.info.nih.gov/ij/plugins/mexican-hat/index.html
http://rsb.info.nih.gov/ij/plugins/mean-shift.html

Best,
Martin
----------------------------------------------------------
run("Mexican Hat Filter", "radius=4");
run("Mean Shift", "spatial=2 color=100");
setAutoThreshold("Li dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Fill Holes");
run("Watershed");

Playing with the filter settings might improve the outcome

Reply | Threaded
Open this post in threaded view
|

Re: simple thresholding problem

Jeremy Adler
In reply to this post by Gensch, Thomas
Try the various options in
Auto Local Threshold
the Phansalkar method is promising

After thresholding use the Watershed binary operation to separate overlapping objects. The generate ROIs for each object with Analyze Particles

Also
1) check your image acquisition for even illumination, you will need a slide with a uniform fluorescence - and correct for unevenness. To some extent the Local Thresholding methods deal with uneven illumination but getting the best images is always a good start and becomes important if you want to make the relative intensities independent of the objects position on the slide.
2) It is not clear what your images are but you may be able to add a transmitted light image or an autofluorescence image that has less variability between the objects but shows the same objects. These images  might be easier to threshold



-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gensch, Thomas
Sent: den 29 januari 2016 09:38
To: [hidden email]
Subject: simple thresholding problem

dear all,

i have a (rather simple?) problem of identifying circular and elliptical objects in a fluorescence image (see the attached sample picture). i want to generate a mask, that i can use in a second image (different fluorophore and color, different structures) to select the interesting areas.

while by eye and freehand drawing one can nicely mark the limits of the object, with all the thresholding tools in imagej (i tried "threshold in "adjust" and the "autothreshold plugin") i obtained only mediocre results (one of the best examples is attached). i can see the problem (in some parts due to close localization and very different fluorescence intensities by neighbouring objects the space between objects has intensity values larger than some of the weaker fluorescent elliptical objects.

i wouId appreciate very much, if one of  you could help me or suggest a better approach,

thanks a lot,


thomas


Dr. Thomas Gensch
Institute of Complex Systems 4 (ICS-4), Cellular Biophysics/Institut fuer Komplexe Systeme 4, Zelluläre Biophysik Forschungszentrum Juelich (Research Centre Juelich)
52425 Juelich
Tel:+49-2461-618068
Tel:+49-2461-614216
email: [hidden email]


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


--
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: simple thresholding problem

Krs5
In reply to this post by Gensch, Thomas
Dear Thomas,

I got better results using the macro code:

run("Subtract Background...", "rolling=50");
run("Bandpass Filter...", "filter_large=40 filter_small=3 suppress=None tolerance=5 autoscale saturate");
run("Auto Local Threshold", "method=Median radius=15 parameter_1=0 parameter_2=0 white"); // this uses the Auto Local Threshold plugin
run("Watershed");
run("Analyze Particles...", "size=10-Infinity add");

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif



-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gensch, Thomas
Sent: 29 January 2016 08:38
To: [hidden email]
Subject: simple thresholding problem

dear all,

i have a (rather simple?) problem of identifying circular and elliptical objects in a fluorescence image (see the attached sample picture). i want to generate a mask, that i can use in a second image (different fluorophore and color, different structures) to select the interesting areas.

while by eye and freehand drawing one can nicely mark the limits of the object, with all the thresholding tools in imagej (i tried "threshold in "adjust" and the "autothreshold plugin") i obtained only mediocre results (one of the best examples is attached). i can see the problem (in some parts due to close localization and very different fluorescence intensities by neighbouring objects the space between objects has intensity values larger than some of the weaker fluorescent elliptical objects.

i wouId appreciate very much, if one of  you could help me or suggest a better approach,

thanks a lot,


thomas


Dr. Thomas Gensch
Institute of Complex Systems 4 (ICS-4), Cellular Biophysics/Institut fuer Komplexe Systeme 4, Zelluläre Biophysik Forschungszentrum Juelich (Research Centre Juelich)
52425 Juelich
Tel:+49-2461-618068
Tel:+49-2461-614216
email: [hidden email]


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


--
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: simple thresholding problem

Straub, Volko A. (Dr.)
In reply to this post by Gensch, Thomas
For what it is worth this looked to me like a problem for local thresholding. Using the 'Niblack' method in the 'Auto Local Threshold' menu followed by a watershed segmentation appeared to produce some reasonable results for your sample image.
Hope this helps,
Volko




-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gensch, Thomas
Sent: 29 January 2016 08:38
To: [hidden email]
Subject: simple thresholding problem

dear all,

i have a (rather simple?) problem of identifying circular and elliptical objects in a fluorescence image (see the attached sample picture). i want to generate a mask, that i can use in a second image (different fluorophore and color, different structures) to select the interesting areas.

while by eye and freehand drawing one can nicely mark the limits of the object, with all the thresholding tools in imagej (i tried "threshold in "adjust" and the "autothreshold plugin") i obtained only mediocre results (one of the best examples is attached). i can see the problem (in some parts due to close localization and very different fluorescence intensities by neighbouring objects the space between objects has intensity values larger than some of the weaker fluorescent elliptical objects.

i wouId appreciate very much, if one of  you could help me or suggest a better approach,

thanks a lot,


thomas


Dr. Thomas Gensch
Institute of Complex Systems 4 (ICS-4), Cellular Biophysics/Institut fuer Komplexe Systeme 4, Zelluläre Biophysik Forschungszentrum Juelich (Research Centre Juelich)
52425 Juelich
Tel:+49-2461-618068
Tel:+49-2461-614216
email: [hidden email]


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


--
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: simple thresholding problem

Kenneth Sloan-2
Local thresholding is one idea.

I would also look into a Hough-like transform for detecting circles, perhaps extended to handle ellipses.  This would depend critically on being able to find good edges (preferably with good orientations).

but first Local Thresholding.  I have been using Phansalkar to good effect.


> On Jan 29, 2016, at 07:17, Straub, Volko A. (Dr.) <[hidden email]> wrote:
>
> For what it is worth this looked to me like a problem for local thresholding. Using the 'Niblack' method in the 'Auto Local Threshold' menu followed by a watershed segmentation appeared to produce some reasonable results for your sample image.
> Hope this helps,
> Volko
>
>
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gensch, Thomas
> Sent: 29 January 2016 08:38
> To: [hidden email]
> Subject: simple thresholding problem
>
> dear all,
>
> i have a (rather simple?) problem of identifying circular and elliptical objects in a fluorescence image (see the attached sample picture). i want to generate a mask, that i can use in a second image (different fluorophore and color, different structures) to select the interesting areas.
>
> while by eye and freehand drawing one can nicely mark the limits of the object, with all the thresholding tools in imagej (i tried "threshold in "adjust" and the "autothreshold plugin") i obtained only mediocre results (one of the best examples is attached). i can see the problem (in some parts due to close localization and very different fluorescence intensities by neighbouring objects the space between objects has intensity values larger than some of the weaker fluorescent elliptical objects.
>
> i wouId appreciate very much, if one of  you could help me or suggest a better approach,
>
> thanks a lot,
>
>
> thomas
>
>
> Dr. Thomas Gensch
> Institute of Complex Systems 4 (ICS-4), Cellular Biophysics/Institut fuer Komplexe Systeme 4, Zelluläre Biophysik Forschungszentrum Juelich (Research Centre Juelich)
> 52425 Juelich
> Tel:+49-2461-618068
> Tel:+49-2461-614216
> email: [hidden email]
>
>
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
>
>
> --
> 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