Posted by
Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Find-maxima-algorithm-discription-tp3683914p3683917.html
Hi Ayman,
maybe an example is best:
Say, you have a maximum of pixel value 100 and the tolerance is 10.
If the maximum is a single pixel surrounded by pixels with a value
less than 100-10=90, then 'Maximum within tolerance' will give you
that pixel only.
If it has a neighbor of, say, pixel value 95, and everything around
this is below 90, 'Maximum within tolerance' gives you these two
pixels, the one with 100 and with 95.
If there are three adjacent pixels in a row, with values 100, 91 and
98, everything else below 90, they will be considered a single
maximum and you will see all three pixels in 'Maximum within tolerance'.
If the three pixels in a row are 100, 89, 95, again everything else
below 90, only the '100' will be considered 'Maximum within
tolerance', because the 89 is below the tolerance limit. The 95 is
not separated from the next maximum (the '100') by a value less than
95-10=85, so it is not considered a maximum.
If the three pixels are 100, 84, 95, everything around them not
higher than 84, you get two maxima, each one pixel large: the '100'
and the '95'.
Michael
________________________________________________________________
On 6 Jul 2011, at 23:12, Ayman wrote:
> Hi,
>
> sorry, there is no publication on it (at least none that I am aware
> of,
> probably I have reinvented the wheel), but it is rather simple code:
> (1) Find the local maxima
> (2) Sort them in descending sequence
> (3) For each local maximum, do a flood fill algorithm with the gray...
>
> Dear Michael,
>
> I have a followup question about this algorithm. In the ImageJ
> documentation
> for "Find Maxima," it is stated "Maxima are ignored if they do not
> stand
> out from the surroundings by more than [the noise tolerance]." I
> would have
> expected that this means that there must be a nonzero number of pixels
> contiguous with a maximum that exceed the threshold, defined as the
> maximum
> minus the noise tolerance.
>
> However, when I used the "Maxima within tolerance" option for the
> output of
> "Find Maxima", which the documentation suggests should return all
> contiguous
> pixels around the maximum that exceed this threshold, it returned
> numerous
> maxima with just one point. This seems inconsistent with my
> interpretation
> of how the noise tolerance is used to reject maxima that do not
> stand out
> from their surroundings.
>
> Could you clarify how the noise tolerance is used to decide which
> maxima are
> ignored?
>
> --
> View this message in context:
http://imagej.588099.n2.nabble.com/
> Find-maxima-algorithm-discription-tp4141919p6556029.html
> Sent from the ImageJ mailing list archive at Nabble.com.