finding the prominent peaks in a line graph
Hello everyone.
I have a vector of magnitudes or simply an array of numbers. I displayed it as a line graph/histogram as shown below.
What I am trying to achieve is to obtain the coordinates of the two prominent peaks in the image as marked by the green marker
How can I find the locations of the two prominent peaks as displayed in the image. As you can see the line graph actually has multiple peaks but most of them are actually noise and irrelevant. What algorithm can I use to achieve this.
Thank you
Note: I developed this using c++. Answers in python or pseudo code are appreciated as well.
have you checked this threads here and here. Moreover, if you want to further filter the peaks you will need to play with the
scale
variable if you decide to go with these solutions.thanks. ill check those links