Re: Automate thresholding on various grayscale images



Nathan:
Responding to your comments in order:
I'm sure you can do a web search for Gaussian and find lots of
pictures and explanations. A skewed one (one with a tail - tail is a
term from statistics) is just one that is not symmetrical - just take
the histogram of your own image if you want an example.

The ImageJ multithresholder plug-in at http://rsb.info.nih.gov/ij/plugins/multi-thresholder.html
has the triangle method as one of its methods. There are several
methods available to be selected in that program: triangle is one and
maximum entropy is another. Several of them will give the same or
very close to the same automatically-selected threshold value.

Sometimes with an image there just plain isn't any global threshold
that will work. You can visually verify it by going through every
single level and it's possible that NONE of the will look good. In
that case, you'll need to employ more sophisticated image analysis
methods than just simple global thresholding. I've posted some
thresholding demo code many times - just search this newsgroup for
blobMeasurements and you'll find it.

You're welcome. And you're right - I do have a lot of experience -
over 30 years on a huge variety of images from lots of different
modalities and thousands of different applications.

After you threshold, you need to call bwlabel() and regionprops().
Example code is in the demo I mentioned two paragraphs above.
Hope this answers your questions. Ask again if you have any more.

When you're doing particle sizing, it's very, very common to see
distributions that look log-normal:
http://en.wikipedia.org/wiki/Log_normal
In fact it's way more common than a Gaussian distribution. Several
years ago when I was browsing through Terrence Allen's particle sizing
textbook (the bible on the subject)
http://www.amazon.com/Particle-Size-Measurement-Terence-Allen/dp/0412729504
I remember seeing some kind of physical derivation of the reason for
that. I think that he said that the distributions were Cauchy-Lorentz
or something like that. Maybe it was log normal - I don't remember
exactly. But it was encouraging to see that what I was seeing was
normal and expected. When you're in college, all they ever talk about
is Gaussian distributions and I was wondering why I never saw them in
practice so it was good to know that there was a physical reason for
this. And the really strange thing is that you get the same shape for
the distributions no matter what distribution you're talking about -
it could be intensity (the histogram), the distribution of areas,
perimeters, equivalent circular diameters, fractal dimension,
practically anything you can think of to measure - they will all have
that skewed Gaussian look to them. Maybe it has to do with the
fractal nature of things combined with the quantization/digitization
that you do - I don't know, but it is interesting.

Regards,
ImageAnalyst



.



Relevant Pages

  • Re: Automate thresholding on various grayscale images
    ... different means of thresholding, thanks for the link) I guess all I ... except I keep running out of memory. ... distributions that look log-normal:http://en.wikipedia.org/wiki/Log_normal ... In fact it's way more common than a Gaussian distribution. ...
    (comp.soft-sys.matlab)
  • Re: Gaussian distribution
    ... Gaussian marginals and not joint distributions. ... Instead of assuming a Gaussian model, ... Much of what is done does NOT depend on normality. ...
    (sci.stat.math)
  • Re: A Gaussian MIXTURE problem for everyone
    ... A linear combination of two Gaussian distributions is Gaussian. ... the pdf of Y, and the resulting distribution will be the convex ...
    (sci.stat.math)
  • Re: Automate thresholding on various grayscale images
    ...  Basically it's a Gaussian with a little tail on one side. ... clean threshold (or some other means of finding these soot ... going from about bin 190 to bin 100 or so. ...  High variance areas will be where your soot is and low ...
    (comp.soft-sys.matlab)
  • Re: Function minimization and random numbers
    ... There are a few all-encompassing numerical libraries out ... But it's my recollection that you can generate Gaussian and other non-linear distributions by appropriate iteration of linear distributions. ... Wikipedia has a pseudo-code implementation of Mersenne twister. ...
    (microsoft.public.dotnet.languages.csharp)

Loading