Ever needed to find the position of the maximum of a peak in an image to sub-pixel precision? Examples are finding the peak energy in Fourier space, or the location of a peak in Hough space. One simple method that I have used with some success is a simple quadratic interpolation, which is performed once for each axis.
Sub-Pixel Peak finding recipe...
Firstly, you take the value of your highest point and its neighbours (Pa, Pb and Pc). Assuming the three points are equally spaced and bracket the top of the peak, you can solve for the position of the 'true' maximum using:
x = 0.5*(Pa - Pc) / (Pa-2Pb+Pc)
The value of x will range between -0.5 and +0.5, which is relative to your maximum pixel.
Jason Dale. www.visionexperts.co.uk
Job for a rule-loving engineer?
9 years ago