Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello, I have just an hint, not a full answer: I am assuming mResult9u is the image where you look for peaks, and a peak means a found occurrence: then if you find a peak you will set to zero all the pixels in mResult9u near the peak; the number of pixels you set to zero depends on the overlap you allow between different occurences. Setting to zero the pixels has the effect of "removing" the first peak you found. If you set to zero a rectangular area as big as your pattern then you will not allow any overlap between patterns.

Then maybe you have to smooth this area where the first peak was, in order to avoid false peak detection in that area.

Then you perform a new minMaxLoc on mResult9u and you should find the next peak.

Hello, I have just an hint, not a full answer: I am assuming mResult9u mResult9u is the image where you look for peaks, and a peak means a found occurrence: then if you find a peak you will set to zero all the pixels in mResult9u mResult9u near the peak; the number of pixels you set to zero depends on the overlap you allow between different occurences. Setting to zero the pixels has the effect of "removing" the first peak you found. If you set to zero a rectangular area as big as your pattern then you will not allow any overlap between patterns.

Then maybe you have to smooth this area where the first peak was, in order to avoid false peak detection in that area.

Then you perform a new minMaxLoc minMaxLoc on mResult9u mResult9u and you should find the next peak.peak, and then again to find the next peaks.