Getting more information on ImageJ algorithms

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

Getting more information on ImageJ algorithms

Adam Hughes
Hey guys,

I usuallyu perform the following sequence on my images:
     Adjust threshold
     Despeckle
     Analyze Particles

I was hoping to learn a bit more about what goes on under the hood in these
processes.  In particular, how does the automatic threshold choose it's
region on the histogram?  Is Despeckle the common name for this method, and
what exactly does it compute?  Same for Analyze Particles.  Are these
methods unique to ImageJ, or are they based on some generally accepted
methods in image analysis.  If so, what other names to they go by? I'm
hoping to get a better sense of where this fits in to the bigger picture of
image analysis, so any context is quite helpful.

Thank you

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

Re: Getting more information on ImageJ algorithms

Jim Passmore-2
Adam,

One of the beautiful things about ImageJ is it is open source--most of
the core is public domain I think, with some other open source
licenses for different plugins.  Therefore you can browse the code at
http://rsbweb.nih.gov/ij/developer/source/index.html
and the API, at http://rsbweb.nih.gov/ij/developer/api/index.html
(Requires learning some Java, but learning to *read* java is a lot
easier than learning to code projects!)

On Fri, Nov 22, 2013 at 4:51 PM, Adam Hughes <[hidden email]> wrote:
> I was hoping to learn a bit more about what goes on under the hood in these
> processes.  In particular, how does the automatic threshold choose it's
> region on the histogram?

This one is actually in the FAQ
http://rsbweb.nih.gov/ij/docs/faqs.html#auto


> Is Despeckle the common name for this method, and
> what exactly does it compute?
Not sure of other names, but again, look at the actual Java and the
API.  You'll see a that despeckle runs a median with a radius of 1.

> Same for Analyze Particles.  Are these
> methods unique to ImageJ, or are they based on some generally accepted
> methods in image analysis.  If so, what other names to they go by? I'm
> hoping to get a better sense of where this fits in to the bigger picture of
> image analysis, so any context is quite helpful.

If you have trouble finding the right Java class, method, etc., try
using the "command finder" in ImageJ.  Press ctrl-L, and type the
command into the search field.  For example, "Analyze Particles" is in
ij.plugin.filter.ParticleAnalyzer.  This requires some effort, but
you'll definitely understand what's happening "under the hood."
You'll then have to research what other methods are found in
literature & other software.  Beware this information might not be
available for commercial packages.  That's why many on this list use
ImageJ.

It will get quite interesting, so have fun!


--
Jim Passmore
Research Associate
Sealed Air Corporation

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

Re: Getting more information on ImageJ algorithms

Gabriel Landini
In reply to this post by Adam Hughes
On Friday 22 Nov 2013 21:51:21 Adam Hughes wrote:
> In particular, how does the automatic threshold choose it's
> region on the histogram?  Is Despeckle the common name for this method, and
> what exactly does it compute?  Same for Analyze Particles.  Are these
> methods unique to ImageJ, or are they based on some generally accepted
> methods in image analysis.  If so, what other names to they go by? I'm
> hoping to get a better sense of where this fits in to the bigger picture of
> image analysis, so any context is quite helpful.

Have you looked at the documentation?
Russ' book The Image Processing Handbook is a good one to read about imaging
in general, but it does not cover IJ commands.
Buger & Burge book is specifically on Java/ImageJ, and a bit more advanced
into programming. For a start I would read those 3 sources.

A brief description of the various thresholding methods with references is
available here:
http://www.dentistry.bham.ac.uk/landinig/software/autothreshold/autothreshold.html

The Particle Analyzer counts pixels for area (one of the standard ways, but
not the only). The Particles8 plugin,
http://www.dentistry.bham.ac.uk/landinig/software/software.html
uses another method for area and perimeter measurement (Freeman's chain
encoding). There is a very small difference in the perimeter length measured
between the 2 methods. I think Freeman's algorithm is pretty standard (and has
been around for more than 50 years).
There are other ways of encoding particles boundaries.

Cheers

Gabriel

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

Re: Getting more information on ImageJ algorithms

