I have an Image in matlab and to which I did the following command
sample.png
I=imread('sample.png');
sumCol=sum(I,2);
plot(sumCol);
Now based on y value threshold for example 40 I need to get local maxima and two minima for each of those maxima. In the above plot I have mentioned the required red rectangles(maximas) and brown rectangles(minimas). Blue is the original plot and yellow is my manual smoothed curve.
How would I smooth that plot(as otherwise there would be too many maximas) and find those maximas and minimas in matlab?