Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Locating local maxima of arbitrary curve

Posted on 2008-10-15
4
Medium Priority
?
813 Views
Last Modified: 2013-11-13
I need to locate the local maxima across a histogram. That is, I need to locate the 'hills' in the histogram graph. Is the best way to do this to calculate the first derivative across the curve until it is under some low (near zero) threshold value? The graph can be quite noisy so I'm not sure what the best way to do this is. Also, what size window should be used to calculate the derivative across the points of the arbitrary curve?

Thanks in advance
0
Comment
Question by:corey_mcm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 22728342
If the function is continuously differentiable the local maxima will be where the derivative is 0 and the second derivative is negative
0
 
LVL 84

Expert Comment

by:ozo
ID: 22728356
If the function is discrete, than anywhere f(n-1) <  f(n) > f(n+1) is a local maximum
0
 
LVL 5

Author Comment

by:corey_mcm
ID: 22728399
I'm generating a critically smoothed gaussian kernel of the histogram.. Is the safe to use the following (where 'value' is the histogram array):

To calculate the first order derivative:

dOne (int x) {
    return value[i+1] - value[i];
}

To calculate the second order derivative:

dTwo (int x) {
    return dOne(x+1) - dOne(x);
}
0
 
LVL 84

Accepted Solution

by:
ozo earned 1500 total points
ID: 22728461
That's one way to do it.
A local maximum would then be where dOne goes from positive to negative
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
Starting up a Project
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question