Adam Hughes
On Sun, Nov 24, 2013 at 4:53 AM, Gabriel Landini <[hidden email]>wrote:

> On Friday 22 Nov 2013 21:51:21 Adam Hughes wrote:
> > In particular, how does the automatic threshold choose it's
> > region on the histogram?  Is Despeckle the common name for this method,
> and
> > what exactly does it compute?  Same for Analyze Particles.  Are these
> > methods unique to ImageJ, or are they based on some generally accepted
> > methods in image analysis.  If so, what other names to they go by? I'm
> > hoping to get a better sense of where this fits in to the bigger picture
> of
> > image analysis, so any context is quite helpful.
>
> Have you looked at the documentation?
> Russ' book The Image Processing Handbook is a good one to read about
> imaging
> in general, but it does not cover IJ commands.
> Buger & Burge book is specifically on Java/ImageJ, and a bit more advanced
> into programming. For a start I would read those 3 sources.
>
> A brief description of the various thresholding methods with references is
> available here:
>
> http://www.dentistry.bham.ac.uk/landinig/software/autothreshold/autothreshold.html
>
> The Particle Analyzer counts pixels for area (one of the standard ways, but
> not the only). The Particles8 plugin,
> http://www.dentistry.bham.ac.uk/landinig/software/software.html
> uses another method for area and perimeter measurement (Freeman's chain
> encoding). There is a very small difference in the perimeter length
> measured
> between the 2 methods. I think Freeman's algorithm is pretty standard (and
> has
> been around for more than 50 years).
> There are other ways of encoding particles boundaries.
>

Thanks for sharing these links; they were very helpful.  Gabriel, forgive
me as I'm very inexperience, but how would one actually make the "Try All"
call shown in the threshold tutorial?  I'm only familiar with the ImageJ
GUI, but imagine I'd actually have to run some code as a macro to get this
montage of all the various thresholds, right?

Thank you for the Particle Analyzer link as well.  So if I understand you
correctly, Freeman's method is not the default one used, and the standard
one you said counts pixels for area, right?  Does it consider a particle
any region of connected black pixels (on the binary image)?  In other
words, it considers a particle as anything connected by black pixels, and
everyting that's encompassed in such a perimeter is counted as that
particle?


>
> Cheers
>
> Gabriel
>
> --
> 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: Getting more information on ImageJ algorithms

Adam Hughes
In reply to this post by Jim Passmore-2
On Sat, Nov 23, 2013 at 10:18 PM, Jim Passmore <[hidden email]> wrote:

> Adam,
>
> One of the beautiful things about ImageJ is it is open source--most of
> the core is public domain I think, with some other open source
> licenses for different plugins.  Therefore you can browse the code at
> http://rsbweb.nih.gov/ij/developer/source/index.html
> and the API, at http://rsbweb.nih.gov/ij/developer/api/index.html
> (Requires learning some Java, but learning to *read* java is a lot
> easier than learning to code projects!)
>
> On Fri, Nov 22, 2013 at 4:51 PM, Adam Hughes <[hidden email]>
> wrote:
> > I was hoping to learn a bit more about what goes on under the hood in
> these
> > processes.  In particular, how does the automatic threshold choose it's
> > region on the histogram?
>
> This one is actually in the FAQ
> http://rsbweb.nih.gov/ij/docs/faqs.html#auto


Thanks, sorry I had overlooked this!


>
>
>
> > Is Despeckle the common name for this method, and
> > what exactly does it compute?
> Not sure of other names, but again, look at the actual Java and the
> API.  You'll see a that despeckle runs a median with a radius of 1.
>
> > Same for Analyze Particles.  Are these
> > methods unique to ImageJ, or are they based on some generally accepted
> > methods in image analysis.  If so, what other names to they go by? I'm
> > hoping to get a better sense of where this fits in to the bigger picture
> of
> > image analysis, so any context is quite helpful.
>
> If you have trouble finding the right Java class, method, etc., try
> using the "command finder" in ImageJ.  Press ctrl-L, and type the
> command into the search field.  For example, "Analyze Particles" is in
> ij.plugin.filter.ParticleAnalyzer.  This requires some effort, but
> you'll definitely understand what's happening "under the hood."
> You'll then have to research what other methods are found in
> literature & other software.  Beware this information might not be
> available for commercial packages.  That's why many on this list use
> ImageJ.
>

