i am trying to detect local maxima from a given array. The array is a sinusoidal curve obtained after calculating hough line transform. Here is the image
Here is the numpy file accumulator.npy. Clearly, there are two local maximas. I was wondering what would be the best way to detect those two maxima. Also, how can i plot back lines after finding the maximas ? Thanks.
You can use skimage function
peak_local_max()
to find the peaks. There are more than you seem to be expecting, so I added some Gaussian smoothing for you to experiment with.There is also some plotting at the end that enables you to visualise the data in 3D better - but you can ignore that.
Sample Output