I'm doing pattern matching by means of normalized grey-scale correlation. My input image is noisy and so the peaks in the correlation plot cannot be found just by thresholding.
The original correlation plot displayed as a surface, the peaks are visible, but are not the only local maxima in the picture, I need to find only the ones that are cone-shaped. Note that I know how many I'm looking for.
I noticed that if I calculated the local gradient of the correlation plot, the peaks appear clearly on visual inspection, especially on the gradient orientation plot.
Gradient orientation:
I'm looking for a way to automatically detect the exact position of the peaks (2 in this case, but it is sometimes more) with a one pixel accuracy.
What I guess would help me is a way to identify the center pixel towards which the gradient direction points from all around. The center of the radial gradient, otherwise said.
I have tried to generate an ideal radial gradient such as this one:
and fit it to the image by moving correlation but with no success.
Does someone have an idea? I'm certainly not the first one needing this kind of method, but I couldn't find anything in the literature, am I missing something?
Edit: I found someone who had a similar question here but couldn't find a satisfactory answer.