Thanks for the tip with ctrl-L.  I had looked at the API before but
couldn't find what I was looking for.  I wish I was more fluent in Java,
but certainly have a better idea now, thank you.


>
> It will get quite interesting, so have fun!
>
>
> --
> Jim Passmore
> Research Associate
> Sealed Air Corporation
>
> --
> 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: Getting more information on ImageJ algorithms

Gabriel Landini
In reply to this post by Adam Hughes
On Sunday 24 Nov 2013 20:36:17 Adam Hughes wrote:
> me as I'm very inexperience, but how would one actually make the "Try All"
> call shown in the threshold tutorial?  

Did you follow the "Installation" instructions in the tutorial link?
It is very clearly explained there .

I think Wayne since recently includes the Auto Local Threshold command in the
default IJ download. If so, you might get an error of a duplicate command
after installing the auto_threshold.jar file and you may need to find the old
"Auto Local Threshold" class file  in the plugins folder and delete it.

> GUI, but imagine I'd actually have to run some code as a macro to get this
> montage of all the various thresholds, right?

No, it is the default option of Image>Adjust>Auto Threshold and
Image>Adjust>Auto Local Threshold.

> words, it considers a particle as anything connected by black pixels, and
> everyting that's encompassed in such a perimeter is counted as that
> particle?

You will have 3 ways of thresholding an image
1. Image>Adjust>Threshold is IJs applet. It does not have Try all.
The "dark background" option allows to select bright regions

2. Image>Adjust>Auto Threshold  
3. Image>Adjust>Auto Local Threshold

are similar, have "try all" and "white particles" switch allows to choose
bright regions. For these 2 commands. the result is a binary image. Command 2.
allows processing true 16 bit images.

Please read thoroughly:
http://www.dentistry.bham.ac.uk/landinig/software/autothreshold/autothreshold.html
All your questions should be answered there.

Cheers

Gabriel

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

Re: Getting more information on ImageJ algorithms

Adam Hughes
Thank for you clearing this up.  Sorry for being too hasty in my reply
earlier, I got it configured now!


On Sun, Nov 24, 2013 at 4:09 PM, Gabriel Landini <[hidden email]>wrote:

> On Sunday 24 Nov 2013 20:36:17 Adam Hughes wrote:
> > me as I'm very inexperience, but how would one actually make the "Try
> All"
> > call shown in the threshold tutorial?
>
> Did you follow the "Installation" instructions in the tutorial link?
> It is very clearly explained there      .
>
> I think Wayne since recently includes the Auto Local Threshold command in
> the
> default IJ download. If so, you might get an error of a duplicate command
> after installing the auto_threshold.jar file and you may need to find the
> old
> "Auto Local Threshold" class file  in the plugins folder and delete it.
>
> > GUI, but imagine I'd actually have to run some code as a macro to get
> this
> > montage of all the various thresholds, right?
>
> No, it is the default option of Image>Adjust>Auto Threshold and
> Image>Adjust>Auto Local Threshold.
>
> > words, it considers a particle as anything connected by black pixels, and
> > everyting that's encompassed in such a perimeter is counted as that
> > particle?
>
> You will have 3 ways of thresholding an image
> 1. Image>Adjust>Threshold is IJs applet. It does not have Try all.
> The "dark background" option allows to select bright regions
>
> 2. Image>Adjust>Auto Threshold
> 3. Image>Adjust>Auto Local Threshold
>
> are similar, have "try all" and "white particles" switch allows to choose
> bright regions. For these 2 commands. the result is a binary image.
> Command 2.
> allows processing true 16 bit images.
>
> Please read thoroughly:
>
> http://www.dentistry.bham.ac.uk/landinig/software/autothreshold/autothreshold.html
> All your questions should be answered there.
>
> Cheers
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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