Login  Register

Re: how to count the number of peaks in a dynamic profile

Posted by Gabriel Landini on Apr 28, 2011; 12:28pm
URL: http://imagej.273.s1.nabble.com/how-to-count-the-number-of-peaks-in-a-dynamic-profile-tp3684809p3684811.html

On Thursday 28 Apr 2011, Michael Schmid wrote:
> for finding whether a point is a maximum it is not enough to check
> whether a profile along the x direction has a maximum. It must be
> also a maximum in the y direction (and in the diagonal directions,
> when considering 8-connected pixels).
> Also, you may have a maximum with several pixels of the same value,
> which would be lost in your approach.

In addition to Michael's comments, let me say that this sort of problem has
been resolved using mathematical morphology (in particular greyscale
reconstruction) long time ago and there are formal ways of doing it.

What I guess you are looking for is called "regional maxima" and a related
procedure  "h-domes". Reading about this will save you lots of time in getting
the algorithms right. The papers by Luc Vincent (many of those are online)
will cover this in detail and with examples.
Pierre Soille's book (Morphological image analysis)  is also very good on
this.
Several of these procedures have been implemented in the Morphology plugin
collection available in my page.

Cheers

Gabriel