parabolic_peak_finder_1d

giant.image_processing:

giant.image_processing.parabolic_peak_finder_1d(correlation_lines, fit_size=1)[source]

Find the subpixel maximum location along each row.

First, this function calls pixel_level_peak_finder_1d() to identify the location of the peak of each row. It then fits a parabola to the values around the peak and solves for the center of the parabola to be the peak value. The parabola equation that is fit is

\[y = Ax^2+Bx+C\]

where \(y\) is the value of the correlation line at location \(x\), and \(A-C\) are the coefficients to be fit. The fit is performed in an algebraic least squares sense. The location of the peak of the surface is then given by:

\[x_p = \frac{-B}{2A}\]

where \(x_p\) is the location of the peak.

Parameters:
  • correlation_lines (ndarray) – array of correlation lines

  • fit_size – number of values on each side to include in the parabola fit

Returns:

array of subpixel centers for each row