4
$\begingroup$

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.

original correlation plot

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:

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:

ideal gradient

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.

$\endgroup$
3
  • $\begingroup$ Looks like the peaks are much wider than 1 pixel. I would think that your 1-pixel peak location accuracy requirement may be difficult to meet. Looking particularly at the peak on the right, I'm not sure where you would say exactly that the peak is centered. $\endgroup$
    – Jason R
    Jan 14, 2014 at 22:04
  • $\begingroup$ @JasonR if you look at the orientation plot, the center of that radial gradient is close to 1-2 pixel, I can find it by hand, but I want to find it automatically. $\endgroup$
    – Cape Code
    Jan 14, 2014 at 22:06
  • 2
    $\begingroup$ Can you also upload the images that you want to implement the correlation? Maybe someone will have better approach there. Thanks $\endgroup$
    – lennon310
    Jan 15, 2014 at 1:44

1 Answer 1

2
$\begingroup$

You could try using the peak-to-sidelobe ratio, i.e. how many standard deviations above the mean is each point in the correlation output.

psr = ${p - \mu }\over\sigma $

Typically you compute the mean and sigma in a window around each point excluding the region nearest to each point.

$\endgroup$
1
  • $\begingroup$ That sounds promising. I will give it a try. $\endgroup$
    – Cape Code
    Jan 15, 2014 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.