Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You want local maxima.

The histogram is a mat, so you can get the value of each index.

How you choose to do this is up to you. But a sliding window, where you have the previous value, current value and next value. If prev < current > next then you have a peak.

That's a pretty crude approach so perhaps you may want to smooth or normalize you values first.