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.