Method PhaseCorrelate
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
PhaseCorrelate(InputArray, InputArray, InputArray, out double)
The function is used to detect translational shifts that occur between two images.
The operation takes advantage of the Fourier shift theorem for detecting the translational shift in the frequency domain.It can be used for fast image registration as well as motion estimation. For more information please see http://en.wikipedia.org/wiki/Phase_correlation.
Calculates the cross-power spectrum of two supplied source arrays. The arrays are padded if needed with getOptimalDFTSize.
public static Point2d PhaseCorrelate(InputArray src1, InputArray src2, InputArray window, out double response)
Parameters
src1InputArraySource floating point array (CV_32FC1 or CV_64FC1)
src2InputArraySource floating point array (CV_32FC1 or CV_64FC1)
windowInputArrayFloating point array with windowing coefficients to reduce edge effects (optional).
responsedoubleSignal power within the 5x5 centroid around the peak, between 0 and 1 (optional).
Returns
- Point2d
detected phase shift(sub-pixel) between the two arrays.